On Fri, Aug 26, 2022 at 11:45 AM Jessica Clarke <[email protected]> wrote:
> On 26 Aug 2022, at 18:41, Warner Losh <[email protected]> wrote: > > > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=74704a26bc2cfc72de6821d29a1f53b9d8c65f55 > > > > commit 74704a26bc2cfc72de6821d29a1f53b9d8c65f55 > > Author: Warner Losh <[email protected]> > > AuthorDate: 2022-08-26 17:39:37 +0000 > > Commit: Warner Losh <[email protected]> > > CommitDate: 2022-08-26 17:40:42 +0000 > > > > efi: Create a define for memory descriptor version > > > > 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. > Hmmm, currently we don't check the version.... But we likely should add an assert to say that this version is 1, because who knows what version 2 will bring... But yes, it's a good idea to be explicit about that. Warner
