public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Marvin Häuser" <mhaeuser@posteo.de>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Andrew Fish <afish@apple.com>,
	leif@nuviainc.com, michael.d.kinney@intel.com, ray.ni@intel.com,
	zhichao.gao@intel.com, Jian J Wang <jian.j.wang@intel.com>,
	Hao A Wu <hao.a.wu@intel.com>,
	dandan.bi@intel.com, eric.dong@intel.com,
	Bret Barkelew <Bret.Barkelew@microsoft.com>,
	Vitaly Cheptsov <vit9696@protonmail.com>
Subject: [RFC] Expose HII package list via C variables
Date: Wed, 25 Aug 2021 21:21:02 +0000	[thread overview]
Message-ID: <fa1752f9-1489-dc46-321d-62896bb641e0@posteo.de> (raw)

Good day everyone,

Currently, the HII package list is stored in a PE/COFF resource section 
[1]. I propose to store it in a C variable (byte array with a pointer to 
it and its size exposed) instead. DxeCore would have a guard to toggle 
the deprecated support for the automatic protocol installation. This has 
the following advantages:

1. Fixes BZ (incl. future toolchains): 
https://bugzilla.tianocore.org/show_bug.cgi?id=557
2. Universal method across all toolchains and output file formats
3. Saves error-prone parsing work
4. Saves protocol install/locate work, the data is available right away
5. The omission of a dedicated section can save space
6. Terse file formats can support this and remain terse :)
7. Removes a dependency on the PE/COFF format specifically

A *very rough* PoC diff can be found here: 
https://github.com/mhaeuser/edk2/compare/master...wip_hii_cvar
If the feedback is positive, I will clean it up of course. OVMF boots 
with everything working fine.

I'd explicitly like feedback on the following:
A. Is this an acceptable solution to BZ 557 (Andrew?)?
B. Is this an acceptable solution for the "HII workflow" (MdeModule 
maintainers?)?
C. Is it acceptable to make support UEFI-side support for the old 
mechanism optional (Stewards?)?
D. Can an acceptable alternative be found for the removed ShellPkg code 
(Shell maintainers?)?

As you can see the BaseTools part also is rough, but that is more a 
question of "how" rather than "whether", so I'll postpone asking about it.

Thanks for your time and feedback!

Best regards,
Marvin


[1] "Once the image is loaded, LoadImage() installs 
EFI_HII_PACKAGE_LIST_PROTOCOL on the handle if
the image contains a custom PE/COFF resource with the type 'HII'."
- UEFI 2.9, 7.4, "EFI_BOOT_SERVICES.LoadImage()"

             reply	other threads:[~2021-08-25 21:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25 21:21 Marvin Häuser [this message]
2021-08-25 22:33 ` [edk2-devel] [RFC] Expose HII package list via C variables Michael D Kinney
2021-08-26  8:50   ` Marvin Häuser
2021-08-26 14:37     ` Michael D Kinney
2021-08-26 14:47       ` Marvin Häuser
2021-08-26 16:01       ` Tim Lewis
2021-08-26 16:07         ` Marvin Häuser
2021-08-26 16:44           ` Michael D Kinney
2021-08-26 17:29             ` Marvin Häuser
2021-08-26 19:50             ` Andrew Fish
2021-08-26 16:49           ` Samer El-Haj-Mahmoud
2021-08-26 17:02             ` Marvin Häuser
2021-08-26 17:07           ` Tim Lewis
2021-08-26 18:19 ` Ni, Ray
2021-08-26 18:32   ` [edk2-devel] " Marvin Häuser
2021-08-26 18:38     ` Ni, Ray
2021-08-26 19:28       ` Marvin Häuser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fa1752f9-1489-dc46-321d-62896bb641e0@posteo.de \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox