Consolidate all multiple segment handling into

lib/lar.c:load_file_segments() and greatly simplify arch/x86/stage1.c
code as a result. While I'm at it, improve the LAR segmentation
abstraction. Stage 1 code should not have to care about internal
representation of segments, that knowledge belongs into lib/lar.c.
Constification of most function parameters in lib/lar.c led to a few
other now obvious code removals.

Build tested and runtime tested in Qemu.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>


git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@530 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
Carl-Daniel Hailfinger 2007-11-28 22:50:00 +00:00
commit 82ea8a8b1e
3 changed files with 58 additions and 72 deletions

View file

@ -82,10 +82,11 @@ struct mem_file {
};
/* Prototypes. */
int find_file(struct mem_file *archive, const char *filename, struct mem_file *result);
int copy_file(struct mem_file *archive, const char *filename, void *where);
int run_file(struct mem_file *archive, const char *filename, void *where);
int execute_in_place(struct mem_file *archive, const char *filename);
int find_file(const struct mem_file *archive, const char *filename, struct mem_file *result);
int copy_file(const struct mem_file *archive, const char *filename, void *where);
int run_file(const struct mem_file *archive, const char *filename, void *where);
int execute_in_place(const struct mem_file *archive, const char *filename);
int run_address(void *f);
void *load_file(struct mem_file *archive, const char *filename);
void *load_file(const struct mem_file *archive, const char *filename);
void *load_file_segments(const struct mem_file *archive, const char *filename);
#endif /* LAR_H */