-
Notifications
You must be signed in to change notification settings - Fork 22
Add APMT ACPI table support for guest uncore PMU #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -556,6 +556,10 @@ | |
| gMsvmPkgTokenSpaceGuid.PcdIortPtr|0x0 | ||
| gMsvmPkgTokenSpaceGuid.PcdIortSize|0x0 | ||
|
|
||
| # UEFI_CONFIG_APMT | ||
| gMsvmPkgTokenSpaceGuid.PcdApmtPtr|0x0 | ||
| gMsvmPkgTokenSpaceGuid.PcdApmtSize|0x0 | ||
|
|
||
|
Comment on lines
+560
to
+562
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Copilot] APMT is ARM-specific (ARM Performance Monitoring Table). Adding it to the X64 DSC is harmless since the host will never provide one and the installer gracefully skips when absent — but is this intentional for symmetry, or should the PCDs only be wired in the AARCH64 DSC? |
||
| # UEFI_CONFIG_MEMORY_MAP | ||
| gMsvmPkgTokenSpaceGuid.PcdMemoryMapPtr|0x0 | ||
| gMsvmPkgTokenSpaceGuid.PcdMemoryMapSize|0x0 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -590,6 +590,10 @@ DebugDumpUefiConfigStruct( | |
| DebugDumpHmat(hmat->Hmat); | ||
| break; | ||
|
|
||
| case UefiConfigApmt: | ||
| DEBUG((DEBUG_VERBOSE, "\tAPMT table found.\n")); | ||
| break; | ||
|
|
||
| case UefiConfigMemoryMap: | ||
| UEFI_CONFIG_MEMORY_MAP *memMap = (UEFI_CONFIG_MEMORY_MAP*) Header; | ||
| DebugDumpMemoryMap(memMap->MemoryMap, Header->Length - sizeof(UEFI_CONFIG_HEADER), PcdGetBool(PcdLegacyMemoryMap)); | ||
|
|
@@ -1065,6 +1069,7 @@ Return Value: | |
| 0, //UefiConfigSsdt | ||
| 0, //UefiConfigHmat | ||
| 0, //UefiConfigIort | ||
| 0, //UefiConfigApmt | ||
| }; | ||
|
|
||
| // | ||
|
|
@@ -1630,6 +1635,22 @@ Return Value: | |
| PEI_FAIL_FAST_IF_FAILED(PcdSet64S(PcdIortPtr, (UINT64)iortStructure->Iort)); | ||
| PEI_FAIL_FAST_IF_FAILED(PcdSet32S(PcdIortSize, iortHdr->Length)); | ||
| break; | ||
|
|
||
| case UefiConfigApmt: | ||
| UEFI_CONFIG_APMT *apmtStructure = (UEFI_CONFIG_APMT*) header; | ||
| EFI_ACPI_DESCRIPTION_HEADER *apmtHdr = (EFI_ACPI_DESCRIPTION_HEADER*) apmtStructure->Apmt; | ||
|
|
||
| if (apmtStructure->Header.Length < (sizeof(UEFI_CONFIG_HEADER) + sizeof(EFI_ACPI_DESCRIPTION_HEADER)) || | ||
| apmtHdr->Signature != ARM_ACPI_APMT_TABLE_SIGNATURE || | ||
| apmtHdr->Length > (apmtStructure->Header.Length - sizeof(UEFI_CONFIG_HEADER))) | ||
| { | ||
| DEBUG((DEBUG_ERROR, "*** Malformed APMT\n")); | ||
| FAIL_FAST_UNEXPECTED_HOST_BEHAVIOR(); | ||
| } | ||
|
|
||
| PEI_FAIL_FAST_IF_FAILED(PcdSet64S(PcdApmtPtr, (UINT64)apmtStructure->Apmt)); | ||
| PEI_FAIL_FAST_IF_FAILED(PcdSet32S(PcdApmtSize, apmtHdr->Length)); | ||
| break; | ||
|
Comment on lines
+1639
to
+1653
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Copilot] The adjacent case UefiConfigIort:
{
UEFI_CONFIG_IORT *iortStructure = ...;
...
break;
}This case declares |
||
| } | ||
|
|
||
| calculatedConfigSize += header->Length; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Copilot] Nit: IORT uses tokens
0x6070/0x6071. APMT jumps to0x6073/0x6074, skipping0x6072. Is this intentional (reserved for something else) or a typo? If intentional, a comment noting the reservation would help future readers.