45 #define ERANGE_SEGMENT __einfo_error ( EINFO_ERANGE_SEGMENT ) 46 #define EINFO_ERANGE_SEGMENT \ 47 __einfo_uniqify ( EINFO_ERANGE, 0x01, "Requested memory not available" ) 70 if ( filesz > memsz ) {
82 for ( i = 0 ; i < memmap.
count ; i++ ) {
92 DBG (
"Segment [%lx,%lx,%lx) does not fit into available memory\n",
#define EINVAL
Invalid argument.
uint16_t segment
Code segment.
void get_memmap(struct memory_map *memmap)
Get memory map.
unsigned int count
Number of used regions.
uint16_t mid
Middle 16 bits of address.
#define __einfo_errortab(einfo)
unsigned long user_to_phys(userptr_t userptr, off_t offset)
Convert user pointer to physical address.
Access to external ("user") memory.
uint32_t start
Starting offset.
struct memory_region regions[MAX_MEMORY_REGIONS]
Memory regions.
Executable image segments.
void memset_user(userptr_t userptr, off_t offset, int c, size_t len)
Fill user buffer with a constant byte.
uint32_t userptr_t
A pointer to a user buffer.
int prep_segment(userptr_t segment, size_t filesz, size_t memsz)
Prepare segment for loading.
#define ERANGE_SEGMENT
Segment-specific error messages.
#define EINFO_ERANGE_SEGMENT
uint64_t start
Physical start address.
uint32_t end
Ending offset.
struct errortab segment_errors [] __errortab
#define DBG(...)
Print a debugging message.
uint64_t end
Physical end address.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)