#include <Protocol/UgaDraw.h>\r
#include <Protocol/BlockIo.h>\r
#include <Guid/GlobalVariable.h>\r
-#include <Guid/GenericPlatformVariable.h>\r
#include <Guid/CapsuleVendor.h>\r
#include <Protocol/ConsoleControl.h>\r
#include <Protocol/GenericMemoryTest.h>\r
#include <Protocol/SerialIo.h>\r
#include <Protocol/LegacyBios.h>\r
#include <Protocol/SimpleTextInEx.h>\r
-#include <Protocol/Performance.h>\r
\r
#include <Library/UefiDriverEntryPoint.h>\r
#include <Library/PrintLib.h>\r
gEfiBootStateGuid ## SOMETIMES_PRODUCES (Produce when status has not been set yet) ## Variable:L"BootState" (Indicate the state of last boot)\r
gEfiFileSystemVolumeLabelInfoIdGuid ## CONSUMES ## GUID (Indicate the information type is volume)\r
gEfiFileInfoGuid ## CONSUMES ## GUID (Indicate the information type is file)\r
- gEfiGenericPlatformVariableGuid ## PRODUCES ## Variable:L"ConOutMode" (The mode of console out device)\r
- ## PRODUCES ## Variable:L"VBIOS" (The option of video BIOS)\r
gEfiMiscSubClassGuid ## CONSUMES ## GUID (Indicate the datahub for holding misc sub class record)\r
gEfiMemorySubClassGuid ## CONSUMES ## GUID (Indicate the datahub for holding memory record)\r
gEfiProcessorSubClassGuid ## CONSUMES ## GUID (Indicate the datahub for holding processor record)\r
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLangCodes\r
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang\r
gEfiMdeModulePkgTokenSpaceGuid.PcdHardwareErrorRecordLevel\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn\r
\r
[Depex]\r
gEfiHiiDatabaseProtocolGuid\r
//\r
// Insert the performance probe\r
//\r
- PERF_END (0, DXE_TOK, NULL, 0);\r
- PERF_START (0, BDS_TOK, NULL, 0);\r
+ PERF_END (0, "DXE", NULL, 0);\r
+ PERF_START (0, "BDS", NULL, 0);\r
\r
//\r
// Initialize the global system boot option and driver option\r
UINTN Mode;\r
UINTN MaxMode;\r
EFI_STATUS Status;\r
- CONSOLE_OUT_MODE *ModeInfo;\r
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ConOut;\r
\r
ConOut = gST->ConOut;\r
MaxMode = (UINTN) (ConOut->Mode->MaxMode);\r
- ModeInfo = EfiLibGetVariable (VAR_CON_OUT_MODE, &gEfiGenericPlatformVariableGuid);\r
-\r
- if (ModeInfo != NULL) {\r
- CurrentCol = ModeInfo->Column;\r
- CurrentRow = ModeInfo->Row;\r
- for (Mode = 0; Mode < MaxMode; Mode++) {\r
- Status = ConOut->QueryMode (ConOut, Mode, &Col, &Row);\r
- if (!EFI_ERROR(Status)) {\r
- if (CurrentCol == Col && CurrentRow == Row) {\r
- CallbackData->BmmFakeNvData.ConsoleOutMode = (UINT16) Mode;\r
- break;\r
- }\r
+\r
+ CurrentCol = PcdGet32 (PcdConOutColumn);\r
+ CurrentRow = PcdGet32 (PcdConOutRow);\r
+ for (Mode = 0; Mode < MaxMode; Mode++) {\r
+ Status = ConOut->QueryMode (ConOut, Mode, &Col, &Row);\r
+ if (!EFI_ERROR(Status)) {\r
+ if (CurrentCol == Col && CurrentRow == Row) {\r
+ CallbackData->BmmFakeNvData.ConsoleOutMode = (UINT16) Mode;\r
+ break;\r
}\r
}\r
- FreePool (ModeInfo);\r
}\r
}\r
Mode = CallbackData->BmmFakeNvData.ConsoleOutMode;\r
\r
Status = gST->ConOut->QueryMode (gST->ConOut, Mode, &(ModeInfo.Column), &(ModeInfo.Row));\r
- if (EFI_ERROR(Status)) {\r
- ModeInfo.Column = 80;\r
- ModeInfo.Row = 25;\r
+ if (!EFI_ERROR(Status)) {\r
+ PcdSet32 (PcdConOutColumn, (UINT32) ModeInfo.Column);\r
+ PcdSet32 (PcdConOutRow, (UINT32) ModeInfo.Row);\r
}\r
\r
- Status = gRT->SetVariable (\r
- VAR_CON_OUT_MODE,\r
- &gEfiGenericPlatformVariableGuid,\r
- EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,\r
- sizeof (CONSOLE_OUT_MODE),\r
- &ModeInfo\r
- );\r
-\r
- return Status;\r
+ return EFI_SUCCESS;\r
}\r
OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest\r
)\r
{\r
- DEVICE_MANAGER_CALLBACK_DATA *PrivateData;\r
-\r
if ((Value == NULL) || (ActionRequest == NULL)) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
- PrivateData = DEVICE_MANAGER_CALLBACK_DATA_FROM_THIS (This);\r
\r
- switch (QuestionId) {\r
- case DEVICE_MANAGER_KEY_VBIOS:\r
- PrivateData->VideoBios = Value->u8;\r
- gRT->SetVariable (\r
- L"VBIOS",\r
- &gEfiGenericPlatformVariableGuid,\r
- EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,\r
- sizeof (UINT8),\r
- &PrivateData->VideoBios\r
- );\r
+ gCallbackKey = QuestionId;\r
\r
- //\r
- // Tell browser not to ask for confirmation of changes,\r
- // since we have already applied.\r
- //\r
- *ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT;\r
- break;\r
+ //\r
+ // Request to exit SendForm(), so as to switch to selected form\r
+ //\r
+ *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;\r
\r
- default:\r
- //\r
- // The key corresponds the Handle Index which was requested to be displayed\r
- //\r
- gCallbackKey = QuestionId;\r
-\r
- //\r
- // Request to exit SendForm(), so as to switch to selected form\r
- //\r
- *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;\r
- break;\r
- }\r
\r
return EFI_SUCCESS;\r
}\r
EFI_HII_UPDATE_DATA UpdateData[MENU_ITEM_NUM];\r
EFI_STRING_ID Token;\r
EFI_STRING_ID TokenHelp;\r
- IFR_OPTION *IfrOptionList;\r
- UINT8 *VideoOption;\r
- UINTN VideoOptionSize;\r
EFI_HII_HANDLE *HiiHandles;\r
UINTN HandleBufferLength;\r
UINTN NumberOfHiiHandles;\r
EFI_BROWSER_ACTION_REQUEST ActionRequest;\r
EFI_HII_PACKAGE_LIST_HEADER *PackageList;\r
\r
- IfrOptionList = NULL;\r
- VideoOption = NULL;\r
HiiHandles = NULL;\r
HandleBufferLength = 0;\r
\r
);\r
}\r
\r
- //\r
- // Add oneof for video BIOS selection\r
- //\r
- VideoOption = BdsLibGetVariableAndSize (\r
- L"VBIOS",\r
- &gEfiGenericPlatformVariableGuid,\r
- &VideoOptionSize\r
- );\r
- if (VideoOption == NULL) {\r
- gDeviceManagerPrivate.VideoBios = 0;\r
- } else {\r
- gDeviceManagerPrivate.VideoBios = VideoOption[0];\r
- FreePool (VideoOption);\r
- }\r
-\r
- ASSERT (gDeviceManagerPrivate.VideoBios <= 1);\r
-\r
- IfrOptionList = AllocatePool (2 * sizeof (IFR_OPTION));\r
- ASSERT (IfrOptionList != NULL);\r
- IfrOptionList[0].Flags = 0;\r
- IfrOptionList[0].StringToken = STRING_TOKEN (STR_ONE_OF_PCI);\r
- IfrOptionList[0].Value.u8 = 0;\r
- IfrOptionList[1].Flags = 0;\r
- IfrOptionList[1].StringToken = STRING_TOKEN (STR_ONE_OF_AGP);\r
- IfrOptionList[1].Value.u8 = 1;\r
- IfrOptionList[gDeviceManagerPrivate.VideoBios].Flags |= EFI_IFR_OPTION_DEFAULT;\r
-\r
- UpdateData[0].Offset = 0;\r
- CreateOneOfOpCode (\r
- DEVICE_MANAGER_KEY_VBIOS,\r
- 0,\r
- 0,\r
- STRING_TOKEN (STR_ONE_OF_VBIOS),\r
- STRING_TOKEN (STR_ONE_OF_VBIOS_HELP),\r
- EFI_IFR_FLAG_CALLBACK,\r
- EFI_IFR_NUMERIC_SIZE_1,\r
- IfrOptionList,\r
- 2,\r
- &UpdateData[0]\r
- );\r
-\r
IfrLibUpdateForm (\r
HiiHandle,\r
&mDeviceManagerGuid,\r
#define LABEL_END 0xffff\r
\r
#define DEVICE_MANAGER_CLASS 0x0000\r
-#define FRONT_PAGE_SUBCLASS 0x0003\r
+#define FRONT_PAGE_SUBCLASS 0x0003\r
\r
#define DEVICE_MANAGER_FORM_ID 0x1000\r
\r