Trust uboot's device list only if it does not look suspicious.
[AROS.git] / arch / all-pc / bootstrap / memory_io.c
blob0a4dc44e4f385456bb3044dc9f283c7072ffaf6b
1 #include <elfloader.h>
2 #include <string.h>
4 void *open_file(struct ELFNode *n, unsigned int *err)
6 /*
7 * Our files are already loaded into memory as raw data.
8 * Return a pointer to the beginning of the file.
9 * NULL pointer is a valid result here (on EFI machines the first
10 * module can be located at address 0). This is why error code
11 * is a separate value here.
13 *err = 0;
14 return n->eh;
17 void close_file(void *file)
19 /* No special action is needed */
22 int read_block(void *file, unsigned long offset, void *dest, unsigned long length)
24 memcpy(dest, file + offset, length);
25 return 0;
28 void *load_block(void *file, unsigned long offset, unsigned long length, unsigned int *err)
30 *err = 0;
31 return file + offset;
34 void free_block(void *addr)
36 /* No special action is needed */