EDKII:Display engine should not depend on the framework code
Display engine base on class opcode to detect whether in front page.Now remove class/subclass and use FormsetGuid or ClassGuid to judge whether in front page Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17590 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// Browser formset.
|
// Browser formset.
|
||||||
//
|
//
|
||||||
// Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
|
// Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||||
// This program and the accompanying materials
|
// This program and the accompanying materials
|
||||||
// are licensed and made available under the terms and conditions of the BSD License
|
// are licensed and made available under the terms and conditions of the BSD License
|
||||||
// which accompanies this distribution. The full text of the license may be found at
|
// which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -41,8 +41,6 @@ formset
|
|||||||
title = STRING_TOKEN(STR_FRONT_PAGE_TITLE),
|
title = STRING_TOKEN(STR_FRONT_PAGE_TITLE),
|
||||||
help = STRING_TOKEN(STR_NULL_STRING),
|
help = STRING_TOKEN(STR_NULL_STRING),
|
||||||
classguid = FRONT_PAGE_FORMSET_GUID,
|
classguid = FRONT_PAGE_FORMSET_GUID,
|
||||||
class = FRONT_PAGE_CLASS,
|
|
||||||
subclass = FRONT_PAGE_SUBCLASS,
|
|
||||||
|
|
||||||
form formid = FRONT_PAGE_FORM_ID,
|
form formid = FRONT_PAGE_FORM_ID,
|
||||||
title = STRING_TOKEN(STR_FRONT_PAGE_TITLE);
|
title = STRING_TOKEN(STR_FRONT_PAGE_TITLE);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
## @file
|
## @file
|
||||||
# Customize display library used by display engine.
|
# Customize display library used by display engine.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
# Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||||
#
|
#
|
||||||
# This program and the accompanying materials
|
# This program and the accompanying materials
|
||||||
# are licensed and made available under the terms and conditions of the BSD License
|
# are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -61,4 +61,5 @@
|
|||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserSubtitleTextColor ## CONSUMES
|
gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserSubtitleTextColor ## CONSUMES
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldTextColor ## CONSUMES
|
gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldTextColor ## CONSUMES
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldTextHighlightColor ## CONSUMES
|
gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldTextHighlightColor ## CONSUMES
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldBackgroundHighlightColor ## CONSUMES
|
gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldBackgroundHighlightColor ## CONSUMES
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFrontPageFormSetGuid ## CONSUMES
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
This library class defines a set of interfaces to customize Display module
|
This library class defines a set of interfaces to customize Display module
|
||||||
|
|
||||||
Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2013-2015, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials are licensed and made available under
|
This program and the accompanying materials are licensed and made available under
|
||||||
the terms and conditions of the BSD License that accompanies this distribution.
|
the terms and conditions of the BSD License that accompanies this distribution.
|
||||||
The full text of the license may be found at
|
The full text of the license may be found at
|
||||||
@ -256,7 +256,32 @@ ProcessUserOpcode(
|
|||||||
IN EFI_IFR_OP_HEADER *OpCodeData
|
IN EFI_IFR_OP_HEADER *OpCodeData
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
EFI_GUID * ClassGuid;
|
||||||
|
UINT8 ClassGuidNum;
|
||||||
|
|
||||||
|
ClassGuid = NULL;
|
||||||
|
ClassGuidNum = 0;
|
||||||
|
|
||||||
switch (OpCodeData->OpCode) {
|
switch (OpCodeData->OpCode) {
|
||||||
|
case EFI_IFR_FORM_SET_OP:
|
||||||
|
//
|
||||||
|
// process the statement outside of form,if it is formset op, get its formsetguid or classguid and compared with gFrontPageFormSetGuid
|
||||||
|
//
|
||||||
|
if (CompareGuid((EFI_GUID*)PcdGetPtr (PcdFrontPageFormSetGuid),(EFI_GUID*)&((EFI_IFR_FORM_SET *) OpCodeData)->Guid)){
|
||||||
|
gClassOfVfr = FORMSET_CLASS_FRONT_PAGE;
|
||||||
|
} else{
|
||||||
|
ClassGuidNum = (UINT8)(((EFI_IFR_FORM_SET *)OpCodeData)->Flags & 0x3);
|
||||||
|
ClassGuid = (EFI_GUID *)(VOID *)((UINT8 *)OpCodeData + sizeof (EFI_IFR_FORM_SET));
|
||||||
|
while (ClassGuidNum-- > 0){
|
||||||
|
if (CompareGuid((EFI_GUID*)PcdGetPtr (PcdFrontPageFormSetGuid),ClassGuid)){
|
||||||
|
gClassOfVfr = FORMSET_CLASS_FRONT_PAGE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
ClassGuid ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case EFI_IFR_GUID_OP:
|
case EFI_IFR_GUID_OP:
|
||||||
if (CompareGuid (&gEfiIfrTianoGuid, (EFI_GUID *)((CHAR8*) OpCodeData + sizeof (EFI_IFR_OP_HEADER)))) {
|
if (CompareGuid (&gEfiIfrTianoGuid, (EFI_GUID *)((CHAR8*) OpCodeData + sizeof (EFI_IFR_OP_HEADER)))) {
|
||||||
//
|
//
|
||||||
|
@ -968,6 +968,10 @@
|
|||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutRow|25|UINT32|0x4000000e
|
gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutRow|25|UINT32|0x4000000e
|
||||||
|
|
||||||
[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
|
[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
|
||||||
|
## This PCD points to the front page formset GUID
|
||||||
|
# Compare the FormsetGuid or ClassGuid with this PCD value can detect whether in front page
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFrontPageFormSetGuid|{ 0xbc, 0x30, 0x0c, 0x9e,0x06, 0x3f, 0xa6, 0x4b, 0x82, 0x88, 0x9, 0x17, 0x9b, 0x85, 0x5d, 0xbe }|VOID*|0x0001006e
|
||||||
|
|
||||||
## Base address of the NV variable range in flash device.
|
## Base address of the NV variable range in flash device.
|
||||||
# @Prompt Base address of flash NV variable range.
|
# @Prompt Base address of flash NV variable range.
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x0|UINT32|0x30000001
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x0|UINT32|0x30000001
|
||||||
|
@ -1709,6 +1709,7 @@ ParseOpCodes (
|
|||||||
|
|
||||||
CopyMem (&FormSet->FormSetTitle, &((EFI_IFR_FORM_SET *) OpCodeData)->FormSetTitle, sizeof (EFI_STRING_ID));
|
CopyMem (&FormSet->FormSetTitle, &((EFI_IFR_FORM_SET *) OpCodeData)->FormSetTitle, sizeof (EFI_STRING_ID));
|
||||||
CopyMem (&FormSet->Help, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID));
|
CopyMem (&FormSet->Help, &((EFI_IFR_FORM_SET *) OpCodeData)->Help, sizeof (EFI_STRING_ID));
|
||||||
|
FormSet->OpCode = (EFI_IFR_OP_HEADER *) OpCodeData;//save the opcode address of formset
|
||||||
|
|
||||||
if (OpCodeLength > OFFSET_OF (EFI_IFR_FORM_SET, Flags)) {
|
if (OpCodeLength > OFFSET_OF (EFI_IFR_FORM_SET, Flags)) {
|
||||||
//
|
//
|
||||||
|
@ -545,6 +545,21 @@ AddStatementToDisplayForm (
|
|||||||
InsertTailList(&gDisplayFormData.StatementListOSF, &DisplayStatement->DisplayLink);
|
InsertTailList(&gDisplayFormData.StatementListOSF, &DisplayStatement->DisplayLink);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// treat formset as statement outside the form,get its opcode.
|
||||||
|
//
|
||||||
|
DisplayStatement = AllocateZeroPool (sizeof (FORM_DISPLAY_ENGINE_STATEMENT));
|
||||||
|
ASSERT (DisplayStatement != NULL);
|
||||||
|
|
||||||
|
DisplayStatement->Signature = FORM_DISPLAY_ENGINE_STATEMENT_SIGNATURE;
|
||||||
|
DisplayStatement->Version = FORM_DISPLAY_ENGINE_STATEMENT_VERSION_1;
|
||||||
|
DisplayStatement->OpCode = gCurrentSelection->FormSet->OpCode;
|
||||||
|
|
||||||
|
InitializeListHead (&DisplayStatement->NestStatementList);
|
||||||
|
InitializeListHead (&DisplayStatement->OptionListHead);
|
||||||
|
|
||||||
|
InsertTailList(&gDisplayFormData.StatementListOSF, &DisplayStatement->DisplayLink);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Process the statement in this form.
|
// Process the statement in this form.
|
||||||
//
|
//
|
||||||
|
@ -454,6 +454,7 @@ typedef struct {
|
|||||||
UINT16 Class; // Tiano extended Class code
|
UINT16 Class; // Tiano extended Class code
|
||||||
UINT16 SubClass; // Tiano extended Subclass code
|
UINT16 SubClass; // Tiano extended Subclass code
|
||||||
EFI_IMAGE_ID ImageId;
|
EFI_IMAGE_ID ImageId;
|
||||||
|
EFI_IFR_OP_HEADER *OpCode; //mainly for formset op to get ClassGuid
|
||||||
|
|
||||||
FORM_BROWSER_STATEMENT *StatementBuffer; // Buffer for all Statements and Questions
|
FORM_BROWSER_STATEMENT *StatementBuffer; // Buffer for all Statements and Questions
|
||||||
EXPRESSION_OPCODE *ExpressionBuffer; // Buffer for all Expression OpCode
|
EXPRESSION_OPCODE *ExpressionBuffer; // Buffer for all Expression OpCode
|
||||||
|
Reference in New Issue
Block a user