]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/BdsDxe/BdsEntry.c
MdeModulePkg: Use UefiSpec.h defined macro to replace L"xxx" string
[mirror_edk2.git] / MdeModulePkg / Universal / BdsDxe / BdsEntry.c
index 020f18d48c3a7bb0d0cf8d59f7dcf536d4b45caa..4154d41372ed5e4de1ac087ec7912e2befd1fce2 100644 (file)
@@ -5,6 +5,7 @@
   After DxeCore finish DXE phase, gEfiBdsArchProtocolGuid->BdsEntry will be invoked\r
   to enter BDS phase.\r
 \r
+(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>\r
 Copyright (c) 2004 - 2015, 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
@@ -144,7 +145,6 @@ BdsEnumerateBootOptions (
 {\r
   EFI_STATUS                            Status;\r
   EFI_BOOT_MANAGER_LOAD_OPTION          *BootOptions;\r
-  UINT16                                NonBlockNumber;\r
   UINTN                                 HandleCount;\r
   EFI_HANDLE                            *Handles;\r
   EFI_BLOCK_IO_PROTOCOL                 *BlkIo;\r
@@ -220,7 +220,6 @@ BdsEnumerateBootOptions (
   //\r
   // Parse simple file system not based on block io\r
   //\r
-  NonBlockNumber = 0;\r
   gBS->LocateHandleBuffer (\r
          ByProtocol,\r
          &gEfiSimpleFileSystemProtocolGuid,\r
@@ -673,7 +672,7 @@ BdsFormalizeOSIndicationVariable (
   //\r
   OsIndicationSupport = EFI_OS_INDICATIONS_BOOT_TO_FW_UI;\r
   Status = gRT->SetVariable (\r
-                  L"OsIndicationsSupported",\r
+                  EFI_OS_INDICATIONS_SUPPORT_VARIABLE_NAME,\r
                   &gEfiGlobalVariableGuid,\r
                   EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,\r
                   sizeof(UINT64),\r
@@ -695,7 +694,7 @@ BdsFormalizeOSIndicationVariable (
   Attributes = 0;\r
   DataSize = sizeof(UINT64);\r
   Status = gRT->GetVariable (\r
-                  L"OsIndications",\r
+                  EFI_OS_INDICATIONS_VARIABLE_NAME,\r
                   &gEfiGlobalVariableGuid,\r
                   &Attributes,\r
                   &DataSize,\r
@@ -712,7 +711,7 @@ BdsFormalizeOSIndicationVariable (
 \r
     DEBUG ((EFI_D_ERROR, "[Bds] Unformalized OsIndications variable exists. Delete it\n"));\r
     Status = gRT->SetVariable (\r
-                    L"OsIndications",\r
+                    EFI_OS_INDICATIONS_VARIABLE_NAME,\r
                     &gEfiGlobalVariableGuid,\r
                     0,\r
                     0,\r
@@ -738,9 +737,9 @@ BdsFormalizeEfiGlobalVariable (
   //\r
   // Validate Console variable.\r
   //\r
-  BdsFormalizeConsoleVariable (L"ConIn");\r
-  BdsFormalizeConsoleVariable (L"ConOut");\r
-  BdsFormalizeConsoleVariable (L"ErrOut");\r
+  BdsFormalizeConsoleVariable (EFI_CON_IN_VARIABLE_NAME);\r
+  BdsFormalizeConsoleVariable (EFI_CON_OUT_VARIABLE_NAME);\r
+  BdsFormalizeConsoleVariable (EFI_ERR_OUT_VARIABLE_NAME);\r
 \r
   //\r
   // Validate OSIndication related variable.\r
@@ -1019,7 +1018,6 @@ BdsEntry (
   PERF_END   (NULL, "PlatformBootManagerAfterConsole", "BDS", 0);\r
 \r
   DEBUG_CODE (\r
-    UINTN                             Index;\r
     EFI_BOOT_MANAGER_LOAD_OPTION_TYPE LoadOptionType;\r
     DEBUG ((EFI_D_INFO, "[Bds]=============Begin Load Options Dumping ...=============\n"));\r
     for (LoadOptionType = 0; LoadOptionType < LoadOptionTypeMax; LoadOptionType++) {\r
@@ -1047,7 +1045,7 @@ BdsEntry (
   //\r
   DataSize = sizeof (UINT64);\r
   Status = gRT->GetVariable (\r
-                  L"OsIndications",\r
+                  EFI_OS_INDICATIONS_VARIABLE_NAME,\r
                   &gEfiGlobalVariableGuid,\r
                   NULL,\r
                   &DataSize,\r
@@ -1064,7 +1062,7 @@ BdsEntry (
   if (BootFwUi) {\r
     OsIndication &= ~((UINT64) EFI_OS_INDICATIONS_BOOT_TO_FW_UI);\r
     Status = gRT->SetVariable (\r
-               L"OsIndications",\r
+               EFI_OS_INDICATIONS_VARIABLE_NAME,\r
                &gEfiGlobalVariableGuid,\r
                EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,\r
                sizeof(UINT64),\r