After DxeCore finish DXE phase, gEfiBdsArchProtocolGuid->BdsEntry will be invoked\r
to enter BDS phase.\r
\r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
This program and the accompanying materials\r
BdsFormalizeOSIndicationVariable ();\r
}\r
\r
-/**\r
-\r
- Allocate a block of memory that will contain performance data to OS.\r
-\r
-**/\r
-VOID\r
-BdsAllocateMemoryForPerformanceData (\r
- VOID\r
- )\r
-{\r
- EFI_STATUS Status;\r
- EFI_PHYSICAL_ADDRESS AcpiLowMemoryBase;\r
- EDKII_VARIABLE_LOCK_PROTOCOL *VariableLock;\r
-\r
- AcpiLowMemoryBase = 0x0FFFFFFFFULL;\r
-\r
- //\r
- // Allocate a block of memory that will contain performance data to OS.\r
- //\r
- Status = gBS->AllocatePages (\r
- AllocateMaxAddress,\r
- EfiReservedMemoryType,\r
- EFI_SIZE_TO_PAGES (PERF_DATA_MAX_LENGTH),\r
- &AcpiLowMemoryBase\r
- );\r
- if (!EFI_ERROR (Status)) {\r
- //\r
- // Save the pointer to variable for use in S3 resume.\r
- //\r
- Status = BdsDxeSetVariableAndReportStatusCodeOnError (\r
- L"PerfDataMemAddr",\r
- &gPerformanceProtocolGuid,\r
- EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,\r
- sizeof (EFI_PHYSICAL_ADDRESS),\r
- &AcpiLowMemoryBase\r
- );\r
- if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_ERROR, "[Bds] PerfDataMemAddr (%08x) cannot be saved to NV storage.\n", AcpiLowMemoryBase));\r
- }\r
- //\r
- // Mark L"PerfDataMemAddr" variable to read-only if the Variable Lock protocol exists\r
- // Still lock it even the variable cannot be saved to prevent it's set by 3rd party code.\r
- //\r
- Status = gBS->LocateProtocol (&gEdkiiVariableLockProtocolGuid, NULL, (VOID **) &VariableLock);\r
- if (!EFI_ERROR (Status)) {\r
- Status = VariableLock->RequestToLock (VariableLock, L"PerfDataMemAddr", &gPerformanceProtocolGuid);\r
- ASSERT_EFI_ERROR (Status);\r
- }\r
- }\r
-}\r
-\r
/**\r
Enter an infinite loop of calling the Boot Manager Menu.\r
\r
PERF_START (NULL, "BDS", NULL, 0);\r
DEBUG ((EFI_D_INFO, "[Bds] Entry...\n"));\r
\r
- PERF_CODE (\r
- BdsAllocateMemoryForPerformanceData ();\r
- );\r
-\r
//\r
// Fill in FirmwareVendor and FirmwareRevision from PCDs\r
//\r