diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2012-06-29 15:16:03 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2012-06-29 15:16:03 -0700 |
commit | 443ce2a3ac055b4ec13f86a782a04be8453fd393 (patch) | |
tree | 191c2b8836fcc89b0dd11ebcb871556188cd09ad /com32/include | |
parent | 1eb311caecf1452a78013640db828fd40c9055d2 (diff) | |
download | syslinux-443ce2a3ac055b4ec13f86a782a04be8453fd393.tar.gz |
Change fdt-specific loader into a generic setup_data loader
Make it a generic setup_data loader keyed by type.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Thierry Reding <thierry.reding@avionic-design.de>
Diffstat (limited to 'com32/include')
-rw-r--r-- | com32/include/syslinux/linux.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/com32/include/syslinux/linux.h b/com32/include/syslinux/linux.h index 6a5c2dbb..22ee5d55 100644 --- a/com32/include/syslinux/linux.h +++ b/com32/include/syslinux/linux.h @@ -51,17 +51,16 @@ struct initramfs { }; #define INITRAMFS_MAX_ALIGN 4096 -struct fdt { - void *data; - size_t len; -}; -#define DEVICETREE_MAX_ALIGN 4096 - -struct setup_data { +struct setup_data_header { uint64_t next; uint32_t type; uint32_t len; - uint8_t data[0]; +} __packed; + +struct setup_data { + struct setup_data *prev, *next; + const void *data; + struct setup_data_header hdr; }; #define SETUP_NONE 0 @@ -69,7 +68,8 @@ struct setup_data { #define SETUP_DTB 2 int syslinux_boot_linux(void *kernel_buf, size_t kernel_size, - struct initramfs *initramfs, struct fdt *fdt, + struct initramfs *initramfs, + struct setup_data *setup_data, char *cmdline); /* Initramfs manipulation functions */ @@ -88,9 +88,11 @@ int initramfs_load_file(struct initramfs *ihead, const char *src_filename, int initramfs_add_trailer(struct initramfs *ihead); int initramfs_load_archive(struct initramfs *ihead, const char *filename); -/* Device Tree manipulation functions */ +/* Setup data manipulation functions */ -struct fdt *fdt_init(void); -int fdt_load(struct fdt *fdt, const char *filename); +int setup_data_add(struct setup_data *head, uint32_t type, + const void *data, size_t data_len); +int setup_data_load(struct setup_data *head, uint32_t type, + const char *filename); #endif /* _SYSLINUX_LINUX_H */ |