Date: Fri, 26 Aug 2022 18:44:56 +0100 From: Jessica Clarke <jrtc27@freebsd.org> To: Warner Losh <imp@FreeBSD.org> Cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Subject: Re: git: 74704a26bc2c - main - efi: Create a define for memory descriptor version Message-ID: <563EB46C-FEA6-4E1D-B9D5-9EFCF3427FCF@freebsd.org> In-Reply-To: <202208261741.27QHfVse092900@gitrepo.freebsd.org> References: <202208261741.27QHfVse092900@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 26 Aug 2022, at 18:41, Warner Losh <imp@FreeBSD.org> wrote: >=20 > The branch main has been updated by imp: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D74704a26bc2cfc72de6821d29a1f53b9= d8c65f55 >=20 > commit 74704a26bc2cfc72de6821d29a1f53b9d8c65f55 > Author: Warner Losh <imp@FreeBSD.org> > AuthorDate: 2022-08-26 17:39:37 +0000 > Commit: Warner Losh <imp@FreeBSD.org> > CommitDate: 2022-08-26 17:40:42 +0000 >=20 > efi: Create a define for memory descriptor version >=20 > For true EFI platforms, the EFI BIOS will return version 1 (since = no > other version is defined as of this commit). However, for = environments > that wish to create an EFI memory mapping table that aren't = actually > EFI, we need to know this. Add EFI_MEMORY_DESCRIPTOR_VERSION for = this > constant. Should such environments not be hard-coding version 1? Otherwise you risk starting to silently create version 2 structures in the future if this is bumped, but initialised as if they were version 1, which could mean leaving some new fields uninitialised. Jess > Sponsored by: Netflix > --- > sys/sys/efi.h | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/sys/sys/efi.h b/sys/sys/efi.h > index 6ace7dd6e523..f5dc15ae418f 100644 > --- a/sys/sys/efi.h > +++ b/sys/sys/efi.h > @@ -59,6 +59,8 @@ struct efi_cfgtbl { > void *ct_data; > }; >=20 > +#define EFI_MEMORY_DESCRIPTOR_VERSION 1 > + > struct efi_md { > uint32_t md_type; > #define EFI_MD_TYPE_NULL 0
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?563EB46C-FEA6-4E1D-B9D5-9EFCF3427FCF>