This change will support stage2 running LAR files. The initial example
is running the VSA in the geode lx northbridge. It builds but is not tested. lar.h: make LAR functions SHARED lar.c: make process_file non-static (i.e. global) vsmsetup.c: modify to use LAR functions. stage1.c: new function, init_archive, which is SHARED and will set up the initial archive struct. Note that some work remains. The use of unsigned longs and unsigned shorts should be changed to u32/u16 as Carl-Daniel has pointed out, Because this change requires changes elsewhere I am not including them in this patch. Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: svn://coreboot.org/repository/coreboot-v3@561 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
parent
3ac5450814
commit
5de5570bac
4 changed files with 47 additions and 33 deletions
|
|
@ -51,6 +51,7 @@
|
|||
#define LAR_H
|
||||
|
||||
#include <types.h>
|
||||
#include <shared.h>
|
||||
|
||||
#define MAGIC "LARCHIVE"
|
||||
#define MAX_PATHLEN 1024
|
||||
|
|
@ -82,11 +83,15 @@ struct mem_file {
|
|||
};
|
||||
|
||||
/* Prototypes. */
|
||||
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(const struct mem_file *archive, const char *filename);
|
||||
void *load_file_segments(const struct mem_file *archive, const char *filename);
|
||||
/* architecture-defined */
|
||||
SHARED(init_archive, void, struct mem_file *);
|
||||
/* architecture-independent */
|
||||
SHARED(find_file, int, const struct mem_file *archive, const char *filename, struct mem_file *result);
|
||||
SHARED(copy_file, int, const struct mem_file *archive, const char *filename, void *where);
|
||||
SHARED(run_file, int, const struct mem_file *archive, const char *filename, void *where);
|
||||
SHARED(execute_in_place, int, const struct mem_file *archive, const char *filename);
|
||||
SHARED(run_address, int, void *f);
|
||||
SHARED(load_file, void *, const struct mem_file *archive, const char *filename);
|
||||
SHARED(load_file_segments, void *, const struct mem_file *archive, const char *filename);
|
||||
SHARED(process_file, int, const struct mem_file *archive, void *where);
|
||||
#endif /* LAR_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue