2

I was trying to understand the different sections in the package declaration file (.dec) of an EDK2 module, however I can't seem to figure out why some GUID definitions are under the [GUIDs] section and some are under the [Protocols] section or [Ppis] section. Is there a reason why they should not be under the same section, especially from the perspective of the EDK2 build process?

unixsmurf
  • 5,852
  • 1
  • 33
  • 40
blessthefry
  • 121
  • 7

1 Answers1

1

So, this is half an answer at most, but:

A GUID, ultimately, is nothing other than a 128-bit value statistically guaranteed to be unique (if generated using the defined method).

The [Guids] section of the .dec defines GUIDs that point to generic data structures, variable namespaces, things...

The [Protocols] section defines discoverable UEFI APIs, whereas [Ppis] defines PEI (Pre-EFI) APIs.

Ultimately, this becomes relevant when processing module .inf files, which declare which [Guids], [Protocols] and [Ppis] they require to build. I.e., you could possibly get away with just declaring everything as GUIDs - but then you'd loose any sanity checking preventing you from using PPIs in DXE, or the other way around.

unixsmurf
  • 5,852
  • 1
  • 33
  • 40