Changeset View
Standalone View
sys/i386/include/bootinfo.h
Show All 38 Lines | |||||
/* Only change the version number if you break compatibility. */ | /* Only change the version number if you break compatibility. */ | ||||
#define BOOTINFO_VERSION 1 | #define BOOTINFO_VERSION 1 | ||||
#define _WAS_N_BIOS_GEOM 8 | #define _WAS_N_BIOS_GEOM 8 | ||||
/* | /* | ||||
* A zero bootinfo field often means that there is no info available. | * A zero bootinfo field often means that there is no info available. | ||||
* Flags are used to indicate the validity of fields where zero is a | * Assumes booting with a boot loader from FreeBSD 2.1 or newer and | ||||
* normal value. | * that bi_size is always valid when bi_version == 1. | ||||
*/ | */ | ||||
struct bootinfo { | struct bootinfo { | ||||
u_int32_t bi_version; | u_int32_t bi_version; /* Must be 1 */ | ||||
u_int32_t bi_kernelname; /* represents a char * */ | u_int32_t bi_kernelname; /* represents a char * */ | ||||
u_int32_t bi_nfs_diskless; /* struct nfs_diskless * */ | u_int32_t bi_nfs_diskless; /* struct nfs_diskless * */ | ||||
/* End of fields that are always present. */ | |||||
#define bi_endcommon _was_bi_n_bios_used | |||||
u_int32_t _was_bi_n_bios_used; | u_int32_t _was_bi_n_bios_used; | ||||
u_int32_t _was_bi_bios_geom[_WAS_N_BIOS_GEOM]; | u_int32_t _was_bi_bios_geom[_WAS_N_BIOS_GEOM]; | ||||
u_int32_t bi_size; | u_int32_t bi_size; | ||||
u_int8_t bi_memsizes_valid; | u_int8_t bi_memsizes_valid; | ||||
u_int8_t bi_bios_dev; /* bootdev BIOS unit number (bootX -> loader only) */ | u_int8_t bi_bios_dev; /* bootdev BIOS unit number (bootX -> loader only) */ | ||||
u_int8_t bi_pad[2]; | u_int8_t bi_pad[2]; | ||||
u_int32_t bi_basemem; | u_int32_t bi_basemem; | ||||
u_int32_t bi_extmem; | u_int32_t bi_extmem; | ||||
u_int32_t bi_symtab; /* struct symtab * */ | u_int32_t bi_symtab; /* struct symtab * */ | ||||
u_int32_t bi_esymtab; /* struct symtab * */ | u_int32_t bi_esymtab; /* struct symtab * */ | ||||
/* Items below only from advanced bootloader */ | /* Items below only from advanced bootloader */ | ||||
u_int32_t bi_kernend; /* end of kernel space */ | u_int32_t bi_kernend; /* end of kernel space */ | ||||
u_int32_t bi_envp; /* environment */ | u_int32_t bi_envp; /* environment */ | ||||
u_int32_t bi_modulep; /* preloaded modules */ | u_int32_t bi_modulep; /* preloaded modules */ | ||||
uint32_t _was_bi_memdesc_version;/* EFI memory desc version */ | |||||
kib: So somebody added EFI placeholders for i386 bootinfo in 2010. Are we completely giving up on… | |||||
Done Inline ActionsYes. We've given up. If others really want to do this, then the boot loader will pass the memory table to the kernel with metadata like we do for all the other platforms. We should know enough to be able to rummage around there to find the memory maps we need to bring up the vm system... imp: Yes. We've given up.
If others really want to do this, then the boot loader will pass the… | |||||
Not Done Inline ActionsI would not be that categorical. In fact, my memory is that UEFI was functional for i386 loader, and the biggest missed parts are that i386 kernel
BTW, it is probably more EFI bits spread over the i386 loader code. May be, instead of removing, add some option like LOADER_EFI_I386, default *disabled*, and move all found code under #ifdef LOADER_EFI_I386? kib: I would not be that categorical. In fact, my memory is that UEFI was functional for i386… | |||||
Done Inline ActionsI can be categorical because there's really no i386 loader today. __exec() is empty, there's some empty stubs. It only compiles, but little else is there, at least for 32-bit images. It would be a heavy lift to even get the i386 loader to parity with amd64 on the loader side. Based on my kboot experience getting amd64 going (partially and I copied from acpi), you'd be looking at at least a few weeks of somebody's time These fields are left-over from the ia64 implementation that was copied here in preparation for making it work on i386, but that never happened. In addition, the demand for i386 UEFI booting is super low as well, since so few 32-bit i386 boards were made that could load with UEFI. imp: I can be categorical because there's really no i386 loader today. __exec() is empty, there's… | |||||
uint64_t _was_bi_memdesc_size; /* sizeof EFI memory desc */ | |||||
uint64_t _was_bi_memmap; /* pa of EFI memory map */ | |||||
uint64_t _was_bi_memmap_size; /* size of EFI memory map */ | |||||
uint64_t _was_bi_hcdp; /* DIG64 HCDP table */ | |||||
uint64_t _was_bi_fpswa; /* FPSWA interface */ | |||||
uint64_t _was_bi_systab; /* pa of EFI system table */ | |||||
}; | }; | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
extern struct bootinfo bootinfo; | extern struct bootinfo bootinfo; | ||||
#endif | #endif | ||||
/* | /* | ||||
* Constants for converting boot-style device number to type, | * Constants for converting boot-style device number to type, | ||||
Show All 37 Lines |
So somebody added EFI placeholders for i386 bootinfo in 2010. Are we completely giving up on EFI/i386 boot?