[Draft] Add RMEM ACPI reporting proposal - #1893
Conversation
❌ QEMU Validation FailedSource Dependencies
Results
Workflow run: https://github.com/microsoft/mu_basecore/actions/runs/33115063070 This comment was automatically generated by the Mu QEMU PR Validation workflow. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release/202511 #1893 +/- ##
=================================================
Coverage ? 2.25%
=================================================
Files ? 1671
Lines ? 427238
Branches ? 5126
=================================================
Hits ? 9635
Misses ? 417514
Partials ? 89
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Sean Brogan (spbrogan)
left a comment
There was a problem hiding this comment.
this looks great.
I added a few comments
|
|
||
| #include <IndustryStandard/ReservedMemoryReportingTable.h> | ||
|
|
||
| #define EDKII_RMEM_RECORD_HOB_GUID \ |
There was a problem hiding this comment.
In general, if the code goes into MdePkg it is expected to be industry specification defined so it would be something like EFI_RMEM_RECORD_HOB_GUID. This would indicate that this hob was defined (most likely) in the PI Specification (owned by UEFI forum).
So if we don't want to do that then this file would best fit into MdeModulePkg and this would be an Tianocore/Edk2 implementation feature.
| @@ -0,0 +1,63 @@ | |||
| /** @file | |||
There was a problem hiding this comment.
some comment here about Edkii vs EFI and MdePkg vs MdeModulePkg
| @param[in] Base The physical address of the first byte in the range. | ||
| @param[in] Size The size of the range in bytes. | ||
| @param[in] Category The purpose category assigned to the range. | ||
| @param[in] Label An optional null-terminated ASCII diagnostic label. |
There was a problem hiding this comment.
should probably call out the define that dictates the allowed max size and be clear if NULL is included in size or not.
| gEdkiiRmemRegistrationProtocolGuid = { 0x0cb661d3, 0x3c81, 0x4074, { 0xa6, 0xa8, 0xc9, 0x75, 0x9c, 0xc5, 0x12, 0x07 }} | ||
|
|
||
| ## Include/Protocol/MemoryAccept.h | ||
| gEdkiiMemoryAcceptProtocolGuid = { 0x38c74800, 0x5590, 0x4db4, { 0xa0, 0xf3, 0x67, 0x5d, 0x9b, 0x8e, 0x80, 0x26 }} |
There was a problem hiding this comment.
Just FYI - gEdkiiMemoryAcceptProtocolGuid seems like an outlier and did not follow the rules. I don't know exactly why it is in defined in this package.
There was a problem hiding this comment.
can we also add a section for how to view the acpi table entries from the os? example python/powershell commands.
| (Existing->Category == (UINT32)Category) && | ||
| (AsciiStrCmp (Existing->Label, Label) == 0); | ||
| } | ||
|
|
There was a problem hiding this comment.
nit: add comments for these functions, ie describe how we reject overlapping regions, etc.
Description
This draft PR adds a proposed Reserved-Memory Reporting (RMEM) ACPI interface for discussion.
Firmware may reserve physical memory for security services, firmware runtime use, shared communication buffers, graphics, NPUs, crash handling, and other platform functions. Operating systems generally expose only the aggregate hardware-reserved amount or efi descriptor, which makes it difficult to identify the purpose and owner of individual reservations.
This change introduces:
ReadyToBoot.EFI_ACPI_TABLE_PROTOCOL.This is a discussion proposal and is not ready to merge. Feedback is requested on:
For details on how to complete these options and their meaning refer to CONTRIBUTING.md.
The change adds new opt-in functionality and does not modify an existing interface. It has security and privacy implications because it exposes reserved physical-memory addresses, sizes, categories, and labels to operating-system consumers. The table is diagnostic only and does not grant access to the reported memory.
Public interface and data-format documentation is included in the new headers.
How This Was Tested
The following Mu non-compiler CI checks passed for
MdePkgandMdeModulePkg:The checks were run with: