1. Update Generic BDS part to use dynamic PCD to set console output mode instead of use L"ConOutMode" and gEfiGenericPlatformVariableGuid to set console output mode.
2. Drop the menu item of set Primary Video to PCI or AGP. If some platform wishes to set AGP video option, platform BDS code needs to add this item. 3. Minor update to use Raw String to performance logging git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7575 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -31,7 +31,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#include <Protocol/UgaDraw.h>
|
#include <Protocol/UgaDraw.h>
|
||||||
#include <Protocol/BlockIo.h>
|
#include <Protocol/BlockIo.h>
|
||||||
#include <Guid/GlobalVariable.h>
|
#include <Guid/GlobalVariable.h>
|
||||||
#include <Guid/GenericPlatformVariable.h>
|
|
||||||
#include <Guid/CapsuleVendor.h>
|
#include <Guid/CapsuleVendor.h>
|
||||||
#include <Protocol/ConsoleControl.h>
|
#include <Protocol/ConsoleControl.h>
|
||||||
#include <Protocol/GenericMemoryTest.h>
|
#include <Protocol/GenericMemoryTest.h>
|
||||||
@ -44,7 +43,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#include <Protocol/SerialIo.h>
|
#include <Protocol/SerialIo.h>
|
||||||
#include <Protocol/LegacyBios.h>
|
#include <Protocol/LegacyBios.h>
|
||||||
#include <Protocol/SimpleTextInEx.h>
|
#include <Protocol/SimpleTextInEx.h>
|
||||||
#include <Protocol/Performance.h>
|
|
||||||
|
|
||||||
#include <Library/UefiDriverEntryPoint.h>
|
#include <Library/UefiDriverEntryPoint.h>
|
||||||
#include <Library/PrintLib.h>
|
#include <Library/PrintLib.h>
|
||||||
|
@ -131,8 +131,6 @@
|
|||||||
gEfiBootStateGuid ## SOMETIMES_PRODUCES (Produce when status has not been set yet) ## Variable:L"BootState" (Indicate the state of last boot)
|
gEfiBootStateGuid ## SOMETIMES_PRODUCES (Produce when status has not been set yet) ## Variable:L"BootState" (Indicate the state of last boot)
|
||||||
gEfiFileSystemVolumeLabelInfoIdGuid ## CONSUMES ## GUID (Indicate the information type is volume)
|
gEfiFileSystemVolumeLabelInfoIdGuid ## CONSUMES ## GUID (Indicate the information type is volume)
|
||||||
gEfiFileInfoGuid ## CONSUMES ## GUID (Indicate the information type is file)
|
gEfiFileInfoGuid ## CONSUMES ## GUID (Indicate the information type is file)
|
||||||
gEfiGenericPlatformVariableGuid ## PRODUCES ## Variable:L"ConOutMode" (The mode of console out device)
|
|
||||||
## PRODUCES ## Variable:L"VBIOS" (The option of video BIOS)
|
|
||||||
gEfiMiscSubClassGuid ## CONSUMES ## GUID (Indicate the datahub for holding misc sub class record)
|
gEfiMiscSubClassGuid ## CONSUMES ## GUID (Indicate the datahub for holding misc sub class record)
|
||||||
gEfiMemorySubClassGuid ## CONSUMES ## GUID (Indicate the datahub for holding memory record)
|
gEfiMemorySubClassGuid ## CONSUMES ## GUID (Indicate the datahub for holding memory record)
|
||||||
gEfiProcessorSubClassGuid ## CONSUMES ## GUID (Indicate the datahub for holding processor record)
|
gEfiProcessorSubClassGuid ## CONSUMES ## GUID (Indicate the datahub for holding processor record)
|
||||||
@ -169,6 +167,8 @@
|
|||||||
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLangCodes
|
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLangCodes
|
||||||
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang
|
gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdHardwareErrorRecordLevel
|
gEfiMdeModulePkgTokenSpaceGuid.PcdHardwareErrorRecordLevel
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutRow
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdConOutColumn
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
gEfiHiiDatabaseProtocolGuid
|
gEfiHiiDatabaseProtocolGuid
|
||||||
|
@ -288,8 +288,8 @@ BdsEntry (
|
|||||||
//
|
//
|
||||||
// Insert the performance probe
|
// Insert the performance probe
|
||||||
//
|
//
|
||||||
PERF_END (0, DXE_TOK, NULL, 0);
|
PERF_END (0, "DXE", NULL, 0);
|
||||||
PERF_START (0, BDS_TOK, NULL, 0);
|
PERF_START (0, "BDS", NULL, 0);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Initialize the global system boot option and driver option
|
// Initialize the global system boot option and driver option
|
||||||
|
@ -918,25 +918,20 @@ GetConsoleOutMode (
|
|||||||
UINTN Mode;
|
UINTN Mode;
|
||||||
UINTN MaxMode;
|
UINTN MaxMode;
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
CONSOLE_OUT_MODE *ModeInfo;
|
|
||||||
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ConOut;
|
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ConOut;
|
||||||
|
|
||||||
ConOut = gST->ConOut;
|
ConOut = gST->ConOut;
|
||||||
MaxMode = (UINTN) (ConOut->Mode->MaxMode);
|
MaxMode = (UINTN) (ConOut->Mode->MaxMode);
|
||||||
ModeInfo = EfiLibGetVariable (VAR_CON_OUT_MODE, &gEfiGenericPlatformVariableGuid);
|
|
||||||
|
|
||||||
if (ModeInfo != NULL) {
|
CurrentCol = PcdGet32 (PcdConOutColumn);
|
||||||
CurrentCol = ModeInfo->Column;
|
CurrentRow = PcdGet32 (PcdConOutRow);
|
||||||
CurrentRow = ModeInfo->Row;
|
for (Mode = 0; Mode < MaxMode; Mode++) {
|
||||||
for (Mode = 0; Mode < MaxMode; Mode++) {
|
Status = ConOut->QueryMode (ConOut, Mode, &Col, &Row);
|
||||||
Status = ConOut->QueryMode (ConOut, Mode, &Col, &Row);
|
if (!EFI_ERROR(Status)) {
|
||||||
if (!EFI_ERROR(Status)) {
|
if (CurrentCol == Col && CurrentRow == Row) {
|
||||||
if (CurrentCol == Col && CurrentRow == Row) {
|
CallbackData->BmmFakeNvData.ConsoleOutMode = (UINT16) Mode;
|
||||||
CallbackData->BmmFakeNvData.ConsoleOutMode = (UINT16) Mode;
|
break;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FreePool (ModeInfo);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1399,18 +1399,10 @@ Var_UpdateConMode (
|
|||||||
Mode = CallbackData->BmmFakeNvData.ConsoleOutMode;
|
Mode = CallbackData->BmmFakeNvData.ConsoleOutMode;
|
||||||
|
|
||||||
Status = gST->ConOut->QueryMode (gST->ConOut, Mode, &(ModeInfo.Column), &(ModeInfo.Row));
|
Status = gST->ConOut->QueryMode (gST->ConOut, Mode, &(ModeInfo.Column), &(ModeInfo.Row));
|
||||||
if (EFI_ERROR(Status)) {
|
if (!EFI_ERROR(Status)) {
|
||||||
ModeInfo.Column = 80;
|
PcdSet32 (PcdConOutColumn, (UINT32) ModeInfo.Column);
|
||||||
ModeInfo.Row = 25;
|
PcdSet32 (PcdConOutRow, (UINT32) ModeInfo.Row);
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = gRT->SetVariable (
|
return EFI_SUCCESS;
|
||||||
VAR_CON_OUT_MODE,
|
|
||||||
&gEfiGenericPlatformVariableGuid,
|
|
||||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,
|
|
||||||
sizeof (CONSOLE_OUT_MODE),
|
|
||||||
&ModeInfo
|
|
||||||
);
|
|
||||||
|
|
||||||
return Status;
|
|
||||||
}
|
}
|
||||||
|
@ -67,44 +67,18 @@ DeviceManagerCallback (
|
|||||||
OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
|
OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
DEVICE_MANAGER_CALLBACK_DATA *PrivateData;
|
|
||||||
|
|
||||||
if ((Value == NULL) || (ActionRequest == NULL)) {
|
if ((Value == NULL) || (ActionRequest == NULL)) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
PrivateData = DEVICE_MANAGER_CALLBACK_DATA_FROM_THIS (This);
|
|
||||||
|
|
||||||
switch (QuestionId) {
|
gCallbackKey = QuestionId;
|
||||||
case DEVICE_MANAGER_KEY_VBIOS:
|
|
||||||
PrivateData->VideoBios = Value->u8;
|
|
||||||
gRT->SetVariable (
|
|
||||||
L"VBIOS",
|
|
||||||
&gEfiGenericPlatformVariableGuid,
|
|
||||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,
|
|
||||||
sizeof (UINT8),
|
|
||||||
&PrivateData->VideoBios
|
|
||||||
);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Tell browser not to ask for confirmation of changes,
|
// Request to exit SendForm(), so as to switch to selected form
|
||||||
// since we have already applied.
|
//
|
||||||
//
|
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
|
||||||
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
//
|
|
||||||
// The key corresponds the Handle Index which was requested to be displayed
|
|
||||||
//
|
|
||||||
gCallbackKey = QuestionId;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Request to exit SendForm(), so as to switch to selected form
|
|
||||||
//
|
|
||||||
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -186,9 +160,6 @@ CallDeviceManager (
|
|||||||
EFI_HII_UPDATE_DATA UpdateData[MENU_ITEM_NUM];
|
EFI_HII_UPDATE_DATA UpdateData[MENU_ITEM_NUM];
|
||||||
EFI_STRING_ID Token;
|
EFI_STRING_ID Token;
|
||||||
EFI_STRING_ID TokenHelp;
|
EFI_STRING_ID TokenHelp;
|
||||||
IFR_OPTION *IfrOptionList;
|
|
||||||
UINT8 *VideoOption;
|
|
||||||
UINTN VideoOptionSize;
|
|
||||||
EFI_HII_HANDLE *HiiHandles;
|
EFI_HII_HANDLE *HiiHandles;
|
||||||
UINTN HandleBufferLength;
|
UINTN HandleBufferLength;
|
||||||
UINTN NumberOfHiiHandles;
|
UINTN NumberOfHiiHandles;
|
||||||
@ -199,8 +170,6 @@ CallDeviceManager (
|
|||||||
EFI_BROWSER_ACTION_REQUEST ActionRequest;
|
EFI_BROWSER_ACTION_REQUEST ActionRequest;
|
||||||
EFI_HII_PACKAGE_LIST_HEADER *PackageList;
|
EFI_HII_PACKAGE_LIST_HEADER *PackageList;
|
||||||
|
|
||||||
IfrOptionList = NULL;
|
|
||||||
VideoOption = NULL;
|
|
||||||
HiiHandles = NULL;
|
HiiHandles = NULL;
|
||||||
HandleBufferLength = 0;
|
HandleBufferLength = 0;
|
||||||
|
|
||||||
@ -296,47 +265,6 @@ CallDeviceManager (
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Add oneof for video BIOS selection
|
|
||||||
//
|
|
||||||
VideoOption = BdsLibGetVariableAndSize (
|
|
||||||
L"VBIOS",
|
|
||||||
&gEfiGenericPlatformVariableGuid,
|
|
||||||
&VideoOptionSize
|
|
||||||
);
|
|
||||||
if (VideoOption == NULL) {
|
|
||||||
gDeviceManagerPrivate.VideoBios = 0;
|
|
||||||
} else {
|
|
||||||
gDeviceManagerPrivate.VideoBios = VideoOption[0];
|
|
||||||
FreePool (VideoOption);
|
|
||||||
}
|
|
||||||
|
|
||||||
ASSERT (gDeviceManagerPrivate.VideoBios <= 1);
|
|
||||||
|
|
||||||
IfrOptionList = AllocatePool (2 * sizeof (IFR_OPTION));
|
|
||||||
ASSERT (IfrOptionList != NULL);
|
|
||||||
IfrOptionList[0].Flags = 0;
|
|
||||||
IfrOptionList[0].StringToken = STRING_TOKEN (STR_ONE_OF_PCI);
|
|
||||||
IfrOptionList[0].Value.u8 = 0;
|
|
||||||
IfrOptionList[1].Flags = 0;
|
|
||||||
IfrOptionList[1].StringToken = STRING_TOKEN (STR_ONE_OF_AGP);
|
|
||||||
IfrOptionList[1].Value.u8 = 1;
|
|
||||||
IfrOptionList[gDeviceManagerPrivate.VideoBios].Flags |= EFI_IFR_OPTION_DEFAULT;
|
|
||||||
|
|
||||||
UpdateData[0].Offset = 0;
|
|
||||||
CreateOneOfOpCode (
|
|
||||||
DEVICE_MANAGER_KEY_VBIOS,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
STRING_TOKEN (STR_ONE_OF_VBIOS),
|
|
||||||
STRING_TOKEN (STR_ONE_OF_VBIOS_HELP),
|
|
||||||
EFI_IFR_FLAG_CALLBACK,
|
|
||||||
EFI_IFR_NUMERIC_SIZE_1,
|
|
||||||
IfrOptionList,
|
|
||||||
2,
|
|
||||||
&UpdateData[0]
|
|
||||||
);
|
|
||||||
|
|
||||||
IfrLibUpdateForm (
|
IfrLibUpdateForm (
|
||||||
HiiHandle,
|
HiiHandle,
|
||||||
&mDeviceManagerGuid,
|
&mDeviceManagerGuid,
|
||||||
|
Binary file not shown.
@ -26,7 +26,7 @@
|
|||||||
#define LABEL_END 0xffff
|
#define LABEL_END 0xffff
|
||||||
|
|
||||||
#define DEVICE_MANAGER_CLASS 0x0000
|
#define DEVICE_MANAGER_CLASS 0x0000
|
||||||
#define FRONT_PAGE_SUBCLASS 0x0003
|
#define FRONT_PAGE_SUBCLASS 0x0003
|
||||||
|
|
||||||
#define DEVICE_MANAGER_FORM_ID 0x1000
|
#define DEVICE_MANAGER_FORM_ID 0x1000
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user