PRM_MODULE_IMAGE_CONTEXT_LIST_ENTRY *TempListEntry;\r
CONST CHAR8 *CurrentExportDescriptorHandlerName;\r
\r
+ ACPI_PARAMETER_BUFFER_DESCRIPTOR *CurrentModuleAcpiParamDescriptors;\r
PRM_CONTEXT_BUFFER *CurrentContextBuffer;\r
PRM_MODULE_CONTEXT_BUFFERS *CurrentModuleContextBuffers;\r
PRM_MODULE_INFORMATION_STRUCT *CurrentModuleInfoStruct;\r
\r
EFI_STATUS Status;\r
EFI_PHYSICAL_ADDRESS CurrentImageAddress;\r
+ UINTN AcpiParamIndex;\r
UINTN HandlerIndex;\r
UINT32 PrmAcpiDescriptionTableBufferSize;\r
\r
CurrentImageAddress = TempListEntry->Context->PeCoffImageContext.ImageAddress;\r
CurrentImageExportDirectory = TempListEntry->Context->ExportDirectory;\r
CurrentExportDescriptorStruct = TempListEntry->Context->ExportDescriptor;\r
+ CurrentModuleAcpiParamDescriptors = NULL;\r
\r
DEBUG ((\r
DEBUG_INFO,\r
ASSERT (!EFI_ERROR (Status) || Status == EFI_NOT_FOUND);\r
if (!EFI_ERROR (Status) && CurrentModuleContextBuffers != NULL) {\r
CurrentModuleInfoStruct->RuntimeMmioRanges = (UINT64) (UINTN) CurrentModuleContextBuffers->RuntimeMmioRanges;\r
+ CurrentModuleAcpiParamDescriptors = CurrentModuleContextBuffers->AcpiParameterBufferDescriptors;\r
}\r
\r
//\r
CurrentHandlerInfoStruct->PhysicalAddress\r
));\r
}\r
+\r
+ //\r
+ // Update the handler ACPI parameter buffer address if applicable\r
+ //\r
+ if (CurrentModuleAcpiParamDescriptors != NULL) {\r
+ for (AcpiParamIndex = 0; AcpiParamIndex < CurrentModuleContextBuffers->AcpiParameterBufferDescriptorCount; AcpiParamIndex++) {\r
+ if (CompareGuid (&CurrentModuleAcpiParamDescriptors[AcpiParamIndex].HandlerGuid, &CurrentHandlerInfoStruct->Identifier)) {\r
+ CurrentHandlerInfoStruct->AcpiParameterBuffer = (UINT64) (UINTN) (\r
+ CurrentModuleAcpiParamDescriptors[AcpiParamIndex].AcpiParameterBufferAddress\r
+ );\r
+ }\r
+ }\r
+ }\r
}\r
CurrentModuleInfoStruct = (PRM_MODULE_INFORMATION_STRUCT *) ((UINTN) CurrentModuleInfoStruct + CurrentModuleInfoStruct->StructureLength);\r
}\r