git: 59b1d074280d - main - i386: Mark the obsolete fields in bootinfo with _was_

From: Warner Losh <imp_at_FreeBSD.org>
Date: Fri, 16 Sep 2022 15:54:01 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=59b1d074280d6b060cca6f502a2b33933614cce0

commit 59b1d074280d6b060cca6f502a2b33933614cce0
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-09-16 15:09:16 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-09-16 15:18:57 +0000

    i386: Mark the obsolete fields in bootinfo with _was_
    
    Mark the obsolete fields in bootinfo with _was_. Note that the fields
    from bi_memdesc_version to the end of the structure never were used in a
    release. They were added in April 2010 for i386 EFI booting. The boot
    loader set these fields though 2019, but no kernel ever looked at them
    and we never supported i386 EFI booting, and likely never will in this
    form. They can likely be deleted entirely in the future, but locore.S
    needs to change to do that (it also needs to change to drop support for
    really old booting scenarios as well, which will eliminate bi_endcommon
    too).
    
    All the other fields haven't been used since the 4.x -> 5.x cutover of
    the wdc driver to ata.
    
    The bi_bios_dev field is used in the handoff between bootXX and the
    loader. The loader uses it to determine what disk it was loaded off of
    to detmerine the default root filesystem. It's not used by the i386
    kernel anymore to determine anything.
    
    Sponsored by:           Netflix
    Reviewed by:            tsoome
    Differential Revision:  https://reviews.freebsd.org/D36544
---
 sys/i386/include/bootinfo.h | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/sys/i386/include/bootinfo.h b/sys/i386/include/bootinfo.h
index 71cc5dc4a348..5b9473ddcaba 100644
--- a/sys/i386/include/bootinfo.h
+++ b/sys/i386/include/bootinfo.h
@@ -40,7 +40,7 @@
 /* Only change the version number if you break compatibility. */
 #define	BOOTINFO_VERSION	1
 
-#define	N_BIOS_GEOM		8
+#define	_WAS_N_BIOS_GEOM	8
 
 /*
  * A zero bootinfo field often means that there is no info available.
@@ -52,12 +52,12 @@ struct bootinfo {
 	u_int32_t	bi_kernelname;		/* represents a char * */
 	u_int32_t	bi_nfs_diskless;	/* struct nfs_diskless * */
 				/* End of fields that are always present. */
-#define	bi_endcommon	bi_n_bios_used
-	u_int32_t	bi_n_bios_used;
-	u_int32_t	bi_bios_geom[N_BIOS_GEOM];
+#define	bi_endcommon	_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	bi_size;
 	u_int8_t	bi_memsizes_valid;
-	u_int8_t	bi_bios_dev;		/* bootdev BIOS unit number */
+	u_int8_t	bi_bios_dev;	/* bootdev BIOS unit number (bootX -> loader only) */
 	u_int8_t	bi_pad[2];
 	u_int32_t	bi_basemem;
 	u_int32_t	bi_extmem;
@@ -67,13 +67,13 @@ struct bootinfo {
 	u_int32_t	bi_kernend;		/* end of kernel space */
 	u_int32_t	bi_envp;		/* environment */
 	u_int32_t	bi_modulep;		/* preloaded modules */
-	uint32_t	bi_memdesc_version;	/* EFI memory desc version */
-	uint64_t	bi_memdesc_size;	/* sizeof EFI memory desc */
-	uint64_t	bi_memmap;		/* pa of EFI memory map */
-	uint64_t	bi_memmap_size;		/* size of EFI memory map */
-	uint64_t	bi_hcdp;		/* DIG64 HCDP table */
-	uint64_t	bi_fpswa;		/* FPSWA interface */
-	uint64_t	bi_systab;		/* pa of EFI system table */
+	uint32_t	_was_bi_memdesc_version;/* EFI memory desc version */
+	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