Statistics
| Branch: | Revision:

root / hw / loader.h @ f4e94dfe

History | View | Annotate | Download (1 kB)

1 ca20cf32 Blue Swirl
#ifndef LOADER_H
2 ca20cf32 Blue Swirl
#define LOADER_H
3 ca20cf32 Blue Swirl
4 ca20cf32 Blue Swirl
/* loader.c */
5 ca20cf32 Blue Swirl
int get_image_size(const char *filename);
6 ca20cf32 Blue Swirl
int load_image(const char *filename, uint8_t *addr); /* deprecated */
7 c227f099 Anthony Liguori
int load_image_targphys(const char *filename, target_phys_addr_t, int max_sz);
8 ca20cf32 Blue Swirl
int load_elf(const char *filename, int64_t address_offset,
9 ca20cf32 Blue Swirl
             uint64_t *pentry, uint64_t *lowaddr, uint64_t *highaddr,
10 ca20cf32 Blue Swirl
             int big_endian, int elf_machine, int clear_lsb);
11 c227f099 Anthony Liguori
int load_aout(const char *filename, target_phys_addr_t addr, int max_sz,
12 c227f099 Anthony Liguori
              int bswap_needed, target_phys_addr_t target_page_size);
13 c227f099 Anthony Liguori
int load_uimage(const char *filename, target_phys_addr_t *ep,
14 c227f099 Anthony Liguori
                target_phys_addr_t *loadaddr, int *is_linux);
15 ca20cf32 Blue Swirl
16 c227f099 Anthony Liguori
int fread_targphys(target_phys_addr_t dst_addr, size_t nbytes, FILE *f);
17 c227f099 Anthony Liguori
int fread_targphys_ok(target_phys_addr_t dst_addr, size_t nbytes, FILE *f);
18 c227f099 Anthony Liguori
int read_targphys(int fd, target_phys_addr_t dst_addr, size_t nbytes);
19 c227f099 Anthony Liguori
void pstrcpy_targphys(target_phys_addr_t dest, int buf_size,
20 ca20cf32 Blue Swirl
                      const char *source);
21 ca20cf32 Blue Swirl
#endif