After DxeCore finish DXE phase, gEfiBdsArchProtocolGuid->BdsEntry will be invoked\r
to enter BDS phase.\r
\r
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
return Status;\r
}\r
\r
-\r
-/**\r
- An empty function to pass error checking of CreateEventEx ().\r
-\r
- @param Event Event whose notification function is being invoked.\r
- @param Context Pointer to the notification function's context,\r
- which is implementation-dependent.\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-BdsEmptyCallbackFunction (\r
- IN EFI_EVENT Event,\r
- IN VOID *Context\r
- )\r
-{\r
-}\r
-\r
/**\r
\r
This function attempts to boot for the boot order specified\r
Status = gBS->CreateEventEx (\r
EVT_NOTIFY_SIGNAL,\r
TPL_CALLBACK,\r
- BdsEmptyCallbackFunction,\r
+ EfiEventEmptyFunction,\r
NULL,\r
&gConnectConInEventGuid,\r
&ConnectConInEvent\r
BdsLibBuildOptionFromVar (&BootLists, L"BootOrder");\r
\r
//\r
- // When we didn't have chance to build boot option variables in the first \r
+ // When we didn't have chance to build boot option variables in the first\r
// full configuration boot (e.g.: Reset in the first page or in Device Manager),\r
// we have no boot options in the following mini configuration boot.\r
// Give the last chance to enumerate the boot options.\r
// Restore to original mode before launching boot option.\r
//\r
BdsSetConsoleMode (FALSE);\r
- \r
+\r
//\r
// All the driver options should have been processed since\r
// now boot will be performed.\r
\r
/**\r
\r
- Validate input console variable data. \r
+ Validate input console variable data.\r
\r
If found the device path is not a valid device path, remove the variable.\r
- \r
+\r
@param VariableName Input console variable name.\r
\r
**/\r
&gEfiGlobalVariableGuid,\r
&VariableSize\r
);\r
- if ((DevicePath != NULL) && !IsDevicePathValid (DevicePath, VariableSize)) { \r
+ if ((DevicePath != NULL) && !IsDevicePathValid (DevicePath, VariableSize)) {\r
Status = gRT->SetVariable (\r
VariableName,\r
&gEfiGlobalVariableGuid,\r
\r
/**\r
\r
- Formalize Bds global variables. \r
+ Formalize Bds global variables.\r
\r
1. For ConIn/ConOut/ConErr, if found the device path is not a valid device path, remove the variable.\r
- 2. For OsIndicationsSupported, Create a BS/RT/UINT64 variable to report caps \r
+ 2. For OsIndicationsSupported, Create a BS/RT/UINT64 variable to report caps\r
3. Delete OsIndications variable if it is not NV/BS/RT UINT64\r
Item 3 is used to solve case when OS corrupts OsIndications. Here simply delete this NV variable.\r
- \r
+\r
**/\r
-VOID \r
+VOID\r
BdsFormalizeEfiGlobalVariable (\r
VOID\r
)\r
UINT64 OsIndication;\r
UINTN DataSize;\r
UINT32 Attributes;\r
- \r
+\r
//\r
// Validate Console variable.\r
//\r
\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
- 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
\r
Service routine for BdsInstance->Entry(). Devices are connected, the\r
PERF_END (NULL, "DXE", NULL, 0);\r
PERF_START (NULL, "BDS", NULL, 0);\r
\r
- PERF_CODE (\r
- BdsAllocateMemoryForPerformanceData ();\r
- );\r
-\r
//\r
// Initialize the global system boot option and driver option\r
//\r
then EFI_INVALID_PARAMETER is returned.\r
@param VendorGuid A unique identifier for the vendor.\r
@param Attributes Attributes bitmask to set for the variable.\r
- @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, \r
- EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, or \r
- EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero \r
- causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is \r
- set, then a SetVariable() call with a DataSize of zero will not cause any change to \r
- the variable value (the timestamp associated with the variable may be updated however \r
- even if no new data value is provided,see the description of the \r
- EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not \r
- be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). \r
+ @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE,\r
+ EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, or\r
+ EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero\r
+ causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is\r
+ set, then a SetVariable() call with a DataSize of zero will not cause any change to\r
+ the variable value (the timestamp associated with the variable may be updated however\r
+ even if no new data value is provided,see the description of the\r
+ EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not\r
+ be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated).\r
@param Data The contents for the variable.\r
\r
@retval EFI_SUCCESS The firmware has successfully stored the variable and its data as\r
@retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.\r
@retval EFI_WRITE_PROTECTED The variable in question is read-only.\r
@retval EFI_WRITE_PROTECTED The variable in question cannot be deleted.\r
- @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS \r
- or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo \r
+ @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS\r
+ or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo\r
does NOT pass the validation check carried out by the firmware.\r
\r
@retval EFI_NOT_FOUND The variable trying to be updated or deleted was not found.\r