[edk2-devel] [PATCH V3 3/4] UefiCpuPkg: Update EFI_MEMORY_CACHETYPE_MASK definition
Add EFI_MEMORY_WP attribute to EFI_MEMORY_CACHETYPE_MASK definition. Signed-off-by: Oleksiy Yakovlev --- UefiCpuPkg/CpuDxe/CpuDxe.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.h b/UefiCpuPkg/CpuDxe/CpuDxe.h index 9299eaa..b30a896 100644 --- a/UefiCpuPkg/CpuDxe/CpuDxe.h +++ b/UefiCpuPkg/CpuDxe/CpuDxe.h @@ -43,7 +43,8 @@ EFI_MEMORY_WC | \ EFI_MEMORY_WT | \ EFI_MEMORY_WB | \ - EFI_MEMORY_UCE \ + EFI_MEMORY_UCE | \ + EFI_MEMORY_WP\ ) #define EFI_MEMORY_PAGETYPE_MASK (EFI_MEMORY_RP | \ -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#61995): https://edk2.groups.io/g/devel/message/61995 Mute This Topic: https://groups.io/mt/75267366/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V3 2/4] MdeModulePkg: Add New Memory Attributes
Add usage of EFI_MEMORY_SP and EFI_MEMORY_CPU_CRYPTO attributes introduced in UEFI 2.8 (UEFI 2.8, mantis 1919 and 1872) Use attributes bitmasks, defined in MdePkg. Signed-off-by: Oleksiy Yakovlev Reviewed-by: Laszlo Ersek --- MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 11 ++- MdeModulePkg/Core/Dxe/Mem/Page.c | 9 +++-- MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c | 7 ++- MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c| 10 ++ 4 files changed, 9 insertions(+), 28 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c index 74f3b1b..2d8c076 100644 --- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c +++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c @@ -35,13 +35,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define PRESENT_MEMORY_ATTRIBUTES (EFI_RESOURCE_ATTRIBUTE_PRESENT) -#define EXCLUSIVE_MEMORY_ATTRIBUTES (EFI_MEMORY_UC | EFI_MEMORY_WC | \ - EFI_MEMORY_WT | EFI_MEMORY_WB | \ - EFI_MEMORY_WP | EFI_MEMORY_UCE) - -#define NONEXCLUSIVE_MEMORY_ATTRIBUTES (EFI_MEMORY_XP | EFI_MEMORY_RP | \ -EFI_MEMORY_RO) - // // Module Variables // @@ -665,7 +658,7 @@ ConverToCpuArchAttributes ( { UINT64 CpuArchAttributes; - CpuArchAttributes = Attributes & NONEXCLUSIVE_MEMORY_ATTRIBUTES; + CpuArchAttributes = Attributes & EFI_MEMORY_ATTRIBUTE_MASK; if ( (Attributes & EFI_MEMORY_UC) == EFI_MEMORY_UC) { CpuArchAttributes |= EFI_MEMORY_UC; @@ -951,7 +944,7 @@ CoreConvertSpace ( // Keep original CPU arch attributes when caller just calls // SetMemorySpaceAttributes() with none CPU arch attributes (for example, RUNTIME). // -Attributes |= (Entry->Attributes & (EXCLUSIVE_MEMORY_ATTRIBUTES | NONEXCLUSIVE_MEMORY_ATTRIBUTES)); +Attributes |= (Entry->Attributes & (EFI_CACHE_ATTRIBUTE_MASK | EFI_MEMORY_ATTRIBUTE_MASK)); } Entry->Attributes = Attributes; break; diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c b/MdeModulePkg/Core/Dxe/Mem/Page.c index 1f0e3d9..2c2c9cd 100644 --- a/MdeModulePkg/Core/Dxe/Mem/Page.c +++ b/MdeModulePkg/Core/Dxe/Mem/Page.c @@ -1857,8 +1857,7 @@ CoreGetMemoryMap ( MemoryMap->VirtualStart = 0; MemoryMap->NumberOfPages = RShiftU64 ((MergeGcdMapEntry.EndAddress - MergeGcdMapEntry.BaseAddress + 1), EFI_PAGE_SHIFT); MemoryMap->Attribute = (MergeGcdMapEntry.Attributes & ~EFI_MEMORY_PORT_IO) | -(MergeGcdMapEntry.Capabilities & (EFI_MEMORY_RP | EFI_MEMORY_WP | EFI_MEMORY_XP | EFI_MEMORY_RO | -EFI_MEMORY_UC | EFI_MEMORY_UCE | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB)); +(MergeGcdMapEntry.Capabilities & (EFI_CACHE_ATTRIBUTE_MASK | EFI_MEMORY_ATTRIBUTE_MASK)); if (MergeGcdMapEntry.GcdMemoryType == EfiGcdMemoryTypeReserved) { MemoryMap->Type = EfiReservedMemoryType; @@ -1892,8 +1891,7 @@ CoreGetMemoryMap ( MemoryMap->VirtualStart = 0; MemoryMap->NumberOfPages = RShiftU64 ((MergeGcdMapEntry.EndAddress - MergeGcdMapEntry.BaseAddress + 1), EFI_PAGE_SHIFT); MemoryMap->Attribute = MergeGcdMapEntry.Attributes | EFI_MEMORY_NV | -(MergeGcdMapEntry.Capabilities & (EFI_MEMORY_RP | EFI_MEMORY_WP | EFI_MEMORY_XP | EFI_MEMORY_RO | -EFI_MEMORY_UC | EFI_MEMORY_UCE | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB)); +(MergeGcdMapEntry.Capabilities & (EFI_CACHE_ATTRIBUTE_MASK | EFI_MEMORY_ATTRIBUTE_MASK)); MemoryMap->Type = EfiPersistentMemory; // @@ -1935,8 +1933,7 @@ CoreGetMemoryMap ( MemoryMapEnd = MemoryMap; MemoryMap = MemoryMapStart; while (MemoryMap < MemoryMapEnd) { -MemoryMap->Attribute &= ~(UINT64)(EFI_MEMORY_RP | EFI_MEMORY_RO | - EFI_MEMORY_XP); +MemoryMap->Attribute &= ~(UINT64)EFI_MEMORY_ATTRIBUTE_MASK; MemoryMap = NEXT_MEMORY_DESCRIPTOR (MemoryMap, Size); } MergeMemoryMap (MemoryMapStart, &BufferSize, Size); diff --git a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c index 92a442f..7d1daf0 100644 --- a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c +++ b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c @@ -42,9 +42,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include "DxeMain.h" #include "Mem/HeapGuard.h" -#define CACHE_ATTRIBUTE_MASK (EFI_MEMORY_UC | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB | EFI_MEMORY_UCE | EFI_MEMORY_WP) -#define MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO) - // // Image type definitions // @@ -221,7 +218,7 @@ SetUefiImageMemoryAttributes (
[edk2-devel] [PATCH V3 4/4] UefiCpuPkg: Add New Memory Attributes
Add usage of EFI_MEMORY_SP and EFI_MEMORY_CPU_CRYPTO attributes introduced in UEFI 2.8. (UEFI 2.8, mantis 1919 and 1872). Use attributes bitmasks, defined in MdePkg. Signed-off-by: Oleksiy Yakovlev Reviewed-by: Laszlo Ersek --- UefiCpuPkg/CpuDxe/CpuDxe.c | 11 --- UefiCpuPkg/CpuDxe/CpuDxe.h | 13 - UefiCpuPkg/CpuDxe/CpuPageTable.c | 6 +++--- UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 2 +- 4 files changed, 8 insertions(+), 24 deletions(-) diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c index a571fc3..52cc26e 100644 --- a/UefiCpuPkg/CpuDxe/CpuDxe.c +++ b/UefiCpuPkg/CpuDxe/CpuDxe.c @@ -10,9 +10,6 @@ #include "CpuMp.h" #include "CpuPageTable.h" -#define CACHE_ATTRIBUTE_MASK (EFI_MEMORY_UC | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB | EFI_MEMORY_UCE | EFI_MEMORY_WP) -#define MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO) - // // Global Variables // @@ -417,8 +414,8 @@ CpuSetMemoryAttributes ( return EFI_SUCCESS; } - CacheAttributes = Attributes & CACHE_ATTRIBUTE_MASK; - MemoryAttributes = Attributes & MEMORY_ATTRIBUTE_MASK; + CacheAttributes = Attributes & EFI_CACHE_ATTRIBUTE_MASK; + MemoryAttributes = Attributes & EFI_MEMORY_ATTRIBUTE_MASK; if (Attributes != (CacheAttributes | MemoryAttributes)) { return EFI_INVALID_PARAMETER; @@ -677,7 +674,7 @@ SetGcdMemorySpaceAttributes ( gDS->SetMemorySpaceAttributes ( RegionStart, RegionLength, - (MemorySpaceMap[Index].Attributes & ~EFI_MEMORY_CACHETYPE_MASK) | (MemorySpaceMap[Index].Capabilities & Attributes) + (MemorySpaceMap[Index].Attributes & ~EFI_CACHE_ATTRIBUTE_MASK) | (MemorySpaceMap[Index].Capabilities & Attributes) ); } @@ -754,7 +751,7 @@ RefreshMemoryAttributesFromMtrr ( gDS->SetMemorySpaceAttributes ( MemorySpaceMap[Index].BaseAddress, MemorySpaceMap[Index].Length, - (MemorySpaceMap[Index].Attributes & ~EFI_MEMORY_CACHETYPE_MASK) | + (MemorySpaceMap[Index].Attributes & ~EFI_CACHE_ATTRIBUTE_MASK) | (MemorySpaceMap[Index].Capabilities & DefaultAttributes) ); } diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.h b/UefiCpuPkg/CpuDxe/CpuDxe.h index b30a896..9771ec8 100644 --- a/UefiCpuPkg/CpuDxe/CpuDxe.h +++ b/UefiCpuPkg/CpuDxe/CpuDxe.h @@ -39,19 +39,6 @@ #include #include -#define EFI_MEMORY_CACHETYPE_MASK (EFI_MEMORY_UC | \ - EFI_MEMORY_WC | \ - EFI_MEMORY_WT | \ - EFI_MEMORY_WB | \ - EFI_MEMORY_UCE | \ - EFI_MEMORY_WP\ - ) - -#define EFI_MEMORY_PAGETYPE_MASK (EFI_MEMORY_RP | \ - EFI_MEMORY_XP | \ - EFI_MEMORY_RO\ - ) - #define HEAP_GUARD_NONSTOP_MODE \ ((PcdGet8 (PcdHeapGuardPropertyMask) & (BIT6|BIT4|BIT1|BIT0)) > BIT6) diff --git a/UefiCpuPkg/CpuDxe/CpuPageTable.c b/UefiCpuPkg/CpuDxe/CpuPageTable.c index 0a02cb3..06ee1b8 100644 --- a/UefiCpuPkg/CpuDxe/CpuPageTable.c +++ b/UefiCpuPkg/CpuDxe/CpuPageTable.c @@ -717,7 +717,7 @@ ConvertMemoryPageAttributes ( return RETURN_INVALID_PARAMETER; } - if ((Attributes & ~(EFI_MEMORY_RP | EFI_MEMORY_RO | EFI_MEMORY_XP)) != 0) { + if ((Attributes & ~EFI_MEMORY_ATTRIBUTE_MASK) != 0) { DEBUG ((DEBUG_ERROR, "Attributes(0x%lx) has unsupported bit\n", Attributes)); return EFI_UNSUPPORTED; } @@ -1018,9 +1018,9 @@ RefreshGcdMemoryAttributesFromPaging ( Length = MIN (PageLength, MemorySpaceLength); if (Attributes != (MemorySpaceMap[Index].Attributes & - EFI_MEMORY_PAGETYPE_MASK)) { + EFI_MEMORY_ATTRIBUTE_MASK)) { NewAttributes = (MemorySpaceMap[Index].Attributes & - ~EFI_MEMORY_PAGETYPE_MASK) | Attributes; + ~EFI_MEMORY_ATTRIBUTE_MASK) | Attributes; Status = gDS->SetMemorySpaceAttributes ( BaseAddress, Length, diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c index 9c5a92a..ebfc46a 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c @@ -435,7 +435,7 @@ ConvertMemoryPageAttributes ( EFI_PHYSICAL_ADDRESS MaximumSupportMemAddress; ASSERT (Attributes != 0); - ASSERT ((Attributes & ~(EFI_MEMORY_RP | EFI_MEMORY_RO | EFI_MEMORY_XP)) == 0); + ASSERT ((Attributes & ~EFI_M
[edk2-devel] [PATCH V3 0/4] Add New Memory Attributes
This series of patches add usage of new memory attributes EFI_MEMORY_SP and EFI_MEMORY_CPU_CRYPTO, introduced in UEFI2.8 (mantis 1919 and 1872). First patch fix typos in description and introduce two bitmasks for all memory type attributes. Second and fourth patches get rid of multiple memory attributes bitmasks definitions trough multiple files and headers, and replace them with new common definitions from MdePkg. Third patch includes WP attribute into cache type mask in CpuDexe.h to make next change in this file more clear. Oleksiy Yakovlev (4): MdePkg: Add New Memory Attributes MdeModulePkg: Add New Memory Attributes UefiCpuPkg: Update EFI_MEMORY_CACHETYPE_MASK definition UefiCpuPkg: Add New Memory Attributes MdeModulePkg/Core/Dxe/Gcd/Gcd.c| 11 ++- MdeModulePkg/Core/Dxe/Mem/Page.c | 9 +++-- MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c | 7 ++- MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c | 10 ++ MdePkg/Include/Uefi/UefiSpec.h | 10 -- UefiCpuPkg/CpuDxe/CpuDxe.c | 11 --- UefiCpuPkg/CpuDxe/CpuDxe.h | 12 UefiCpuPkg/CpuDxe/CpuPageTable.c | 6 +++--- UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 2 +- 9 files changed, 25 insertions(+), 53 deletions(-) -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#61992): https://edk2.groups.io/g/devel/message/61992 Mute This Topic: https://groups.io/mt/75267363/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V3 1/4] MdePkg: Add New Memory Attributes
Add usage of EFI_MEMORY_SP and EFI_MEMORY_CPU_CRYPTO attributes introduced in UEFI 2.8 (UEFI 2.8, mantis 1919 and 1872) Fix typos in EFI_MEMORY_CPU_CRYPTO description. Add attributes bitmasks, grouped by type. Signed-off-by: Oleksiy Yakovlev Reviewed-by: Laszlo Ersek Reviewed-by: Liming Gao --- MdePkg/Include/Uefi/UefiSpec.h | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h index 558e1bc..05b82e0 100644 --- a/MdePkg/Include/Uefi/UefiSpec.h +++ b/MdePkg/Include/Uefi/UefiSpec.h @@ -96,9 +96,9 @@ typedef enum { #define EFI_MEMORY_SP 0x0004ULL // // If this flag is set, the memory region is capable of being -// protected with the CPU?s memory cryptographic +// protected with the CPU's memory cryptographic // capabilities. If this flag is clear, the memory region is not -// capable of being protected with the CPU?s memory +// capable of being protected with the CPU's memory // cryptographic capabilities or the CPU does not support CPU // memory cryptographic capabilities. // @@ -109,6 +109,12 @@ typedef enum { // #define EFI_MEMORY_RUNTIME 0x8000ULL +// +// Attributes bitmasks, grouped by type +// +#define EFI_CACHE_ATTRIBUTE_MASK (EFI_MEMORY_UC | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB | EFI_MEMORY_UCE | EFI_MEMORY_WP) +#define EFI_MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO) + /// /// Memory descriptor version number. /// -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#61993): https://edk2.groups.io/g/devel/message/61993 Mute This Topic: https://groups.io/mt/75267364/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V3] MdePkg: Add Serial Terminal Device Type Guid
Add definition of EFI_SERIAL_TERMINAL_DEVICE_TYPE_GUID. It was miseed in "Extend SERIAL_IO with DeviceTypeGuid" patch. (UEFI 2.8, mantis 1832) Signed-off-by: Oleksiy Yakovlev --- MdePkg/Include/Protocol/SerialIo.h | 6 ++ MdePkg/MdePkg.dec | 3 +++ 2 files changed, 9 insertions(+) diff --git a/MdePkg/Include/Protocol/SerialIo.h b/MdePkg/Include/Protocol/SerialIo.h index e2e0c61..16a865b 100644 --- a/MdePkg/Include/Protocol/SerialIo.h +++ b/MdePkg/Include/Protocol/SerialIo.h @@ -17,6 +17,11 @@ 0xBB25CF6F, 0xF1D4, 0x11D2, {0x9A, 0x0C, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0xFD } \ } +#define EFI_SERIAL_TERMINAL_DEVICE_TYPE_GUID \ + { \ +0X6AD9A60F, 0X5815, 0X4C7C, { 0X8A, 0X10, 0X50, 0X53, 0XD2, 0XBF, 0X7A, 0X1B } \ + } + /// /// Protocol GUID defined in EFI1.1. /// @@ -299,5 +304,6 @@ struct _EFI_SERIAL_IO_PROTOCOL { }; extern EFI_GUID gEfiSerialIoProtocolGuid; +extern EFI_GUID gEfiSerialTerminalDeviceTypeGuid; #endif diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index d03fc5b..682e61c 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -670,6 +670,9 @@ ## Include/Guid/RtPropertiesTable.h gEfiRtPropertiesTableGuid = { 0xeb66918a, 0x7eef, 0x402a, { 0x84, 0x2e, 0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9 }} + ## Include/Protocol/SerilaIo.h + gEfiSerialTerminalDeviceTypeGuid = { 0x6AD9A60F, 0x5815, 0x4C7C, { 0x8A, 0x10, 0x50, 0x53, 0xD2, 0xBF, 0x7A, 0x1B }} + # # GUID defined in PI1.0 # -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#61922): https://edk2.groups.io/g/devel/message/61922 Mute This Topic: https://groups.io/mt/75243813/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH V2 3/3] UefiCpuPkg: Add New Memory Attributes
Hi Laszlo. I think WP should be included also. Spec says that WP "typically used as a cacheability attribute today". Do you want me to submit just additional patch for CpuDxe.h, or resubmit the whole series adding this inclusion of WP to EFI_MEMORY_CACHETYPE_MASK in CpuDxe.h? Regards, Oleksiy. -Original Message- From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Wednesday, June 24, 2020 5:42 AM To: Oleksiy Yakovlev; devel@edk2.groups.io Cc: liming@intel.com; michael.d.kin...@intel.com; dandan...@intel.com; ray...@intel.com; rahul1.ku...@intel.com; Felix Polyudov; Eric Dong Subject: Re: [PATCH V2 3/3] UefiCpuPkg: Add New Memory Attributes On 06/23/20 23:55, Oleksiy Yakovlev wrote: > Add usage of EFI_MEMORY_SP and EFI_MEMORY_CPU_CRYPTO > attributes introduced in UEFI 2.8. > (UEFI 2.8, mantis 1919 and 1872). > Use attributes bitmasks, defined in MdePkg. > > Signed-off-by: Oleksiy Yakovlev > --- > UefiCpuPkg/CpuDxe/CpuDxe.c | 11 --- > UefiCpuPkg/CpuDxe/CpuDxe.h | 12 > UefiCpuPkg/CpuDxe/CpuPageTable.c | 6 +++--- > UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 2 +- > 4 files changed, 8 insertions(+), 23 deletions(-) > > diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c > index a571fc3..52cc26e 100644 > --- a/UefiCpuPkg/CpuDxe/CpuDxe.c > +++ b/UefiCpuPkg/CpuDxe/CpuDxe.c > @@ -10,9 +10,6 @@ > #include "CpuMp.h" > #include "CpuPageTable.h" > > -#define CACHE_ATTRIBUTE_MASK (EFI_MEMORY_UC | EFI_MEMORY_WC | > EFI_MEMORY_WT | EFI_MEMORY_WB | EFI_MEMORY_UCE | EFI_MEMORY_WP) > -#define MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | > EFI_MEMORY_RO) > - > // > // Global Variables > // > @@ -417,8 +414,8 @@ CpuSetMemoryAttributes ( > return EFI_SUCCESS; >} > > - CacheAttributes = Attributes & CACHE_ATTRIBUTE_MASK; > - MemoryAttributes = Attributes & MEMORY_ATTRIBUTE_MASK; > + CacheAttributes = Attributes & EFI_CACHE_ATTRIBUTE_MASK; > + MemoryAttributes = Attributes & EFI_MEMORY_ATTRIBUTE_MASK; > >if (Attributes != (CacheAttributes | MemoryAttributes)) { > return EFI_INVALID_PARAMETER; OK. > @@ -677,7 +674,7 @@ SetGcdMemorySpaceAttributes ( > gDS->SetMemorySpaceAttributes ( > RegionStart, > RegionLength, > - (MemorySpaceMap[Index].Attributes & ~EFI_MEMORY_CACHETYPE_MASK) | > (MemorySpaceMap[Index].Capabilities & Attributes) > + (MemorySpaceMap[Index].Attributes & ~EFI_CACHE_ATTRIBUTE_MASK) | > (MemorySpaceMap[Index].Capabilities & Attributes) > ); >} > > @@ -754,7 +751,7 @@ RefreshMemoryAttributesFromMtrr ( > gDS->SetMemorySpaceAttributes ( > MemorySpaceMap[Index].BaseAddress, > MemorySpaceMap[Index].Length, > - (MemorySpaceMap[Index].Attributes & ~EFI_MEMORY_CACHETYPE_MASK) | > + (MemorySpaceMap[Index].Attributes & ~EFI_CACHE_ATTRIBUTE_MASK) | > (MemorySpaceMap[Index].Capabilities & DefaultAttributes) > ); >} > diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.h b/UefiCpuPkg/CpuDxe/CpuDxe.h > index 9299eaa..9771ec8 100644 > --- a/UefiCpuPkg/CpuDxe/CpuDxe.h > +++ b/UefiCpuPkg/CpuDxe/CpuDxe.h > @@ -39,18 +39,6 @@ > #include > #include > > -#define EFI_MEMORY_CACHETYPE_MASK (EFI_MEMORY_UC | \ > - EFI_MEMORY_WC | \ > - EFI_MEMORY_WT | \ > - EFI_MEMORY_WB | \ > - EFI_MEMORY_UCE \ > - ) > - > -#define EFI_MEMORY_PAGETYPE_MASK (EFI_MEMORY_RP | \ > - EFI_MEMORY_XP | \ > - EFI_MEMORY_RO\ > - ) > - > #define HEAP_GUARD_NONSTOP_MODE \ > ((PcdGet8 (PcdHeapGuardPropertyMask) & (BIT6|BIT4|BIT1|BIT0)) > BIT6) > (1) These changes have an additional effect. EFI_MEMORY_CACHETYPE_MASK does not include EFI_MEMORY_WP, but EFI_CACHE_ATTRIBUTE_MASK does. (1a) If that change is intentional, then this patch can remain as it is, but we need an extra patch prepended (i.e., inserted between v2 patches #2 and #3), for adding EFI_MEMORY_WP to EFI_MEMORY_CACHETYPE_MASK first. (1b) If the EFI_MEMORY_WP change is not intended (i.e., it is an oversight in this patch), then in every spot where we replace EFI_MEMORY_CACHETYPE_MASK with EFI_CACHE_ATTRIBUTE_MASK, we need to account for EFI_MEMORY_WP separately. ... After reading up on EFI_MEMORY_WP in the U
[edk2-devel] [PATCH V2] MdePkg: Add Serial Terminal Device Type Guid
Add definition of EFI_SERIAL_TERMINAL_DEVICE_TYPE_GUID. It was miseed in "Extend SERIAL_IO with DeviceTypeGuid" patch. (UEFI 2.8, mantis 1832) Signed-off-by: Oleksiy Yakovlev --- MdePkg/Include/Protocol/SerialIo.h | 6 ++ MdePkg/MdePkg.dec | 3 +++ 2 files changed, 9 insertions(+) diff --git a/MdePkg/Include/Protocol/SerialIo.h b/MdePkg/Include/Protocol/SerialIo.h index e2e0c61..16a865b 100644 --- a/MdePkg/Include/Protocol/SerialIo.h +++ b/MdePkg/Include/Protocol/SerialIo.h @@ -17,6 +17,11 @@ 0xBB25CF6F, 0xF1D4, 0x11D2, {0x9A, 0x0C, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0xFD } \ } +#define EFI_SERIAL_TERMINAL_DEVICE_TYPE_GUID \ + { \ +0X6AD9A60F, 0X5815, 0X4C7C, { 0X8A, 0X10, 0X50, 0X53, 0XD2, 0XBF, 0X7A, 0X1B } \ + } + /// /// Protocol GUID defined in EFI1.1. /// @@ -299,5 +304,6 @@ struct _EFI_SERIAL_IO_PROTOCOL { }; extern EFI_GUID gEfiSerialIoProtocolGuid; +extern EFI_GUID gEfiSerialTerminalDeviceTypeGuid; #endif diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index d03fc5b..fc4dae2 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -670,6 +670,9 @@ ## Include/Guid/RtPropertiesTable.h gEfiRtPropertiesTableGuid = { 0xeb66918a, 0x7eef, 0x402a, { 0x84, 0x2e, 0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9 }} + ## Include/Protocol/SerilaIo.h + gEfiSerialTerminalDeviceTypeGuid = { 0x6AD9A60F, 0x5815, 0x4C7C, { 0x08A, 0x10, 0x50, 0x53, 0xD2, 0xBF, 0x7A, 0x1B }} + # # GUID defined in PI1.0 # -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#61691): https://edk2.groups.io/g/devel/message/61691 Mute This Topic: https://groups.io/mt/75085251/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V2 0/3] Add New Memory Attributes
This series of patches add usage of new memory attributes EFI_MEMORY_SP and EFI_MEMORY_CPU_CRYPTO, introduced in UEFI2.8 (mantis 1919 and 1872). First patch fix typos in description and introduce two bitmasks for all memory type attributes. Second and third patches get rid of multiple memory attributes bitmasks definitions trough multiple files and headers, and replace them with new common definitions from MdePkg. Oleksiy Yakovlev (3): MdePkg: Add New Memory Attributes MdeModulePkg: Add New Memory Attributes UefiCpuPkg: Add New Memory Attributes MdeModulePkg/Core/Dxe/Gcd/Gcd.c| 11 ++- MdeModulePkg/Core/Dxe/Mem/Page.c | 9 +++-- MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c | 7 ++- MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c | 10 ++ MdePkg/Include/Uefi/UefiSpec.h | 10 -- UefiCpuPkg/CpuDxe/CpuDxe.c | 11 --- UefiCpuPkg/CpuDxe/CpuDxe.h | 12 UefiCpuPkg/CpuDxe/CpuPageTable.c | 6 +++--- UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 2 +- 9 files changed, 25 insertions(+), 53 deletions(-) -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#61620): https://edk2.groups.io/g/devel/message/61620 Mute This Topic: https://groups.io/mt/75070220/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V2 3/3] UefiCpuPkg: Add New Memory Attributes
Add usage of EFI_MEMORY_SP and EFI_MEMORY_CPU_CRYPTO attributes introduced in UEFI 2.8. (UEFI 2.8, mantis 1919 and 1872). Use attributes bitmasks, defined in MdePkg. Signed-off-by: Oleksiy Yakovlev --- UefiCpuPkg/CpuDxe/CpuDxe.c | 11 --- UefiCpuPkg/CpuDxe/CpuDxe.h | 12 UefiCpuPkg/CpuDxe/CpuPageTable.c | 6 +++--- UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 2 +- 4 files changed, 8 insertions(+), 23 deletions(-) diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c index a571fc3..52cc26e 100644 --- a/UefiCpuPkg/CpuDxe/CpuDxe.c +++ b/UefiCpuPkg/CpuDxe/CpuDxe.c @@ -10,9 +10,6 @@ #include "CpuMp.h" #include "CpuPageTable.h" -#define CACHE_ATTRIBUTE_MASK (EFI_MEMORY_UC | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB | EFI_MEMORY_UCE | EFI_MEMORY_WP) -#define MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO) - // // Global Variables // @@ -417,8 +414,8 @@ CpuSetMemoryAttributes ( return EFI_SUCCESS; } - CacheAttributes = Attributes & CACHE_ATTRIBUTE_MASK; - MemoryAttributes = Attributes & MEMORY_ATTRIBUTE_MASK; + CacheAttributes = Attributes & EFI_CACHE_ATTRIBUTE_MASK; + MemoryAttributes = Attributes & EFI_MEMORY_ATTRIBUTE_MASK; if (Attributes != (CacheAttributes | MemoryAttributes)) { return EFI_INVALID_PARAMETER; @@ -677,7 +674,7 @@ SetGcdMemorySpaceAttributes ( gDS->SetMemorySpaceAttributes ( RegionStart, RegionLength, - (MemorySpaceMap[Index].Attributes & ~EFI_MEMORY_CACHETYPE_MASK) | (MemorySpaceMap[Index].Capabilities & Attributes) + (MemorySpaceMap[Index].Attributes & ~EFI_CACHE_ATTRIBUTE_MASK) | (MemorySpaceMap[Index].Capabilities & Attributes) ); } @@ -754,7 +751,7 @@ RefreshMemoryAttributesFromMtrr ( gDS->SetMemorySpaceAttributes ( MemorySpaceMap[Index].BaseAddress, MemorySpaceMap[Index].Length, - (MemorySpaceMap[Index].Attributes & ~EFI_MEMORY_CACHETYPE_MASK) | + (MemorySpaceMap[Index].Attributes & ~EFI_CACHE_ATTRIBUTE_MASK) | (MemorySpaceMap[Index].Capabilities & DefaultAttributes) ); } diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.h b/UefiCpuPkg/CpuDxe/CpuDxe.h index 9299eaa..9771ec8 100644 --- a/UefiCpuPkg/CpuDxe/CpuDxe.h +++ b/UefiCpuPkg/CpuDxe/CpuDxe.h @@ -39,18 +39,6 @@ #include #include -#define EFI_MEMORY_CACHETYPE_MASK (EFI_MEMORY_UC | \ - EFI_MEMORY_WC | \ - EFI_MEMORY_WT | \ - EFI_MEMORY_WB | \ - EFI_MEMORY_UCE \ - ) - -#define EFI_MEMORY_PAGETYPE_MASK (EFI_MEMORY_RP | \ - EFI_MEMORY_XP | \ - EFI_MEMORY_RO\ - ) - #define HEAP_GUARD_NONSTOP_MODE \ ((PcdGet8 (PcdHeapGuardPropertyMask) & (BIT6|BIT4|BIT1|BIT0)) > BIT6) diff --git a/UefiCpuPkg/CpuDxe/CpuPageTable.c b/UefiCpuPkg/CpuDxe/CpuPageTable.c index 0a02cb3..06ee1b8 100644 --- a/UefiCpuPkg/CpuDxe/CpuPageTable.c +++ b/UefiCpuPkg/CpuDxe/CpuPageTable.c @@ -717,7 +717,7 @@ ConvertMemoryPageAttributes ( return RETURN_INVALID_PARAMETER; } - if ((Attributes & ~(EFI_MEMORY_RP | EFI_MEMORY_RO | EFI_MEMORY_XP)) != 0) { + if ((Attributes & ~EFI_MEMORY_ATTRIBUTE_MASK) != 0) { DEBUG ((DEBUG_ERROR, "Attributes(0x%lx) has unsupported bit\n", Attributes)); return EFI_UNSUPPORTED; } @@ -1018,9 +1018,9 @@ RefreshGcdMemoryAttributesFromPaging ( Length = MIN (PageLength, MemorySpaceLength); if (Attributes != (MemorySpaceMap[Index].Attributes & - EFI_MEMORY_PAGETYPE_MASK)) { + EFI_MEMORY_ATTRIBUTE_MASK)) { NewAttributes = (MemorySpaceMap[Index].Attributes & - ~EFI_MEMORY_PAGETYPE_MASK) | Attributes; + ~EFI_MEMORY_ATTRIBUTE_MASK) | Attributes; Status = gDS->SetMemorySpaceAttributes ( BaseAddress, Length, diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c index 9c5a92a..ebfc46a 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c @@ -435,7 +435,7 @@ ConvertMemoryPageAttributes ( EFI_PHYSICAL_ADDRESS MaximumSupportMemAddress; ASSERT (Attributes != 0); - ASSERT ((Attributes & ~(EFI_MEMORY_RP | EFI_MEMORY_RO | EFI_MEMORY_XP)) == 0); + ASSERT ((Attributes & ~EFI_MEMORY_ATTRIBUTE_MASK) == 0); ASSERT ((BaseAddress & (SIZE_4KB - 1)) == 0);
[edk2-devel] [PATCH V2 2/3] MdeModulePkg: Add New Memory Attributes
Add usage of EFI_MEMORY_SP and EFI_MEMORY_CPU_CRYPTO attributes introduced in UEFI 2.8. (UEFI 2.8, mantis 1919 and 1872). Use attributes bitmasks, defined in MdePkg. Signed-off-by: Oleksiy Yakovlev --- MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 11 ++- MdeModulePkg/Core/Dxe/Mem/Page.c | 9 +++-- MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c | 7 ++- MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c| 10 ++ 4 files changed, 9 insertions(+), 28 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c index 74f3b1b..2d8c076 100644 --- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c +++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c @@ -35,13 +35,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define PRESENT_MEMORY_ATTRIBUTES (EFI_RESOURCE_ATTRIBUTE_PRESENT) -#define EXCLUSIVE_MEMORY_ATTRIBUTES (EFI_MEMORY_UC | EFI_MEMORY_WC | \ - EFI_MEMORY_WT | EFI_MEMORY_WB | \ - EFI_MEMORY_WP | EFI_MEMORY_UCE) - -#define NONEXCLUSIVE_MEMORY_ATTRIBUTES (EFI_MEMORY_XP | EFI_MEMORY_RP | \ -EFI_MEMORY_RO) - // // Module Variables // @@ -665,7 +658,7 @@ ConverToCpuArchAttributes ( { UINT64 CpuArchAttributes; - CpuArchAttributes = Attributes & NONEXCLUSIVE_MEMORY_ATTRIBUTES; + CpuArchAttributes = Attributes & EFI_MEMORY_ATTRIBUTE_MASK; if ( (Attributes & EFI_MEMORY_UC) == EFI_MEMORY_UC) { CpuArchAttributes |= EFI_MEMORY_UC; @@ -951,7 +944,7 @@ CoreConvertSpace ( // Keep original CPU arch attributes when caller just calls // SetMemorySpaceAttributes() with none CPU arch attributes (for example, RUNTIME). // -Attributes |= (Entry->Attributes & (EXCLUSIVE_MEMORY_ATTRIBUTES | NONEXCLUSIVE_MEMORY_ATTRIBUTES)); +Attributes |= (Entry->Attributes & (EFI_CACHE_ATTRIBUTE_MASK | EFI_MEMORY_ATTRIBUTE_MASK)); } Entry->Attributes = Attributes; break; diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c b/MdeModulePkg/Core/Dxe/Mem/Page.c index 1f0e3d9..2c2c9cd 100644 --- a/MdeModulePkg/Core/Dxe/Mem/Page.c +++ b/MdeModulePkg/Core/Dxe/Mem/Page.c @@ -1857,8 +1857,7 @@ CoreGetMemoryMap ( MemoryMap->VirtualStart = 0; MemoryMap->NumberOfPages = RShiftU64 ((MergeGcdMapEntry.EndAddress - MergeGcdMapEntry.BaseAddress + 1), EFI_PAGE_SHIFT); MemoryMap->Attribute = (MergeGcdMapEntry.Attributes & ~EFI_MEMORY_PORT_IO) | -(MergeGcdMapEntry.Capabilities & (EFI_MEMORY_RP | EFI_MEMORY_WP | EFI_MEMORY_XP | EFI_MEMORY_RO | -EFI_MEMORY_UC | EFI_MEMORY_UCE | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB)); +(MergeGcdMapEntry.Capabilities & (EFI_CACHE_ATTRIBUTE_MASK | EFI_MEMORY_ATTRIBUTE_MASK)); if (MergeGcdMapEntry.GcdMemoryType == EfiGcdMemoryTypeReserved) { MemoryMap->Type = EfiReservedMemoryType; @@ -1892,8 +1891,7 @@ CoreGetMemoryMap ( MemoryMap->VirtualStart = 0; MemoryMap->NumberOfPages = RShiftU64 ((MergeGcdMapEntry.EndAddress - MergeGcdMapEntry.BaseAddress + 1), EFI_PAGE_SHIFT); MemoryMap->Attribute = MergeGcdMapEntry.Attributes | EFI_MEMORY_NV | -(MergeGcdMapEntry.Capabilities & (EFI_MEMORY_RP | EFI_MEMORY_WP | EFI_MEMORY_XP | EFI_MEMORY_RO | -EFI_MEMORY_UC | EFI_MEMORY_UCE | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB)); +(MergeGcdMapEntry.Capabilities & (EFI_CACHE_ATTRIBUTE_MASK | EFI_MEMORY_ATTRIBUTE_MASK)); MemoryMap->Type = EfiPersistentMemory; // @@ -1935,8 +1933,7 @@ CoreGetMemoryMap ( MemoryMapEnd = MemoryMap; MemoryMap = MemoryMapStart; while (MemoryMap < MemoryMapEnd) { -MemoryMap->Attribute &= ~(UINT64)(EFI_MEMORY_RP | EFI_MEMORY_RO | - EFI_MEMORY_XP); +MemoryMap->Attribute &= ~(UINT64)EFI_MEMORY_ATTRIBUTE_MASK; MemoryMap = NEXT_MEMORY_DESCRIPTOR (MemoryMap, Size); } MergeMemoryMap (MemoryMapStart, &BufferSize, Size); diff --git a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c index 92a442f..7d1daf0 100644 --- a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c +++ b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c @@ -42,9 +42,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include "DxeMain.h" #include "Mem/HeapGuard.h" -#define CACHE_ATTRIBUTE_MASK (EFI_MEMORY_UC | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB | EFI_MEMORY_UCE | EFI_MEMORY_WP) -#define MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO) - // // Image type definitions // @@ -221,7 +218,7 @@ SetUefiImageMemoryAttributes ( Status = CoreGetMemorySpaceDescriptor(BaseAddres
[edk2-devel] [PATCH V2 1/3] MdePkg: Add New Memory Attributes
Add usage of EFI_MEMORY_SP and EFI_MEMORY_CPU_CRYPTO attributes introduced in UEFI 2.8. (UEFI 2.8, mantis 1919 and 1872). Fix typos in EFI_MEMORY_CPU_CRYPTO description. Add attributes bitmasks, grouped by type. Signed-off-by: Oleksiy Yakovlev --- MdePkg/Include/Uefi/UefiSpec.h | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h index 558e1bc..05b82e0 100644 --- a/MdePkg/Include/Uefi/UefiSpec.h +++ b/MdePkg/Include/Uefi/UefiSpec.h @@ -96,9 +96,9 @@ typedef enum { #define EFI_MEMORY_SP 0x0004ULL // // If this flag is set, the memory region is capable of being -// protected with the CPU?s memory cryptographic +// protected with the CPU's memory cryptographic // capabilities. If this flag is clear, the memory region is not -// capable of being protected with the CPU?s memory +// capable of being protected with the CPU's memory // cryptographic capabilities or the CPU does not support CPU // memory cryptographic capabilities. // @@ -109,6 +109,12 @@ typedef enum { // #define EFI_MEMORY_RUNTIME 0x8000ULL +// +// Attributes bitmasks, grouped by type +// +#define EFI_CACHE_ATTRIBUTE_MASK (EFI_MEMORY_UC | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB | EFI_MEMORY_UCE | EFI_MEMORY_WP) +#define EFI_MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO) + /// /// Memory descriptor version number. /// -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#61621): https://edk2.groups.io/g/devel/message/61621 Mute This Topic: https://groups.io/mt/75070221/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH] MdePkg: Add Serial Terminal Device Type Guid
Add definition of EFI_SERIAL_TERMINAL_DEVICE_TYPE_GUID. It was miseed in "Extend SERIAL_IO with DeviceTypeGuid" patch. (UEFI 2.8, mantis 1832) Signed-off-by: Oleksiy Yakovlev --- MdePkg/Include/Protocol/SerialIo.h | 6 ++ MdePkg/MdePkg.dec | 6 ++ 2 files changed, 12 insertions(+) diff --git a/MdePkg/Include/Protocol/SerialIo.h b/MdePkg/Include/Protocol/SerialIo.h index e2e0c61..16a865b 100644 --- a/MdePkg/Include/Protocol/SerialIo.h +++ b/MdePkg/Include/Protocol/SerialIo.h @@ -17,6 +17,11 @@ 0xBB25CF6F, 0xF1D4, 0x11D2, {0x9A, 0x0C, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0xFD } \ } +#define EFI_SERIAL_TERMINAL_DEVICE_TYPE_GUID \ + { \ +0X6AD9A60F, 0X5815, 0X4C7C, { 0X8A, 0X10, 0X50, 0X53, 0XD2, 0XBF, 0X7A, 0X1B } \ + } + /// /// Protocol GUID defined in EFI1.1. /// @@ -299,5 +304,6 @@ struct _EFI_SERIAL_IO_PROTOCOL { }; extern EFI_GUID gEfiSerialIoProtocolGuid; +extern EFI_GUID gEfiSerialTerminalDeviceTypeGuid; #endif diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index d03fc5b..2ffb71d 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -798,6 +798,12 @@ # gTianoCustomDecompressGuid = { 0xA31280AD, 0x481E, 0x41B6, { 0x95, 0xE8, 0x12, 0x7F, 0x4C, 0x98, 0x47, 0x79 }} + # + # GUID defined For Serial Io Prtotocol Devicee Type + # + ## Include/Protocol/SerilaIo.h + gEfiSerialTerminalDeviceTypeGuid = { 0x6AD9A60F, 0x5815, 0x4C7C, { 0x08A, 0x10, 0x50, 0x53, 0xD2, 0xBF, 0x7A, 0x1B }} + [Guids.IA32, Guids.X64] ## Include/Guid/Cper.h gEfiIa32X64ErrorTypeCacheCheckGuid = { 0xA55701F5, 0xE3EF, 0x43de, { 0xAC, 0x72, 0x24, 0x9B, 0x57, 0x3F, 0xAD, 0x2C }} -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#61608): https://edk2.groups.io/g/devel/message/61608 Mute This Topic: https://groups.io/mt/75063467/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH] UefiCpuPkg: Add New Memory Attributes
Hi Laszlo. There was separate patch for MdeModulePkg submitted with this one as well. I did not include you into cc, because you are not in the maintainers list for MdeModulePkg. Patch addresses EFI_MEMORY_(RO|RP|XP) macroses and all issues you mentioned in your comment in same way as UefiCpuPkg patch (without introducing single macros and using MEMORY_ATTRIBUTE_MASK instead of | ). Regards, Oleksiy. -Original Message- From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Tuesday, June 16, 2020 2:12 PM To: Oleksiy Yakovlev; devel@edk2.groups.io Cc: eric.d...@intel.com; ray...@intel.com; rahul1.ku...@intel.com; Felix Polyudov; Liming Gao; Michael Kinney; Jian J Wang; Hao A Wu; Dandan Bi Subject: Re: [PATCH] UefiCpuPkg: Add New Memory Attributes Hi Oleksiy, On 06/15/20 23:45, Oleksiy Yakovlev wrote: > Add usage of EFI_MEMORY_SP and EFI_MEMORY_CPU_CRYPTO > attributes introduced in UEFI 2.8 > (UEFI 2.8, mantis 1919 and 1872) > > Signed-off-by: Oleksiy Yakovlev > --- > UefiCpuPkg/CpuDxe/CpuDxe.c | 2 +- > UefiCpuPkg/CpuDxe/CpuDxe.h | 4 +++- > UefiCpuPkg/CpuDxe/CpuPageTable.c | 2 +- > UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 2 +- > 4 files changed, 6 insertions(+), 4 deletions(-) I suggest / request turning this patch into 5 patches: (a) The first patch should please correct a mistake in commit c18708d2f002 ("MdePkg-UefiSpec.h: Add UEFI 2.8 new memory attributes", 2019-11-04). Namely, in commit c18708d2f002, the EFI_MEMORY_CPU_CRYPTO macro's documentation includes the string "CPU?s", twice, in place of "CPU's". I don't understand how this happened. In the mailing list archive, I can only find Liming's confirmation that he pushed the patch: https://edk2.groups.io/g/devel/message/49893 but not the original patch posting. Note that, in the context quoted in that message (that is, the patch), the string was "CPU’s". That string did not use ASCII character 0x27, but U+2019 (RIGHT SINGLE QUOTATION MARK). So indeed the patch was incorrect. But the solution should not have been to replace U+2019 with "?", but to request a repost using ASCII 0x27. Either way, even though it is obviously not your mistake, can you please include a patch for replacing both "CPU?s" instances with "CPU's"? In file "MdePkg/Include/Uefi/UefiSpec.h". For the rest of the patches, please consider: $ git grep -E 'EFI_MEMORY_(RO|RP|XP) \| EFI_MEMORY_(RO|RP|XP) \| EFI_MEMORY_(RO|RP|XP)' MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c:#define MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO) MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c:#define MEMORY_PAGE_ATTRIBUTES (EFI_MEMORY_XP | EFI_MEMORY_RP | EFI_MEMORY_RO) UefiCpuPkg/CpuDxe/CpuDxe.c:#define MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO) UefiCpuPkg/CpuDxe/CpuPageTable.c: if ((Attributes & ~(EFI_MEMORY_RP | EFI_MEMORY_RO | EFI_MEMORY_XP)) != 0) { UefiCpuPkg/CpuDxe/CpuPageTable.c:Capabilities = EFI_MEMORY_RO | EFI_MEMORY_RP | EFI_MEMORY_XP; UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c: ASSERT ((Attributes & ~(EFI_MEMORY_RP | EFI_MEMORY_RO | EFI_MEMORY_XP)) == 0); This output tells us the following: - the bitmask (RP|XP|RO) is *triplicated* between the macro definitions in: - MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c - MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c - UefiCpuPkg/CpuDxe/CpuDxe.c - "UefiCpuPkg/CpuDxe/CpuPageTable.c" open-codes the bitmask in two separate spots (rather than using MEMORY_ATTRIBUTE_MASK) - "UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c" open codes the bitmask also (rather than using any macro). (b) Therefore, the second patch should introduce a central macro for (RP|XP|RO) somewhere under MdePkg or MdeModulePkg. Perhaps it can even be a fixed-only PCD. (c) The third patch should replace all of the open coded bitmasks in MdeModulePkg (see the list above) with references to the new central macro (or PCD). (d) The fourth patch should do the same in UefiCpuPkg. (e) The final patch should modify the central macro to include EFI_MEMORY_SP and EFI_MEMORY_CPU_CRYPTO. This is just my opinion of course, please discuss it further with the MdePkg / MdeModulePkg / UefiCpuPkg maintainers (I've CC'd them). Thanks, Laszlo > > diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c > index a571fc3..55ca764 100644 > --- a/UefiCpuPkg/CpuDxe/CpuDxe.c > +++ b/UefiCpuPkg/CpuDxe/CpuDxe.c > @@ -11,7 +11,7 @@ > #include "CpuPageTable.h" > > #define CACHE_ATTRIBUTE_MASK (EFI_MEMORY_UC | EFI_MEMORY_WC | > EFI_MEMORY_WT | EFI_MEMORY_WB | EFI_MEMORY_UCE | EFI_MEMORY_WP) > -#define MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | > EFI_MEMORY_RO) &g
[edk2-devel] [PATCH] UefiCpuPkg: Add New Memory Attributes
Add usage of EFI_MEMORY_SP and EFI_MEMORY_CPU_CRYPTO attributes introduced in UEFI 2.8 (UEFI 2.8, mantis 1919 and 1872) Signed-off-by: Oleksiy Yakovlev --- UefiCpuPkg/CpuDxe/CpuDxe.c | 2 +- UefiCpuPkg/CpuDxe/CpuDxe.h | 4 +++- UefiCpuPkg/CpuDxe/CpuPageTable.c | 2 +- UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c index a571fc3..55ca764 100644 --- a/UefiCpuPkg/CpuDxe/CpuDxe.c +++ b/UefiCpuPkg/CpuDxe/CpuDxe.c @@ -11,7 +11,7 @@ #include "CpuPageTable.h" #define CACHE_ATTRIBUTE_MASK (EFI_MEMORY_UC | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB | EFI_MEMORY_UCE | EFI_MEMORY_WP) -#define MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO) +#define MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO) // // Global Variables diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.h b/UefiCpuPkg/CpuDxe/CpuDxe.h index 9299eaa..37fb38e 100644 --- a/UefiCpuPkg/CpuDxe/CpuDxe.h +++ b/UefiCpuPkg/CpuDxe/CpuDxe.h @@ -48,7 +48,9 @@ #define EFI_MEMORY_PAGETYPE_MASK (EFI_MEMORY_RP | \ EFI_MEMORY_XP | \ - EFI_MEMORY_RO\ + EFI_MEMORY_RO | \ + EFI_MEMORY_SP | \ + EFI_MEMORY_CPU_CRYPTO \ ) #define HEAP_GUARD_NONSTOP_MODE \ diff --git a/UefiCpuPkg/CpuDxe/CpuPageTable.c b/UefiCpuPkg/CpuDxe/CpuPageTable.c index 0a02cb3..d769e4a 100644 --- a/UefiCpuPkg/CpuDxe/CpuPageTable.c +++ b/UefiCpuPkg/CpuDxe/CpuPageTable.c @@ -717,7 +717,7 @@ ConvertMemoryPageAttributes ( return RETURN_INVALID_PARAMETER; } - if ((Attributes & ~(EFI_MEMORY_RP | EFI_MEMORY_RO | EFI_MEMORY_XP)) != 0) { + if ((Attributes & ~(EFI_MEMORY_RP | EFI_MEMORY_RO | EFI_MEMORY_XP | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO)) != 0) { DEBUG ((DEBUG_ERROR, "Attributes(0x%lx) has unsupported bit\n", Attributes)); return EFI_UNSUPPORTED; } diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c index 9c5a92a..94adf37 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c @@ -435,7 +435,7 @@ ConvertMemoryPageAttributes ( EFI_PHYSICAL_ADDRESS MaximumSupportMemAddress; ASSERT (Attributes != 0); - ASSERT ((Attributes & ~(EFI_MEMORY_RP | EFI_MEMORY_RO | EFI_MEMORY_XP)) == 0); + ASSERT ((Attributes & ~(EFI_MEMORY_RP | EFI_MEMORY_RO | EFI_MEMORY_XP | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO)) == 0); ASSERT ((BaseAddress & (SIZE_4KB - 1)) == 0); ASSERT ((Length & (SIZE_4KB - 1)) == 0); -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#61312): https://edk2.groups.io/g/devel/message/61312 Mute This Topic: https://groups.io/mt/74904942/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH] MdeModulePkg: Add New Memory Attributes
Add usage of EFI_MEMORY_SP and EFI_MEMORY_CPU_CRYPTO attributes introduced in UEFI 2.8 (UEFI 2.8, mantis 1919 and 1872) Signed-off-by: Oleksiy Yakovlev --- MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 3 ++- MdeModulePkg/Core/Dxe/Mem/Page.c | 6 +++--- MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c | 2 +- MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c| 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c index 74f3b1b..d7a65ef 100644 --- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c +++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c @@ -40,7 +40,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent EFI_MEMORY_WP | EFI_MEMORY_UCE) #define NONEXCLUSIVE_MEMORY_ATTRIBUTES (EFI_MEMORY_XP | EFI_MEMORY_RP | \ -EFI_MEMORY_RO) +EFI_MEMORY_RO | EFI_MEMORY_SP | \ +EFI_MEMORY_CPU_CRYPTO) // // Module Variables diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c b/MdeModulePkg/Core/Dxe/Mem/Page.c index 1f0e3d9..13876a6 100644 --- a/MdeModulePkg/Core/Dxe/Mem/Page.c +++ b/MdeModulePkg/Core/Dxe/Mem/Page.c @@ -1858,7 +1858,7 @@ CoreGetMemoryMap ( MemoryMap->NumberOfPages = RShiftU64 ((MergeGcdMapEntry.EndAddress - MergeGcdMapEntry.BaseAddress + 1), EFI_PAGE_SHIFT); MemoryMap->Attribute = (MergeGcdMapEntry.Attributes & ~EFI_MEMORY_PORT_IO) | (MergeGcdMapEntry.Capabilities & (EFI_MEMORY_RP | EFI_MEMORY_WP | EFI_MEMORY_XP | EFI_MEMORY_RO | -EFI_MEMORY_UC | EFI_MEMORY_UCE | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB)); +EFI_MEMORY_UC | EFI_MEMORY_UCE | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO)); if (MergeGcdMapEntry.GcdMemoryType == EfiGcdMemoryTypeReserved) { MemoryMap->Type = EfiReservedMemoryType; @@ -1893,7 +1893,7 @@ CoreGetMemoryMap ( MemoryMap->NumberOfPages = RShiftU64 ((MergeGcdMapEntry.EndAddress - MergeGcdMapEntry.BaseAddress + 1), EFI_PAGE_SHIFT); MemoryMap->Attribute = MergeGcdMapEntry.Attributes | EFI_MEMORY_NV | (MergeGcdMapEntry.Capabilities & (EFI_MEMORY_RP | EFI_MEMORY_WP | EFI_MEMORY_XP | EFI_MEMORY_RO | -EFI_MEMORY_UC | EFI_MEMORY_UCE | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB)); +EFI_MEMORY_UC | EFI_MEMORY_UCE | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO)); MemoryMap->Type = EfiPersistentMemory; // @@ -1936,7 +1936,7 @@ CoreGetMemoryMap ( MemoryMap = MemoryMapStart; while (MemoryMap < MemoryMapEnd) { MemoryMap->Attribute &= ~(UINT64)(EFI_MEMORY_RP | EFI_MEMORY_RO | - EFI_MEMORY_XP); + EFI_MEMORY_XP | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO); MemoryMap = NEXT_MEMORY_DESCRIPTOR (MemoryMap, Size); } MergeMemoryMap (MemoryMapStart, &BufferSize, Size); diff --git a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c index 92a442f..51bc999 100644 --- a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c +++ b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c @@ -43,7 +43,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include "Mem/HeapGuard.h" #define CACHE_ATTRIBUTE_MASK (EFI_MEMORY_UC | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB | EFI_MEMORY_UCE | EFI_MEMORY_WP) -#define MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO) +#define MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO) // // Image type definitions diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c index 0385f1d..59a7c03 100644 --- a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c @@ -43,7 +43,7 @@ EFI_MEMORY_WT | EFI_MEMORY_WB | \ EFI_MEMORY_WP | EFI_MEMORY_UCE) -#define MEMORY_PAGE_ATTRIBUTES (EFI_MEMORY_XP | EFI_MEMORY_RP | EFI_MEMORY_RO) +#define MEMORY_PAGE_ATTRIBUTES (EFI_MEMORY_XP | EFI_MEMORY_RP | EFI_MEMORY_RO | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO) // // Function prototypes from produced protocols -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distributio
Re: [edk2-devel] [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image Header extension
Hi Lining, Wei. Can you speed up pushing of 2.8a patches? Regards, Oleksiy. -Original Message- From: Gao, Liming [mailto:liming@intel.com] Sent: Monday, May 18, 2020 8:40 PM To: devel@edk2.groups.io; Oleksiy Yakovlev Cc: Kinney, Michael D; Wang, Jian J; Wu, Hao A; Yao, Jiewen; Zhang, Chao B; Felix Polyudov; Xu, Wei6 Subject: RE: [edk2-devel] [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image Header extension Oleksiy: Wei has sent the updated patches for the changes in MdeModulePkg and SignedCapsulePkg. https://edk2.groups.io/g/devel/message/59652 He bases on your patch and does some updated. Please help review whether it is ok to you. You don't need to submit this patch set again. Thanks Liming > -Original Message- > From: devel@edk2.groups.io On Behalf Of Oleksiy > Yakovlev > Sent: Tuesday, May 19, 2020 6:10 AM > To: Gao, Liming ; devel@edk2.groups.io > Cc: Kinney, Michael D ; Wang, Jian J > ; Wu, Hao A ; Yao, > Jiewen ; Zhang, Chao B ; Felix > Polyudov ; Xu, Wei6 > > Subject: Re: [edk2-devel] [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image > Header extension > > Hi Liming. > > From Your comment here I understand that you are waiting for somebody else > here. > But looking through your comments - I agree with comment 1, but think other > two are incorrect. > So do I need to resubmit 2.8a series? > > Regards, Oleksiy. > > > > -Original Message- > From: Gao, Liming [mailto:liming@intel.com] > Sent: Friday, May 15, 2020 2:13 AM > To: Oleksiy Yakovlev; devel@edk2.groups.io > Cc: Kinney, Michael D; Wang, Jian J; Wu, Hao A; Yao, Jiewen; Zhang, Chao B; > Felix Polyudov; Xu, Wei6 > Subject: RE: [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image Header > extension > > Oleksiy: > When create PR, I find some issue in this patch. The same issue is also in > SignedCapsulePkg. Because original comments from Xu > Wei6, I would like Wei to provide the updated patch for MdeModulePkg and > SignedCapsulePkg. > > Thanks > Liming > > -Original Message- > > From: Oleksiy Yakovlev > > Sent: Friday, May 15, 2020 4:52 AM > > To: devel@edk2.groups.io > > Cc: Gao, Liming ; Kinney, Michael D > > ; Wang, Jian J ; > Wu, > > Hao A ; Yao, Jiewen ; Zhang, Chao > > B ; fel...@ami.com; > > oleks...@ami.com > > Subject: [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image Header extension > > > > Add bitmask to structure which gives a binary-inspectable mechanism to > > determine if a capsule contains an authentication section or depex section. > > (UEFI 2.8 errata a, mantis 2026) > > > > Signed-off-by: Oleksiy Yakovlev > > > > Reviewed-by: Wei6 Xu > > --- > > MdeModulePkg/Application/CapsuleApp/CapsuleDump.c | 7 -- > > .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 26 > > +- > > 2 files changed, 25 insertions(+), 8 deletions(-) > > > > diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c > > b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c > > index 7e3e072..057bfa8 100644 > > --- a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c > > +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c > > @@ -96,8 +96,11 @@ DumpFmpCapsule ( > > Print(L" UpdateImageIndex - 0x%x\n", > > FmpImageHeader->UpdateImageIndex); > > Print(L" UpdateImageSize- 0x%x\n", > > FmpImageHeader->UpdateImageSize); > > Print(L" UpdateVendorCodeSize - 0x%x\n", > > FmpImageHeader->UpdateVendorCodeSize); > > -if (FmpImageHeader->Version >= > > EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { > > - Print(L" UpdateHardwareInstance - 0x%lx\n", > > FmpImageHeader->UpdateHardwareInstance); > > +if (ImageHeader->Version >= 1) { > > +DEBUG((DEBUG_VERBOSE, "UpdateHardwareInstance - 0x%lx\n", > > ImageHeader->UpdateHardwareInstance)); > > + if (ImageHeader->Version >= > > EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { > > + DEBUG((DEBUG_VERBOSE, "ImageCapsuleSupport - 0x%lx\n", > > ImageHeader->ImageCapsuleSupport)); > > + } > > } > >} > [Liming] Here should be FmpImageHeader > > > } > > diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c > b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c > > index 5dda561..68cece6 100644 > > --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c > > +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c >
Re: [edk2-devel] [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image Header extension
Hi Liming. 2 patches reviewed. Regards, Oleksiy. -Original Message- From: Gao, Liming [mailto:liming@intel.com] Sent: Monday, May 18, 2020 8:40 PM To: devel@edk2.groups.io; Oleksiy Yakovlev Cc: Kinney, Michael D; Wang, Jian J; Wu, Hao A; Yao, Jiewen; Zhang, Chao B; Felix Polyudov; Xu, Wei6 Subject: RE: [edk2-devel] [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image Header extension Oleksiy: Wei has sent the updated patches for the changes in MdeModulePkg and SignedCapsulePkg. https://edk2.groups.io/g/devel/message/59652 He bases on your patch and does some updated. Please help review whether it is ok to you. You don't need to submit this patch set again. Thanks Liming > -Original Message- > From: devel@edk2.groups.io On Behalf Of Oleksiy > Yakovlev > Sent: Tuesday, May 19, 2020 6:10 AM > To: Gao, Liming ; devel@edk2.groups.io > Cc: Kinney, Michael D ; Wang, Jian J > ; Wu, Hao A ; Yao, > Jiewen ; Zhang, Chao B ; Felix > Polyudov ; Xu, Wei6 > > Subject: Re: [edk2-devel] [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image > Header extension > > Hi Liming. > > From Your comment here I understand that you are waiting for somebody else > here. > But looking through your comments - I agree with comment 1, but think other > two are incorrect. > So do I need to resubmit 2.8a series? > > Regards, Oleksiy. > > > > -Original Message- > From: Gao, Liming [mailto:liming@intel.com] > Sent: Friday, May 15, 2020 2:13 AM > To: Oleksiy Yakovlev; devel@edk2.groups.io > Cc: Kinney, Michael D; Wang, Jian J; Wu, Hao A; Yao, Jiewen; Zhang, Chao B; > Felix Polyudov; Xu, Wei6 > Subject: RE: [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image Header > extension > > Oleksiy: > When create PR, I find some issue in this patch. The same issue is also in > SignedCapsulePkg. Because original comments from Xu > Wei6, I would like Wei to provide the updated patch for MdeModulePkg and > SignedCapsulePkg. > > Thanks > Liming > > -Original Message- > > From: Oleksiy Yakovlev > > Sent: Friday, May 15, 2020 4:52 AM > > To: devel@edk2.groups.io > > Cc: Gao, Liming ; Kinney, Michael D > > ; Wang, Jian J ; > Wu, > > Hao A ; Yao, Jiewen ; Zhang, Chao > > B ; fel...@ami.com; > > oleks...@ami.com > > Subject: [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image Header extension > > > > Add bitmask to structure which gives a binary-inspectable mechanism to > > determine if a capsule contains an authentication section or depex section. > > (UEFI 2.8 errata a, mantis 2026) > > > > Signed-off-by: Oleksiy Yakovlev > > > > Reviewed-by: Wei6 Xu > > --- > > MdeModulePkg/Application/CapsuleApp/CapsuleDump.c | 7 -- > > .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 26 > > +- > > 2 files changed, 25 insertions(+), 8 deletions(-) > > > > diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c > > b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c > > index 7e3e072..057bfa8 100644 > > --- a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c > > +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c > > @@ -96,8 +96,11 @@ DumpFmpCapsule ( > > Print(L" UpdateImageIndex - 0x%x\n", > > FmpImageHeader->UpdateImageIndex); > > Print(L" UpdateImageSize- 0x%x\n", > > FmpImageHeader->UpdateImageSize); > > Print(L" UpdateVendorCodeSize - 0x%x\n", > > FmpImageHeader->UpdateVendorCodeSize); > > -if (FmpImageHeader->Version >= > > EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { > > - Print(L" UpdateHardwareInstance - 0x%lx\n", > > FmpImageHeader->UpdateHardwareInstance); > > +if (ImageHeader->Version >= 1) { > > +DEBUG((DEBUG_VERBOSE, "UpdateHardwareInstance - 0x%lx\n", > > ImageHeader->UpdateHardwareInstance)); > > + if (ImageHeader->Version >= > > EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { > > + DEBUG((DEBUG_VERBOSE, "ImageCapsuleSupport - 0x%lx\n", > > ImageHeader->ImageCapsuleSupport)); > > + } > > } > >} > [Liming] Here should be FmpImageHeader > > > } > > diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c > b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c > > index 5dda561..68cece6 100644 > > --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c > > +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c > > @@ -285,8 +285,10 @@
Re: [edk2-devel] [PATCH 2/2] SignedCapsulePkg: Add FMP Capsule Image Header extension
Reviewed-by: Oleksiy Yakovlev -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59832): https://edk2.groups.io/g/devel/message/59832 Mute This Topic: https://groups.io/mt/74222870/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 1/2] MdeModulePkg: Add FMP Capsule Image Header extension
Reviewed-by: Oleksiy Yakovlev -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59831): https://edk2.groups.io/g/devel/message/59831 Mute This Topic: https://groups.io/mt/74222868/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image Header extension
Hi Liming. >From Your comment here I understand that you are waiting for somebody else >here. But looking through your comments - I agree with comment 1, but think other two are incorrect. So do I need to resubmit 2.8a series? Regards, Oleksiy. -Original Message- From: Gao, Liming [mailto:liming@intel.com] Sent: Friday, May 15, 2020 2:13 AM To: Oleksiy Yakovlev; devel@edk2.groups.io Cc: Kinney, Michael D; Wang, Jian J; Wu, Hao A; Yao, Jiewen; Zhang, Chao B; Felix Polyudov; Xu, Wei6 Subject: RE: [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image Header extension Oleksiy: When create PR, I find some issue in this patch. The same issue is also in SignedCapsulePkg. Because original comments from Xu Wei6, I would like Wei to provide the updated patch for MdeModulePkg and SignedCapsulePkg. Thanks Liming > -Original Message- > From: Oleksiy Yakovlev > Sent: Friday, May 15, 2020 4:52 AM > To: devel@edk2.groups.io > Cc: Gao, Liming ; Kinney, Michael D > ; Wang, Jian J ; Wu, > Hao A ; Yao, Jiewen ; Zhang, Chao B > ; fel...@ami.com; > oleks...@ami.com > Subject: [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image Header extension > > Add bitmask to structure which gives a binary-inspectable mechanism to > determine if a capsule contains an authentication section or depex section. > (UEFI 2.8 errata a, mantis 2026) > > Signed-off-by: Oleksiy Yakovlev > > Reviewed-by: Wei6 Xu > --- > MdeModulePkg/Application/CapsuleApp/CapsuleDump.c | 7 -- > .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 26 > +- > 2 files changed, 25 insertions(+), 8 deletions(-) > > diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c > b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c > index 7e3e072..057bfa8 100644 > --- a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c > +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c > @@ -96,8 +96,11 @@ DumpFmpCapsule ( > Print(L" UpdateImageIndex - 0x%x\n", > FmpImageHeader->UpdateImageIndex); > Print(L" UpdateImageSize- 0x%x\n", > FmpImageHeader->UpdateImageSize); > Print(L" UpdateVendorCodeSize - 0x%x\n", > FmpImageHeader->UpdateVendorCodeSize); > -if (FmpImageHeader->Version >= > EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { > - Print(L" UpdateHardwareInstance - 0x%lx\n", > FmpImageHeader->UpdateHardwareInstance); > +if (ImageHeader->Version >= 1) { > +DEBUG((DEBUG_VERBOSE, "UpdateHardwareInstance - 0x%lx\n", > ImageHeader->UpdateHardwareInstance)); > + if (ImageHeader->Version >= > EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { > + DEBUG((DEBUG_VERBOSE, "ImageCapsuleSupport - 0x%lx\n", > ImageHeader->ImageCapsuleSupport)); > + } > } >} [Liming] Here should be FmpImageHeader > } > diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c > b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c > index 5dda561..68cece6 100644 > --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c > +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c > @@ -285,8 +285,10 @@ ValidateFmpCapsule ( >DEBUG((DEBUG_ERROR, "ImageHeader->Version(0x%x) Unknown\n", > ImageHeader->Version)); >return EFI_INVALID_PARAMETER; > } > -if (ImageHeader->Version < > EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { > +if (ImageHeader->Version == 1) { >FmpImageHeaderSize = > OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, > UpdateHardwareInstance); > +} else { > + FmpImageHeaderSize = > OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport); > } [Liming] Here should have one condition for ImageHeader->Version == 2. > if (FmpImageSize < FmpImageHeaderSize) { >DEBUG((DEBUG_ERROR, "FmpImageSize(0x%lx) < > FmpImageHeaderSize(0x%x)\n", FmpImageSize, FmpImageHeaderSize)); > @@ -519,8 +521,11 @@ DumpFmpCapsule ( > DEBUG((DEBUG_VERBOSE, "UpdateImageIndex - 0x%x\n", > ImageHeader->UpdateImageIndex)); > DEBUG((DEBUG_VERBOSE, "UpdateImageSize- 0x%x\n", > ImageHeader->UpdateImageSize)); > DEBUG((DEBUG_VERBOSE, "UpdateVendorCodeSize - 0x%x\n", > ImageHeader->UpdateVendorCodeSize)); > -if (ImageHeader->Version >= > EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { > - DEBUG((DEBUG_VERBOSE, "UpdateHardwareInstance - 0x%lx\n", > ImageHeader->UpdateHardwareInstance)); > +
[edk2-devel] [PATCH V7 4/6] MdePkg: Add FMP Capsule Image Header extension
Add bitmask to structure which gives a binary-inspectable mechanism to determine if a capsule contains an authentication section or depex section. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Guid/FmpCapsule.h | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/Guid/FmpCapsule.h b/MdePkg/Include/Guid/FmpCapsule.h index fb8c346..bd5cb77 100644 --- a/MdePkg/Include/Guid/FmpCapsule.h +++ b/MdePkg/Include/Guid/FmpCapsule.h @@ -79,13 +79,22 @@ typedef struct { /// therefore can be modified without changing the Auth data. /// UINT64 UpdateHardwareInstance; + + /// + /// A 64-bit bitmask that determines what sections are added to the payload. + /// #define CAPSULE_SUPPORT_AUTHENTICATION 0x0001 + /// #define CAPSULE_SUPPORT_DEPENDENCY 0x0002 + /// + UINT64 ImageCapsuleSupport; } EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER; #pragma pack() #define EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER_INIT_VERSION 0x0001 -#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x0002 +#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x0003 +#define CAPSULE_SUPPORT_AUTHENTICATION0x0001 +#define CAPSULE_SUPPORT_DEPENDENCY0x0002 extern EFI_GUID gEfiFmpCapsuleGuid; -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59593): https://edk2.groups.io/g/devel/message/59593 Mute This Topic: https://groups.io/mt/74214497/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V7 3/6] MdePkg: Add EFI_RT_PROPERTIES_TABLE
Define Guid & data structure for EFI_RT_PROPERTIES_TABLE, designed to be published by a platform if it no longer supports all EFI runtime services once ExitBootServices() has been called by the OS. (UEFI 2.8 errata a, mantis 2049) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Guid/RtPropertiesTable.h | 69 + MdePkg/MdePkg.dec | 5 +++ 2 files changed, 74 insertions(+) create mode 100644 MdePkg/Include/Guid/RtPropertiesTable.h diff --git a/MdePkg/Include/Guid/RtPropertiesTable.h b/MdePkg/Include/Guid/RtPropertiesTable.h new file mode 100644 index 000..6b6a1a1 --- /dev/null +++ b/MdePkg/Include/Guid/RtPropertiesTable.h @@ -0,0 +1,69 @@ +/** @file +Guid & data structure for EFI_RT _PROPERTIES_TABLE, designed to be published by a +platform if it no longer supports all EFI runtime services once ExitBootServices() +has been called by the OS. Introduced in UEFI 2.8a. + + +Copyright (c) 2020, American Megatrends International LLC. All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef __RT_PROPERTIES_TABLE_GUID_H__ +#define __RT_PROPERTIES_TABLE_GUID_H__ + +// +// Table, defined here, should be published by a platform if it no longer supports all EFI runtime +// services once ExitBootServices() has been called by the OS. Note that this is merely a hint +// to the OS, which it is free to ignore, and so the platform is still required to provide callable +// implementations of unsupported runtime services that simply return EFI_UNSUPPORTED. +// +#define EFI_RT_PROPERTIES_TABLE_GUID \ +{ 0xeb66918a, 0x7eef, 0x402a, \ +{ 0x84, 0x2e, 0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9 }} + + + + +#pragma pack(1) + +typedef struct { + /// + /// Version of the structure, must be 0x1. + /// + UINT16 Version; + + /// + /// Size in bytes of the entire EFI_RT_PROPERTIES_TABLE, must be 8. + /// + UINT16 Length; + + /// + /// Bitmask of which calls are or are not supported, where a bit set to 1 indicates + /// that the call is supported, and 0 indicates that it is not. + /// + UINT32 RuntimeServicesSupported; +} EFI_RT_PROPERTIES_TABLE; + +#pragma pack() + +#define EFI_RT_PROPERTIES_TABLE_VERSION 0x1 + +#define EFI_RT_SUPPORTED_GET_TIME 0x0001 +#define EFI_RT_SUPPORTED_SET_TIME 0x0002 +#define EFI_RT_SUPPORTED_GET_WAKEUP_TIME0x0004 +#define EFI_RT_SUPPORTED_SET_WAKEUP_TIME0x0008 +#define EFI_RT_SUPPORTED_GET_VARIABLE 0x0010 +#define EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME 0x0020 +#define EFI_RT_SUPPORTED_SET_VARIABLE 0x0040 +#define EFI_RT_SUPPORTED_SET_VIRTUAL_ADDRESS_MAP0x0080 +#define EFI_RT_SUPPORTED_CONVERT_POINTER0x0100 +#define EFI_RT_SUPPORTED_GET_NEXT_HIGH_MONOTONIC_COUNT 0x0200 +#define EFI_RT_SUPPORTED_RESET_SYSTEM 0x0400 +#define EFI_RT_SUPPORTED_UPDATE_CAPSULE 0x0800 +#define EFI_RT_SUPPORTED_QUERY_CAPSULE_CAPABILITIES 0x1000 +#define EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO0x2000 + +extern EFI_GUID gEfiRtPropertiesTableGuid; + +#endif diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 5ac1189..2bbf387 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -654,6 +654,11 @@ ## Include/Guid/Btt.h gEfiBttAbstractionGuid = { 0x18633bfc, 0x1735, 0x4217, { 0x8a, 0xc9, 0x17, 0x23, 0x92, 0x82, 0xd3, 0xf8 }} + # GUIDs defined in UEFI2.8a + # + ## Include/Guid/RtPropertiesTable.h + gEfiRtPropertiesTableGuid = { 0xeb66918a, 0x7eef, 0x402a, { 0x84, 0x2e, 0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9 }} + # # GUID defined in PI1.0 # -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59592): https://edk2.groups.io/g/devel/message/59592 Mute This Topic: https://groups.io/mt/74214496/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V7 2/6] MdePkg: Fix OUT parameters marked as IN OUT
Some OUT parameters in the specification were mistakenly marked as IN OUT. "IN OUT" replaced with "OUT" in the following interfaces EFI_BOOT_SERVICES.GetMemoryMap():MemoryMap EFI_BOOT_SERVICES.LocateHandleBuffer():NoHandles EFI_SIMPLE_POINTER_PROTOCOL.GetState():State EFI_ABSOLUTE_POINTER_PROTOCOL.GetState():State EFI_EDID_OVERRIDE_PROTOCOL.GetEdid():EdidSize and Edid EFI_ATA_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath EFI_SD_MMC_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath EFI_EXT_SCSI_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImage():Image (UEFI 2.8 errata a, mantis 2035) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Protocol/AbsolutePointer.h| 2 +- MdePkg/Include/Protocol/AtaPassThru.h| 4 ++-- MdePkg/Include/Protocol/EdidOverride.h | 4 ++-- MdePkg/Include/Protocol/FirmwareManagement.h | 4 ++-- MdePkg/Include/Protocol/NvmExpressPassthru.h | 4 ++-- MdePkg/Include/Protocol/ScsiPassThruExt.h| 2 +- MdePkg/Include/Protocol/SdMmcPassThru.h | 4 ++-- MdePkg/Include/Protocol/SimplePointer.h | 2 +- MdePkg/Include/Uefi/UefiSpec.h | 8 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/MdePkg/Include/Protocol/AbsolutePointer.h b/MdePkg/Include/Protocol/AbsolutePointer.h index 77d34ae..d59ac97 100644 --- a/MdePkg/Include/Protocol/AbsolutePointer.h +++ b/MdePkg/Include/Protocol/AbsolutePointer.h @@ -169,7 +169,7 @@ typedef EFI_STATUS (EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE)( IN EFI_ABSOLUTE_POINTER_PROTOCOL *This, - IN OUT EFI_ABSOLUTE_POINTER_STATE *State + OUT EFI_ABSOLUTE_POINTER_STATE*State ); diff --git a/MdePkg/Include/Protocol/AtaPassThru.h b/MdePkg/Include/Protocol/AtaPassThru.h index ce6f57f..888dff2 100644 --- a/MdePkg/Include/Protocol/AtaPassThru.h +++ b/MdePkg/Include/Protocol/AtaPassThru.h @@ -315,7 +315,7 @@ EFI_STATUS @param[in] PortMultiplierPort The port multiplier port number of the ATA device for which a device path node is to be allocated and built. If there is no port multiplier, then specify 0x. - @param[in,out] DevicePath A pointer to a single device path node that describes the ATA + @param[out]DevicePath A pointer to a single device path node that describes the ATA device specified by Port and PortMultiplierPort. This function is responsible for allocating the buffer DevicePath with the boot service AllocatePool(). It is the caller's responsibility @@ -334,7 +334,7 @@ EFI_STATUS IN EFI_ATA_PASS_THRU_PROTOCOL *This, IN UINT16 Port, IN UINT16 PortMultiplierPort, - IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath + OUTEFI_DEVICE_PATH_PROTOCOL **DevicePath ); /** diff --git a/MdePkg/Include/Protocol/EdidOverride.h b/MdePkg/Include/Protocol/EdidOverride.h index 9036f8b..709ee48 100644 --- a/MdePkg/Include/Protocol/EdidOverride.h +++ b/MdePkg/Include/Protocol/EdidOverride.h @@ -44,8 +44,8 @@ EFI_STATUS IN EFI_EDID_OVERRIDE_PROTOCOL *This, IN EFI_HANDLE *ChildHandle, OUT UINT32 *Attributes, - IN OUT UINTN*EdidSize, - IN OUT UINT8**Edid + OUT UINTN *EdidSize, + OUT UINT8 **Edid ); /// diff --git a/MdePkg/Include/Protocol/FirmwareManagement.h b/MdePkg/Include/Protocol/FirmwareManagement.h index 297bb5f..b501261 100644 --- a/MdePkg/Include/Protocol/FirmwareManagement.h +++ b/MdePkg/Include/Protocol/FirmwareManagement.h @@ -345,7 +345,7 @@ EFI_STATUS @param[in] This A pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance. @param[in] ImageIndex A unique number identifying the firmware image(s) within the device. The number is between 1 and DescriptorCount. - @param[in, out] Image Points to the buffer where the current image is copied to. + @param[out] Image Points to the buffer where the current image is copied to. @param[in, out] ImageSize On entry, points to the size of the buffer pointed to by Image, in bytes. On return, points to the length of the image, in bytes. @@ -364,7 +364,7 @@ EFI_STATUS (EFIAPI *EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE)( IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN UINT8 ImageIndex, - IN OUT VOID *Image, + OUT VOID *Image, IN OUT UINTN
[edk2-devel] [PATCH V7 1/6] MdePkg: Add new CPER Notification types
Add SEA, SEI, and PEI CPER Notification types defined in UEFI 2.8 errata a. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Guid/Cper.h | 15 +++ MdePkg/MdePkg.dec | 9 + 2 files changed, 24 insertions(+) diff --git a/MdePkg/Include/Guid/Cper.h b/MdePkg/Include/Guid/Cper.h index 0cacd30..948f586 100644 --- a/MdePkg/Include/Guid/Cper.h +++ b/MdePkg/Include/Guid/Cper.h @@ -95,6 +95,18 @@ typedef struct { { \ 0x667DD791, 0xC6B3, 0x4c27, { 0x8A, 0x6B, 0x0F, 0x8E, 0x72, 0x2D, 0xEB, 0x41 } \ } +#define EFI_EVENT_NOTIFICATION_TYPE_DMAR_SEA \ + { \ +0x9A78788A, 0xBBE8, 0x11E4, { 0x80, 0x9E, 0x67, 0x61, 0x1E, 0x5D, 0x46, 0xB0 } \ + } +#define EFI_EVENT_NOTIFICATION_TYPE_DMAR_SEI \ + { \ +0x5C284C81, 0xB0AE, 0x4E87, { 0xA3, 0x22, 0xB0, 0x4C, 0x85, 0x62, 0x43, 0x23 } \ + } +#define EFI_EVENT_NOTIFICATION_TYPE_DMAR_PEI \ + { \ +0x09A9D5AC, 0x5204, 0x4214, { 0x96, 0xE5, 0x94, 0x99, 0x2E, 0x75, 0x2B, 0xCD } \ + } ///@} /// @@ -1207,6 +1219,9 @@ extern EFI_GUID gEfiEventNotificationTypeInitGuid; extern EFI_GUID gEfiEventNotificationTypeNmiGuid; extern EFI_GUID gEfiEventNotificationTypeBootGuid; extern EFI_GUID gEfiEventNotificationTypeDmarGuid; +extern EFI_GUID gEfiEventNotificationTypeSeaGuid; +extern EFI_GUID gEfiEventNotificationTypeSeiGuid; +extern EFI_GUID gEfiEventNotificationTypePeiGuid; extern EFI_GUID gEfiProcessorGenericErrorSectionGuid; extern EFI_GUID gEfiProcessorSpecificErrorSectionGuid; diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 86545ac..5ac1189 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -437,6 +437,15 @@ gEfiEventNotificationTypeDmarGuid = { 0x667DD791, 0xC6B3, 0x4c27, { 0x8A, 0x6B, 0x0F, 0x8E, 0x72, 0x2D, 0xEB, 0x41 }} ## Include/Guid/Cper.h + gEfiEventNotificationTypeSeaGuid = { 0x9A78788A, 0xBBE8, 0x11E4, { 0x80, 0x9E, 0x67, 0x61, 0x1E, 0x5D, 0x46, 0xB0 }} + + ## Include/Guid/Cper.h + gEfiEventNotificationTypeSeiGuid = { 0x5C284C81, 0xB0AE, 0x4E87, { 0xA3, 0x22, 0xB0, 0x4C, 0x85, 0x62, 0x43, 0x23 }} + + ## Include/Guid/Cper.h + gEfiEventNotificationTypePeiGuid = { 0x09A9D5AC, 0x5204, 0x4214, { 0x96, 0xE5, 0x94, 0x99, 0x2E, 0x75, 0x2B, 0xCD }} + + ## Include/Guid/Cper.h gEfiProcessorGenericErrorSectionGuid = { 0x9876ccad, 0x47b4, 0x4bdb, { 0xb6, 0x5e, 0x16, 0xf1, 0x93, 0xc4, 0xf3, 0xdb }} ## Include/Guid/Cper.h -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59590): https://edk2.groups.io/g/devel/message/59590 Mute This Topic: https://groups.io/mt/74214494/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V7 6/6] SignedCapsulePkg: Add FMP Capsule Image Header extension
Add bitmask to structure which gives a binary-inspectable mechanism to determine if a capsule contains an authentication section or depex section. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Wei6 Xu Reviewed-by: Chao Zhang --- .../RecoveryModuleLoadPei/RecoveryModuleLoadPei.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c index 53b821c..12cc235 100644 --- a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c +++ b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c @@ -328,10 +328,15 @@ ValidateFmpCapsule ( DEBUG((DEBUG_ERROR, "ImageHeader->Version(0x%x) Unknown\n", ImageHeader->Version)); return EFI_INVALID_PARAMETER; } -if (ImageHeader->Version < EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { +/// +/// Current Init ImageHeader version is 3. UpdateHardwareInstance field was added in version 2 +/// and ImageCapsuleSupport field was added in version 3 +/// +if (ImageHeader->Version == 1) { FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); +} else { + FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport); } - // No overflow if (FmpImageSize != (UINT64)FmpImageHeaderSize + (UINT64)ImageHeader->UpdateImageSize + (UINT64)ImageHeader->UpdateVendorCodeSize) { DEBUG((DEBUG_ERROR, "FmpImageSize(0x%lx) mismatch, UpdateImageSize(0x%x) UpdateVendorCodeSize(0x%x)\n", FmpImageSize, ImageHeader->UpdateImageSize, ImageHeader->UpdateVendorCodeSize)); @@ -639,9 +644,14 @@ ProcessFmpCapsuleImage ( } else { // // If the EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER is version 1, only match ImageTypeId. - // Header should exclude UpdateHardwareInstance field + // Header should exclude UpdateHardwareInstance field. + // If version is 2 Header should exclude ImageCapsuleSupport field. // - Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); + if (ImageHeader->Version == 1) { +Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); + } else { +Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport); + } } Status = ProcessRecoveryImage (Image, ImageHeader->UpdateImageSize); -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59595): https://edk2.groups.io/g/devel/message/59595 Mute This Topic: https://groups.io/mt/74214499/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V7 5/6] MdeModulePkg: Add FMP Capsule Image Header extension
Add bitmask to structure which gives a binary-inspectable mechanism to determine if a capsule contains an authentication section or depex section. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Wei6 Xu --- MdeModulePkg/Application/CapsuleApp/CapsuleDump.c | 7 -- .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 26 +- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c index 7e3e072..057bfa8 100644 --- a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c @@ -96,8 +96,11 @@ DumpFmpCapsule ( Print(L" UpdateImageIndex - 0x%x\n", FmpImageHeader->UpdateImageIndex); Print(L" UpdateImageSize- 0x%x\n", FmpImageHeader->UpdateImageSize); Print(L" UpdateVendorCodeSize - 0x%x\n", FmpImageHeader->UpdateVendorCodeSize); -if (FmpImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { - Print(L" UpdateHardwareInstance - 0x%lx\n", FmpImageHeader->UpdateHardwareInstance); +if (ImageHeader->Version >= 1) { +DEBUG((DEBUG_VERBOSE, "UpdateHardwareInstance - 0x%lx\n", ImageHeader->UpdateHardwareInstance)); + if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { + DEBUG((DEBUG_VERBOSE, "ImageCapsuleSupport - 0x%lx\n", ImageHeader->ImageCapsuleSupport)); + } } } } diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c index 5dda561..68cece6 100644 --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c @@ -285,8 +285,10 @@ ValidateFmpCapsule ( DEBUG((DEBUG_ERROR, "ImageHeader->Version(0x%x) Unknown\n", ImageHeader->Version)); return EFI_INVALID_PARAMETER; } -if (ImageHeader->Version < EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { +if (ImageHeader->Version == 1) { FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); +} else { + FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport); } if (FmpImageSize < FmpImageHeaderSize) { DEBUG((DEBUG_ERROR, "FmpImageSize(0x%lx) < FmpImageHeaderSize(0x%x)\n", FmpImageSize, FmpImageHeaderSize)); @@ -519,8 +521,11 @@ DumpFmpCapsule ( DEBUG((DEBUG_VERBOSE, "UpdateImageIndex - 0x%x\n", ImageHeader->UpdateImageIndex)); DEBUG((DEBUG_VERBOSE, "UpdateImageSize- 0x%x\n", ImageHeader->UpdateImageSize)); DEBUG((DEBUG_VERBOSE, "UpdateVendorCodeSize - 0x%x\n", ImageHeader->UpdateVendorCodeSize)); -if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { - DEBUG((DEBUG_VERBOSE, "UpdateHardwareInstance - 0x%lx\n", ImageHeader->UpdateHardwareInstance)); +if (ImageHeader->Version >= 1) { + DEBUG((DEBUG_INFO, "(UpdateHardwareInstance - 0x%x)", ImageHeader->UpdateHardwareInstance)); + if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { +DEBUG((DEBUG_INFO, "(ImageCapsuleSupport - 0x%x)", ImageHeader->ImageCapsuleSupport)); + } } } } @@ -928,9 +933,14 @@ SetFmpImageData ( } else { // // If the EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER is version 1, -// Header should exclude UpdateHardwareInstance field +// Header should exclude UpdateHardwareInstance field, and +// ImageCapsuleSupport field if version is 2. // -Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); +if (ImageHeader->Version == 1) { + Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); +} else { + Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport); +} } if (ImageHeader->UpdateVendorCodeSize == 0) { @@ -945,6 +955,7 @@ SetFmpImageData ( DEBUG((DEBUG_INFO, "ImageIndex - 0x%x ", ImageHeader->UpdateImageIndex)); if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { DEBUG((DEBUG_INFO, "(UpdateHardwareInstance - 0x%x)", ImageHeader->UpdateHardwareInstance)); +DEBUG((DEBUG_INFO, "(ImageCapsuleSupport - 0x%x)", ImageHeader->ImageCapsuleSupport)); } DEBUG((DEBUG_INFO, "\n")); @@
[edk2-devel] [PATCH V7 0/6] Add definitions introduced in UEFI 2.8a
Following patches add/update structures/definitions, that were introduced/modified by UEFI Spec v.2.8 errata a from Feb 14. Oleksiy Yakovlev (6): MdePkg: Add new CPER Notification types MdePkg: Fix OUT parameters marked as IN OUT MdePkg: Add EFI_RT_PROPERTIES_TABLE MdePkg: Add FMP Capsule Image Header extension MdeModulePkg: Add FMP Capsule Image Header extension SignedCapsulePkg: Add FMP Capsule Image Header extension MdeModulePkg/Application/CapsuleApp/CapsuleDump.c | 7 ++- .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 26 ++-- MdePkg/Include/Guid/Cper.h | 15 + MdePkg/Include/Guid/FmpCapsule.h | 11 +++- MdePkg/Include/Guid/RtPropertiesTable.h| 69 ++ MdePkg/Include/Protocol/AbsolutePointer.h | 2 +- MdePkg/Include/Protocol/AtaPassThru.h | 4 +- MdePkg/Include/Protocol/EdidOverride.h | 4 +- MdePkg/Include/Protocol/FirmwareManagement.h | 4 +- MdePkg/Include/Protocol/NvmExpressPassthru.h | 4 +- MdePkg/Include/Protocol/ScsiPassThruExt.h | 2 +- MdePkg/Include/Protocol/SdMmcPassThru.h| 4 +- MdePkg/Include/Protocol/SimplePointer.h| 2 +- MdePkg/Include/Uefi/UefiSpec.h | 8 +-- MdePkg/MdePkg.dec | 14 + .../RecoveryModuleLoadPei/RecoveryModuleLoadPei.c | 18 -- 16 files changed, 164 insertions(+), 30 deletions(-) create mode 100644 MdePkg/Include/Guid/RtPropertiesTable.h -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59589): https://edk2.groups.io/g/devel/message/59589 Mute This Topic: https://groups.io/mt/74214493/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v7 1/7] MdePkg: Extend SERIAL_IO with DeviceTypeGuid
There was a mistake in all previous v here. I took it from original ECR and misted correction. Now it is up to spec. Regards, Oleksiy. -Original Message- From: Jiang, Guomin [mailto:guomin.ji...@intel.com] Sent: Wednesday, May 13, 2020 11:43 PM To: devel@edk2.groups.io; Oleksiy Yakovlev Cc: Feng, Bob C; Gao, Liming; Kinney, Michael D; Felix Polyudov Subject: RE: [edk2-devel] [PATCH v7 1/7] MdePkg: Extend SERIAL_IO with DeviceTypeGuid Add some comments. > -Original Message- > From: devel@edk2.groups.io On Behalf Of Oleksiy > Yakovlev > Sent: Thursday, May 14, 2020 3:53 AM > To: devel@edk2.groups.io > Cc: Feng, Bob C ; Gao, Liming > ; Kinney, Michael D ; > fel...@ami.com; oleks...@ami.com > Subject: [edk2-devel] [PATCH v7 1/7] MdePkg: Extend SERIAL_IO with > DeviceTypeGuid > > EFI_SERIAL_IO_PROTOCOL_REVISION incremented to 0x00010001. > CONST EFI_GUID *DeviceTypeGuid field added to the protocol structure. > UEFI 2.8 mantis 1832. > > Signed-off-by: Oleksiy Yakovlev > > Reviewed-by: Liming Gao > --- > MdePkg/Include/Protocol/SerialIo.h | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/MdePkg/Include/Protocol/SerialIo.h > b/MdePkg/Include/Protocol/SerialIo.h > index 51eaa53..e2e0c61 100644 > --- a/MdePkg/Include/Protocol/SerialIo.h > +++ b/MdePkg/Include/Protocol/SerialIo.h > @@ -263,6 +263,7 @@ typedef struct { > } EFI_SERIAL_IO_MODE; > > #define EFI_SERIAL_IO_PROTOCOL_REVISION0x0001 > +#define EFI_SERIAL_IO_PROTOCOL_REVISION1p1 0x00010001 Why add this new definition, it is not exist in patch v5 but exist in patch v6? > #define SERIAL_IO_INTERFACE_REVISION > EFI_SERIAL_IO_PROTOCOL_REVISION > > /// > @@ -287,6 +288,14 @@ struct _EFI_SERIAL_IO_PROTOCOL { >/// Pointer to SERIAL_IO_MODE data. >/// >EFI_SERIAL_IO_MODE *Mode; > + /// > + /// Pointer to a GUID identifying the device connected to the serial port. > + /// This field is NULL when the protocol is installed by the serial > + port /// driver and may be populated by a platform driver for a > + serial port /// with a known device attached. The field will remain > + NULL if there is /// no platform serial device identification information > available. > + /// > + CONST EFI_GUID *DeviceTypeGuid; // Revision 1.1 > }; > > extern EFI_GUID gEfiSerialIoProtocolGuid; > -- > 2.9.0.windows.1 > > > Please consider the environment before printing this email. > > The information contained in this message may be confidential and > proprietary to American Megatrends (AMI). This communication is intended > to be read only by the individual or entity to whom it is addressed or by > their > designee. If the reader of this message is not the intended recipient, you are > on notice that any distribution of this message, in any form, is strictly > prohibited. Please promptly notify the sender by reply e-mail or by > telephone at 770-246-8600, and then delete or destroy all copies of the > transmission. > > Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59564): https://edk2.groups.io/g/devel/message/59564 Mute This Topic: https://groups.io/mt/74190439/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V6 2/6] MdePkg: Fix OUT parameters marked as IN OUT
Some OUT parameters in the specification were mistakenly marked as IN OUT. "IN OUT" replaced with "OUT" in the following interfaces EFI_BOOT_SERVICES.GetMemoryMap():MemoryMap EFI_BOOT_SERVICES.LocateHandleBuffer():NoHandles EFI_SIMPLE_POINTER_PROTOCOL.GetState():State EFI_ABSOLUTE_POINTER_PROTOCOL.GetState():State EFI_EDID_OVERRIDE_PROTOCOL.GetEdid():EdidSize and Edid EFI_ATA_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath EFI_SD_MMC_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath EFI_EXT_SCSI_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImage():Image (UEFI 2.8 errata a, mantis 2035) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Protocol/AbsolutePointer.h| 2 +- MdePkg/Include/Protocol/AtaPassThru.h| 4 ++-- MdePkg/Include/Protocol/EdidOverride.h | 4 ++-- MdePkg/Include/Protocol/FirmwareManagement.h | 4 ++-- MdePkg/Include/Protocol/NvmExpressPassthru.h | 4 ++-- MdePkg/Include/Protocol/ScsiPassThruExt.h| 2 +- MdePkg/Include/Protocol/SdMmcPassThru.h | 4 ++-- MdePkg/Include/Protocol/SimplePointer.h | 2 +- MdePkg/Include/Uefi/UefiSpec.h | 8 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/MdePkg/Include/Protocol/AbsolutePointer.h b/MdePkg/Include/Protocol/AbsolutePointer.h index 77d34ae..d59ac97 100644 --- a/MdePkg/Include/Protocol/AbsolutePointer.h +++ b/MdePkg/Include/Protocol/AbsolutePointer.h @@ -169,7 +169,7 @@ typedef EFI_STATUS (EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE)( IN EFI_ABSOLUTE_POINTER_PROTOCOL *This, - IN OUT EFI_ABSOLUTE_POINTER_STATE *State + OUT EFI_ABSOLUTE_POINTER_STATE*State ); diff --git a/MdePkg/Include/Protocol/AtaPassThru.h b/MdePkg/Include/Protocol/AtaPassThru.h index ce6f57f..888dff2 100644 --- a/MdePkg/Include/Protocol/AtaPassThru.h +++ b/MdePkg/Include/Protocol/AtaPassThru.h @@ -315,7 +315,7 @@ EFI_STATUS @param[in] PortMultiplierPort The port multiplier port number of the ATA device for which a device path node is to be allocated and built. If there is no port multiplier, then specify 0x. - @param[in,out] DevicePath A pointer to a single device path node that describes the ATA + @param[out]DevicePath A pointer to a single device path node that describes the ATA device specified by Port and PortMultiplierPort. This function is responsible for allocating the buffer DevicePath with the boot service AllocatePool(). It is the caller's responsibility @@ -334,7 +334,7 @@ EFI_STATUS IN EFI_ATA_PASS_THRU_PROTOCOL *This, IN UINT16 Port, IN UINT16 PortMultiplierPort, - IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath + OUTEFI_DEVICE_PATH_PROTOCOL **DevicePath ); /** diff --git a/MdePkg/Include/Protocol/EdidOverride.h b/MdePkg/Include/Protocol/EdidOverride.h index 9036f8b..709ee48 100644 --- a/MdePkg/Include/Protocol/EdidOverride.h +++ b/MdePkg/Include/Protocol/EdidOverride.h @@ -44,8 +44,8 @@ EFI_STATUS IN EFI_EDID_OVERRIDE_PROTOCOL *This, IN EFI_HANDLE *ChildHandle, OUT UINT32 *Attributes, - IN OUT UINTN*EdidSize, - IN OUT UINT8**Edid + OUT UINTN *EdidSize, + OUT UINT8 **Edid ); /// diff --git a/MdePkg/Include/Protocol/FirmwareManagement.h b/MdePkg/Include/Protocol/FirmwareManagement.h index 297bb5f..b501261 100644 --- a/MdePkg/Include/Protocol/FirmwareManagement.h +++ b/MdePkg/Include/Protocol/FirmwareManagement.h @@ -345,7 +345,7 @@ EFI_STATUS @param[in] This A pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance. @param[in] ImageIndex A unique number identifying the firmware image(s) within the device. The number is between 1 and DescriptorCount. - @param[in, out] Image Points to the buffer where the current image is copied to. + @param[out] Image Points to the buffer where the current image is copied to. @param[in, out] ImageSize On entry, points to the size of the buffer pointed to by Image, in bytes. On return, points to the length of the image, in bytes. @@ -364,7 +364,7 @@ EFI_STATUS (EFIAPI *EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE)( IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN UINT8 ImageIndex, - IN OUT VOID *Image, + OUT VOID *Image, IN OUT UINTN
[edk2-devel] [PATCH V6 4/6] MdePkg: Add FMP Capsule Image Header extension
Add bitmask to structure which gives a binary-inspectable mechanism to determine if a capsule contains an authentication section or depex section. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Guid/FmpCapsule.h | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/Guid/FmpCapsule.h b/MdePkg/Include/Guid/FmpCapsule.h index fb8c346..bd5cb77 100644 --- a/MdePkg/Include/Guid/FmpCapsule.h +++ b/MdePkg/Include/Guid/FmpCapsule.h @@ -79,13 +79,22 @@ typedef struct { /// therefore can be modified without changing the Auth data. /// UINT64 UpdateHardwareInstance; + + /// + /// A 64-bit bitmask that determines what sections are added to the payload. + /// #define CAPSULE_SUPPORT_AUTHENTICATION 0x0001 + /// #define CAPSULE_SUPPORT_DEPENDENCY 0x0002 + /// + UINT64 ImageCapsuleSupport; } EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER; #pragma pack() #define EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER_INIT_VERSION 0x0001 -#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x0002 +#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x0003 +#define CAPSULE_SUPPORT_AUTHENTICATION0x0001 +#define CAPSULE_SUPPORT_DEPENDENCY0x0002 extern EFI_GUID gEfiFmpCapsuleGuid; -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59474): https://edk2.groups.io/g/devel/message/59474 Mute This Topic: https://groups.io/mt/74193808/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V6 1/6] MdePkg: Add new CPER Notification types
Add SEA, SEI, and PEI CPER Notification types defined in UEFI 2.8 errata a. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Guid/Cper.h | 15 +++ MdePkg/MdePkg.dec | 9 + 2 files changed, 24 insertions(+) diff --git a/MdePkg/Include/Guid/Cper.h b/MdePkg/Include/Guid/Cper.h index 0cacd30..948f586 100644 --- a/MdePkg/Include/Guid/Cper.h +++ b/MdePkg/Include/Guid/Cper.h @@ -95,6 +95,18 @@ typedef struct { { \ 0x667DD791, 0xC6B3, 0x4c27, { 0x8A, 0x6B, 0x0F, 0x8E, 0x72, 0x2D, 0xEB, 0x41 } \ } +#define EFI_EVENT_NOTIFICATION_TYPE_DMAR_SEA \ + { \ +0x9A78788A, 0xBBE8, 0x11E4, { 0x80, 0x9E, 0x67, 0x61, 0x1E, 0x5D, 0x46, 0xB0 } \ + } +#define EFI_EVENT_NOTIFICATION_TYPE_DMAR_SEI \ + { \ +0x5C284C81, 0xB0AE, 0x4E87, { 0xA3, 0x22, 0xB0, 0x4C, 0x85, 0x62, 0x43, 0x23 } \ + } +#define EFI_EVENT_NOTIFICATION_TYPE_DMAR_PEI \ + { \ +0x09A9D5AC, 0x5204, 0x4214, { 0x96, 0xE5, 0x94, 0x99, 0x2E, 0x75, 0x2B, 0xCD } \ + } ///@} /// @@ -1207,6 +1219,9 @@ extern EFI_GUID gEfiEventNotificationTypeInitGuid; extern EFI_GUID gEfiEventNotificationTypeNmiGuid; extern EFI_GUID gEfiEventNotificationTypeBootGuid; extern EFI_GUID gEfiEventNotificationTypeDmarGuid; +extern EFI_GUID gEfiEventNotificationTypeSeaGuid; +extern EFI_GUID gEfiEventNotificationTypeSeiGuid; +extern EFI_GUID gEfiEventNotificationTypePeiGuid; extern EFI_GUID gEfiProcessorGenericErrorSectionGuid; extern EFI_GUID gEfiProcessorSpecificErrorSectionGuid; diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 86545ac..5ac1189 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -437,6 +437,15 @@ gEfiEventNotificationTypeDmarGuid = { 0x667DD791, 0xC6B3, 0x4c27, { 0x8A, 0x6B, 0x0F, 0x8E, 0x72, 0x2D, 0xEB, 0x41 }} ## Include/Guid/Cper.h + gEfiEventNotificationTypeSeaGuid = { 0x9A78788A, 0xBBE8, 0x11E4, { 0x80, 0x9E, 0x67, 0x61, 0x1E, 0x5D, 0x46, 0xB0 }} + + ## Include/Guid/Cper.h + gEfiEventNotificationTypeSeiGuid = { 0x5C284C81, 0xB0AE, 0x4E87, { 0xA3, 0x22, 0xB0, 0x4C, 0x85, 0x62, 0x43, 0x23 }} + + ## Include/Guid/Cper.h + gEfiEventNotificationTypePeiGuid = { 0x09A9D5AC, 0x5204, 0x4214, { 0x96, 0xE5, 0x94, 0x99, 0x2E, 0x75, 0x2B, 0xCD }} + + ## Include/Guid/Cper.h gEfiProcessorGenericErrorSectionGuid = { 0x9876ccad, 0x47b4, 0x4bdb, { 0xb6, 0x5e, 0x16, 0xf1, 0x93, 0xc4, 0xf3, 0xdb }} ## Include/Guid/Cper.h -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59471): https://edk2.groups.io/g/devel/message/59471 Mute This Topic: https://groups.io/mt/74193804/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V6 6/6] SignedCapsulePkg: Add FMP Capsule Image Header extension
Add bitmask to structure which gives a binary-inspectable mechanism to determine if a capsule contains an authentication section or depex section. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Wei6 Xu --- .../RecoveryModuleLoadPei/RecoveryModuleLoadPei.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c index 53b821c..307060b 100644 --- a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c +++ b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c @@ -328,10 +328,11 @@ ValidateFmpCapsule ( DEBUG((DEBUG_ERROR, "ImageHeader->Version(0x%x) Unknown\n", ImageHeader->Version)); return EFI_INVALID_PARAMETER; } -if (ImageHeader->Version < EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { +if (ImageHeader->Version == 1) { FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); +} else { + FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport); } - // No overflow if (FmpImageSize != (UINT64)FmpImageHeaderSize + (UINT64)ImageHeader->UpdateImageSize + (UINT64)ImageHeader->UpdateVendorCodeSize) { DEBUG((DEBUG_ERROR, "FmpImageSize(0x%lx) mismatch, UpdateImageSize(0x%x) UpdateVendorCodeSize(0x%x)\n", FmpImageSize, ImageHeader->UpdateImageSize, ImageHeader->UpdateVendorCodeSize)); @@ -639,9 +640,14 @@ ProcessFmpCapsuleImage ( } else { // // If the EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER is version 1, only match ImageTypeId. - // Header should exclude UpdateHardwareInstance field + // Header should exclude UpdateHardwareInstance field. + // If version is 2 Header should exclude ImageCapsuleSupport field. // - Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); + if (ImageHeader->Version == 1) { +Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); + } else { +Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport); + } } Status = ProcessRecoveryImage (Image, ImageHeader->UpdateImageSize); -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59476): https://edk2.groups.io/g/devel/message/59476 Mute This Topic: https://groups.io/mt/74193810/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V6 3/6] MdePkg: Add EFI_RT_PROPERTIES_TABLE
Define Guid & data structure for EFI_RT_PROPERTIES_TABLE, designed to be published by a platform if it no longer supports all EFI runtime services once ExitBootServices() has been called by the OS. (UEFI 2.8 errata a, mantis 2049) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Guid/RtPropertiesTable.h | 69 + MdePkg/MdePkg.dec | 5 +++ 2 files changed, 74 insertions(+) create mode 100644 MdePkg/Include/Guid/RtPropertiesTable.h diff --git a/MdePkg/Include/Guid/RtPropertiesTable.h b/MdePkg/Include/Guid/RtPropertiesTable.h new file mode 100644 index 000..6b6a1a1 --- /dev/null +++ b/MdePkg/Include/Guid/RtPropertiesTable.h @@ -0,0 +1,69 @@ +/** @file +Guid & data structure for EFI_RT _PROPERTIES_TABLE, designed to be published by a +platform if it no longer supports all EFI runtime services once ExitBootServices() +has been called by the OS. Introduced in UEFI 2.8a. + + +Copyright (c) 2020, American Megatrends International LLC. All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef __RT_PROPERTIES_TABLE_GUID_H__ +#define __RT_PROPERTIES_TABLE_GUID_H__ + +// +// Table, defined here, should be published by a platform if it no longer supports all EFI runtime +// services once ExitBootServices() has been called by the OS. Note that this is merely a hint +// to the OS, which it is free to ignore, and so the platform is still required to provide callable +// implementations of unsupported runtime services that simply return EFI_UNSUPPORTED. +// +#define EFI_RT_PROPERTIES_TABLE_GUID \ +{ 0xeb66918a, 0x7eef, 0x402a, \ +{ 0x84, 0x2e, 0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9 }} + + + + +#pragma pack(1) + +typedef struct { + /// + /// Version of the structure, must be 0x1. + /// + UINT16 Version; + + /// + /// Size in bytes of the entire EFI_RT_PROPERTIES_TABLE, must be 8. + /// + UINT16 Length; + + /// + /// Bitmask of which calls are or are not supported, where a bit set to 1 indicates + /// that the call is supported, and 0 indicates that it is not. + /// + UINT32 RuntimeServicesSupported; +} EFI_RT_PROPERTIES_TABLE; + +#pragma pack() + +#define EFI_RT_PROPERTIES_TABLE_VERSION 0x1 + +#define EFI_RT_SUPPORTED_GET_TIME 0x0001 +#define EFI_RT_SUPPORTED_SET_TIME 0x0002 +#define EFI_RT_SUPPORTED_GET_WAKEUP_TIME0x0004 +#define EFI_RT_SUPPORTED_SET_WAKEUP_TIME0x0008 +#define EFI_RT_SUPPORTED_GET_VARIABLE 0x0010 +#define EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME 0x0020 +#define EFI_RT_SUPPORTED_SET_VARIABLE 0x0040 +#define EFI_RT_SUPPORTED_SET_VIRTUAL_ADDRESS_MAP0x0080 +#define EFI_RT_SUPPORTED_CONVERT_POINTER0x0100 +#define EFI_RT_SUPPORTED_GET_NEXT_HIGH_MONOTONIC_COUNT 0x0200 +#define EFI_RT_SUPPORTED_RESET_SYSTEM 0x0400 +#define EFI_RT_SUPPORTED_UPDATE_CAPSULE 0x0800 +#define EFI_RT_SUPPORTED_QUERY_CAPSULE_CAPABILITIES 0x1000 +#define EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO0x2000 + +extern EFI_GUID gEfiRtPropertiesTableGuid; + +#endif diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 5ac1189..2bbf387 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -654,6 +654,11 @@ ## Include/Guid/Btt.h gEfiBttAbstractionGuid = { 0x18633bfc, 0x1735, 0x4217, { 0x8a, 0xc9, 0x17, 0x23, 0x92, 0x82, 0xd3, 0xf8 }} + # GUIDs defined in UEFI2.8a + # + ## Include/Guid/RtPropertiesTable.h + gEfiRtPropertiesTableGuid = { 0xeb66918a, 0x7eef, 0x402a, { 0x84, 0x2e, 0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9 }} + # # GUID defined in PI1.0 # -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59473): https://edk2.groups.io/g/devel/message/59473 Mute This Topic: https://groups.io/mt/74193807/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V6 5/6] MdeModulePkg: Add FMP Capsule Image Header extension
Add bitmask to structure which gives a binary-inspectable mechanism to determine if a capsule contains an authentication section or depex section. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Wei6 Xu --- MdeModulePkg/Application/CapsuleApp/CapsuleDump.c | 7 -- .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 26 +- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c index 7e3e072..057bfa8 100644 --- a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c @@ -96,8 +96,11 @@ DumpFmpCapsule ( Print(L" UpdateImageIndex - 0x%x\n", FmpImageHeader->UpdateImageIndex); Print(L" UpdateImageSize- 0x%x\n", FmpImageHeader->UpdateImageSize); Print(L" UpdateVendorCodeSize - 0x%x\n", FmpImageHeader->UpdateVendorCodeSize); -if (FmpImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { - Print(L" UpdateHardwareInstance - 0x%lx\n", FmpImageHeader->UpdateHardwareInstance); +if (ImageHeader->Version >= 1) { +DEBUG((DEBUG_VERBOSE, "UpdateHardwareInstance - 0x%lx\n", ImageHeader->UpdateHardwareInstance)); + if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { + DEBUG((DEBUG_VERBOSE, "ImageCapsuleSupport - 0x%lx\n", ImageHeader->ImageCapsuleSupport)); + } } } } diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c index 5dda561..68cece6 100644 --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c @@ -285,8 +285,10 @@ ValidateFmpCapsule ( DEBUG((DEBUG_ERROR, "ImageHeader->Version(0x%x) Unknown\n", ImageHeader->Version)); return EFI_INVALID_PARAMETER; } -if (ImageHeader->Version < EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { +if (ImageHeader->Version == 1) { FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); +} else { + FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport); } if (FmpImageSize < FmpImageHeaderSize) { DEBUG((DEBUG_ERROR, "FmpImageSize(0x%lx) < FmpImageHeaderSize(0x%x)\n", FmpImageSize, FmpImageHeaderSize)); @@ -519,8 +521,11 @@ DumpFmpCapsule ( DEBUG((DEBUG_VERBOSE, "UpdateImageIndex - 0x%x\n", ImageHeader->UpdateImageIndex)); DEBUG((DEBUG_VERBOSE, "UpdateImageSize- 0x%x\n", ImageHeader->UpdateImageSize)); DEBUG((DEBUG_VERBOSE, "UpdateVendorCodeSize - 0x%x\n", ImageHeader->UpdateVendorCodeSize)); -if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { - DEBUG((DEBUG_VERBOSE, "UpdateHardwareInstance - 0x%lx\n", ImageHeader->UpdateHardwareInstance)); +if (ImageHeader->Version >= 1) { + DEBUG((DEBUG_INFO, "(UpdateHardwareInstance - 0x%x)", ImageHeader->UpdateHardwareInstance)); + if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { +DEBUG((DEBUG_INFO, "(ImageCapsuleSupport - 0x%x)", ImageHeader->ImageCapsuleSupport)); + } } } } @@ -928,9 +933,14 @@ SetFmpImageData ( } else { // // If the EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER is version 1, -// Header should exclude UpdateHardwareInstance field +// Header should exclude UpdateHardwareInstance field, and +// ImageCapsuleSupport field if version is 2. // -Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); +if (ImageHeader->Version == 1) { + Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); +} else { + Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport); +} } if (ImageHeader->UpdateVendorCodeSize == 0) { @@ -945,6 +955,7 @@ SetFmpImageData ( DEBUG((DEBUG_INFO, "ImageIndex - 0x%x ", ImageHeader->UpdateImageIndex)); if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { DEBUG((DEBUG_INFO, "(UpdateHardwareInstance - 0x%x)", ImageHeader->UpdateHardwareInstance)); +DEBUG((DEBUG_INFO, "(ImageCapsuleSupport - 0x%x)", ImageHeader->ImageCapsuleSupport)); } DEBUG((DEBUG_INFO, "\n")); @@
[edk2-devel] [PATCH V6 0/6] Add definitions introduced in UEFI 2.8a
Following patches add/update structures/definitions, that were introduced/modified by UEFI Spec v.2.8 errata a from Feb 14. Oleksiy Yakovlev (6): MdePkg: Add new CPER Notification types MdePkg: Fix OUT parameters marked as IN OUT MdePkg: Add EFI_RT_PROPERTIES_TABLE MdePkg: Add FMP Capsule Image Header extension MdeModulePkg: Add FMP Capsule Image Header extension SignedCapsulePkg: Add FMP Capsule Image Header extension MdeModulePkg/Application/CapsuleApp/CapsuleDump.c | 7 ++- .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 26 ++-- MdePkg/Include/Guid/Cper.h | 15 + MdePkg/Include/Guid/FmpCapsule.h | 11 +++- MdePkg/Include/Guid/RtPropertiesTable.h| 69 ++ MdePkg/Include/Protocol/AbsolutePointer.h | 2 +- MdePkg/Include/Protocol/AtaPassThru.h | 4 +- MdePkg/Include/Protocol/EdidOverride.h | 4 +- MdePkg/Include/Protocol/FirmwareManagement.h | 4 +- MdePkg/Include/Protocol/NvmExpressPassthru.h | 4 +- MdePkg/Include/Protocol/ScsiPassThruExt.h | 2 +- MdePkg/Include/Protocol/SdMmcPassThru.h| 4 +- MdePkg/Include/Protocol/SimplePointer.h| 2 +- MdePkg/Include/Uefi/UefiSpec.h | 8 +-- MdePkg/MdePkg.dec | 14 + .../RecoveryModuleLoadPei/RecoveryModuleLoadPei.c | 14 +++-- 16 files changed, 160 insertions(+), 30 deletions(-) create mode 100644 MdePkg/Include/Guid/RtPropertiesTable.h -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59470): https://edk2.groups.io/g/devel/message/59470 Mute This Topic: https://groups.io/mt/74193802/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V5 4/6] MdePkg: Add FMP Capsule Image Header extension
Add bitmask to structure which gives a binary-inspectable mechanism to determine if a capsule contains an authentication section or depex section. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Guid/FmpCapsule.h | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/Guid/FmpCapsule.h b/MdePkg/Include/Guid/FmpCapsule.h index fb8c346..bd5cb77 100644 --- a/MdePkg/Include/Guid/FmpCapsule.h +++ b/MdePkg/Include/Guid/FmpCapsule.h @@ -79,13 +79,22 @@ typedef struct { /// therefore can be modified without changing the Auth data. /// UINT64 UpdateHardwareInstance; + + /// + /// A 64-bit bitmask that determines what sections are added to the payload. + /// #define CAPSULE_SUPPORT_AUTHENTICATION 0x0001 + /// #define CAPSULE_SUPPORT_DEPENDENCY 0x0002 + /// + UINT64 ImageCapsuleSupport; } EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER; #pragma pack() #define EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER_INIT_VERSION 0x0001 -#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x0002 +#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x0003 +#define CAPSULE_SUPPORT_AUTHENTICATION0x0001 +#define CAPSULE_SUPPORT_DEPENDENCY0x0002 extern EFI_GUID gEfiFmpCapsuleGuid; -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59463): https://edk2.groups.io/g/devel/message/59463 Mute This Topic: https://groups.io/mt/74191741/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V5 5/6] MdeModulePkg: Add FMP Capsule Image Header extension
Add bitmask to structure which gives a binary-inspectable mechanism to determine if a capsule contains an authentication section or depex section. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev --- MdeModulePkg/Application/CapsuleApp/CapsuleDump.c| 1 + .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 20 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c index 7e3e072..e3ab199 100644 --- a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c @@ -98,6 +98,7 @@ DumpFmpCapsule ( Print(L" UpdateVendorCodeSize - 0x%x\n", FmpImageHeader->UpdateVendorCodeSize); if (FmpImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { Print(L" UpdateHardwareInstance - 0x%lx\n", FmpImageHeader->UpdateHardwareInstance); + Print(L" ImageCapsuleSupport - 0x%lx\n", FmpImageHeader->ImageCapsuleSupport); } } } diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c index 5dda561..f9819a7 100644 --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c @@ -285,8 +285,10 @@ ValidateFmpCapsule ( DEBUG((DEBUG_ERROR, "ImageHeader->Version(0x%x) Unknown\n", ImageHeader->Version)); return EFI_INVALID_PARAMETER; } -if (ImageHeader->Version < EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { +if (ImageHeader->Version == 1) { FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); +} else { + FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport); } if (FmpImageSize < FmpImageHeaderSize) { DEBUG((DEBUG_ERROR, "FmpImageSize(0x%lx) < FmpImageHeaderSize(0x%x)\n", FmpImageSize, FmpImageHeaderSize)); @@ -521,6 +523,7 @@ DumpFmpCapsule ( DEBUG((DEBUG_VERBOSE, "UpdateVendorCodeSize - 0x%x\n", ImageHeader->UpdateVendorCodeSize)); if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { DEBUG((DEBUG_VERBOSE, "UpdateHardwareInstance - 0x%lx\n", ImageHeader->UpdateHardwareInstance)); + DEBUG((DEBUG_VERBOSE, "ImageCapsuleSupport - 0x%lx\n", ImageHeader->ImageCapsuleSupport)); } } } @@ -928,9 +931,14 @@ SetFmpImageData ( } else { // // If the EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER is version 1, -// Header should exclude UpdateHardwareInstance field +// Header should exclude UpdateHardwareInstance field, and +// ImageCapsuleSupport field if version is 2. // -Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); +if (ImageHeader->Version == 1) { + Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); +} else { + Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport); +} } if (ImageHeader->UpdateVendorCodeSize == 0) { @@ -945,6 +953,7 @@ SetFmpImageData ( DEBUG((DEBUG_INFO, "ImageIndex - 0x%x ", ImageHeader->UpdateImageIndex)); if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { DEBUG((DEBUG_INFO, "(UpdateHardwareInstance - 0x%x)", ImageHeader->UpdateHardwareInstance)); +DEBUG((DEBUG_INFO, "(ImageCapsuleSupport - 0x%x)", ImageHeader->ImageCapsuleSupport)); } DEBUG((DEBUG_INFO, "\n")); @@ -1239,7 +1248,10 @@ ProcessFmpCapsuleImage ( ImageHeader = (EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER *)((UINT8 *)FmpCapsuleHeader + ItemOffsetList[Index]); UpdateHardwareInstance = 0; -if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { +/// +/// UpdateHardwareInstance field was added in Version 2 +/// +if (ImageHeader->Version >= 2) { UpdateHardwareInstance = ImageHeader->UpdateHardwareInstance; } -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephon
[edk2-devel] [PATCH V5 2/6] MdePkg: Fix OUT parameters marked as IN OUT
Some OUT parameters in the specification were mistakenly marked as IN OUT. "IN OUT" replaced with "OUT" in the following interfaces EFI_BOOT_SERVICES.GetMemoryMap():MemoryMap EFI_BOOT_SERVICES.LocateHandleBuffer():NoHandles EFI_SIMPLE_POINTER_PROTOCOL.GetState():State EFI_ABSOLUTE_POINTER_PROTOCOL.GetState():State EFI_EDID_OVERRIDE_PROTOCOL.GetEdid():EdidSize and Edid EFI_ATA_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath EFI_SD_MMC_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath EFI_EXT_SCSI_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImage():Image (UEFI 2.8 errata a, mantis 2035) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Protocol/AbsolutePointer.h| 2 +- MdePkg/Include/Protocol/AtaPassThru.h| 4 ++-- MdePkg/Include/Protocol/EdidOverride.h | 4 ++-- MdePkg/Include/Protocol/FirmwareManagement.h | 4 ++-- MdePkg/Include/Protocol/NvmExpressPassthru.h | 4 ++-- MdePkg/Include/Protocol/ScsiPassThruExt.h| 2 +- MdePkg/Include/Protocol/SdMmcPassThru.h | 4 ++-- MdePkg/Include/Protocol/SimplePointer.h | 2 +- MdePkg/Include/Uefi/UefiSpec.h | 8 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/MdePkg/Include/Protocol/AbsolutePointer.h b/MdePkg/Include/Protocol/AbsolutePointer.h index 77d34ae..d59ac97 100644 --- a/MdePkg/Include/Protocol/AbsolutePointer.h +++ b/MdePkg/Include/Protocol/AbsolutePointer.h @@ -169,7 +169,7 @@ typedef EFI_STATUS (EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE)( IN EFI_ABSOLUTE_POINTER_PROTOCOL *This, - IN OUT EFI_ABSOLUTE_POINTER_STATE *State + OUT EFI_ABSOLUTE_POINTER_STATE*State ); diff --git a/MdePkg/Include/Protocol/AtaPassThru.h b/MdePkg/Include/Protocol/AtaPassThru.h index ce6f57f..888dff2 100644 --- a/MdePkg/Include/Protocol/AtaPassThru.h +++ b/MdePkg/Include/Protocol/AtaPassThru.h @@ -315,7 +315,7 @@ EFI_STATUS @param[in] PortMultiplierPort The port multiplier port number of the ATA device for which a device path node is to be allocated and built. If there is no port multiplier, then specify 0x. - @param[in,out] DevicePath A pointer to a single device path node that describes the ATA + @param[out]DevicePath A pointer to a single device path node that describes the ATA device specified by Port and PortMultiplierPort. This function is responsible for allocating the buffer DevicePath with the boot service AllocatePool(). It is the caller's responsibility @@ -334,7 +334,7 @@ EFI_STATUS IN EFI_ATA_PASS_THRU_PROTOCOL *This, IN UINT16 Port, IN UINT16 PortMultiplierPort, - IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath + OUTEFI_DEVICE_PATH_PROTOCOL **DevicePath ); /** diff --git a/MdePkg/Include/Protocol/EdidOverride.h b/MdePkg/Include/Protocol/EdidOverride.h index 9036f8b..709ee48 100644 --- a/MdePkg/Include/Protocol/EdidOverride.h +++ b/MdePkg/Include/Protocol/EdidOverride.h @@ -44,8 +44,8 @@ EFI_STATUS IN EFI_EDID_OVERRIDE_PROTOCOL *This, IN EFI_HANDLE *ChildHandle, OUT UINT32 *Attributes, - IN OUT UINTN*EdidSize, - IN OUT UINT8**Edid + OUT UINTN *EdidSize, + OUT UINT8 **Edid ); /// diff --git a/MdePkg/Include/Protocol/FirmwareManagement.h b/MdePkg/Include/Protocol/FirmwareManagement.h index 297bb5f..b501261 100644 --- a/MdePkg/Include/Protocol/FirmwareManagement.h +++ b/MdePkg/Include/Protocol/FirmwareManagement.h @@ -345,7 +345,7 @@ EFI_STATUS @param[in] This A pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance. @param[in] ImageIndex A unique number identifying the firmware image(s) within the device. The number is between 1 and DescriptorCount. - @param[in, out] Image Points to the buffer where the current image is copied to. + @param[out] Image Points to the buffer where the current image is copied to. @param[in, out] ImageSize On entry, points to the size of the buffer pointed to by Image, in bytes. On return, points to the length of the image, in bytes. @@ -364,7 +364,7 @@ EFI_STATUS (EFIAPI *EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE)( IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN UINT8 ImageIndex, - IN OUT VOID *Image, + OUT VOID *Image, IN OUT UINTN
[edk2-devel] [PATCH V5 3/6] MdePkg: Add EFI_RT_PROPERTIES_TABLE
Define Guid & data structure for EFI_RT_PROPERTIES_TABLE, designed to be published by a platform if it no longer supports all EFI runtime services once ExitBootServices() has been called by the OS. (UEFI 2.8 errata a, mantis 2049) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Guid/RtPropertiesTable.h | 69 + MdePkg/MdePkg.dec | 5 +++ 2 files changed, 74 insertions(+) create mode 100644 MdePkg/Include/Guid/RtPropertiesTable.h diff --git a/MdePkg/Include/Guid/RtPropertiesTable.h b/MdePkg/Include/Guid/RtPropertiesTable.h new file mode 100644 index 000..6b6a1a1 --- /dev/null +++ b/MdePkg/Include/Guid/RtPropertiesTable.h @@ -0,0 +1,69 @@ +/** @file +Guid & data structure for EFI_RT _PROPERTIES_TABLE, designed to be published by a +platform if it no longer supports all EFI runtime services once ExitBootServices() +has been called by the OS. Introduced in UEFI 2.8a. + + +Copyright (c) 2020, American Megatrends International LLC. All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef __RT_PROPERTIES_TABLE_GUID_H__ +#define __RT_PROPERTIES_TABLE_GUID_H__ + +// +// Table, defined here, should be published by a platform if it no longer supports all EFI runtime +// services once ExitBootServices() has been called by the OS. Note that this is merely a hint +// to the OS, which it is free to ignore, and so the platform is still required to provide callable +// implementations of unsupported runtime services that simply return EFI_UNSUPPORTED. +// +#define EFI_RT_PROPERTIES_TABLE_GUID \ +{ 0xeb66918a, 0x7eef, 0x402a, \ +{ 0x84, 0x2e, 0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9 }} + + + + +#pragma pack(1) + +typedef struct { + /// + /// Version of the structure, must be 0x1. + /// + UINT16 Version; + + /// + /// Size in bytes of the entire EFI_RT_PROPERTIES_TABLE, must be 8. + /// + UINT16 Length; + + /// + /// Bitmask of which calls are or are not supported, where a bit set to 1 indicates + /// that the call is supported, and 0 indicates that it is not. + /// + UINT32 RuntimeServicesSupported; +} EFI_RT_PROPERTIES_TABLE; + +#pragma pack() + +#define EFI_RT_PROPERTIES_TABLE_VERSION 0x1 + +#define EFI_RT_SUPPORTED_GET_TIME 0x0001 +#define EFI_RT_SUPPORTED_SET_TIME 0x0002 +#define EFI_RT_SUPPORTED_GET_WAKEUP_TIME0x0004 +#define EFI_RT_SUPPORTED_SET_WAKEUP_TIME0x0008 +#define EFI_RT_SUPPORTED_GET_VARIABLE 0x0010 +#define EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME 0x0020 +#define EFI_RT_SUPPORTED_SET_VARIABLE 0x0040 +#define EFI_RT_SUPPORTED_SET_VIRTUAL_ADDRESS_MAP0x0080 +#define EFI_RT_SUPPORTED_CONVERT_POINTER0x0100 +#define EFI_RT_SUPPORTED_GET_NEXT_HIGH_MONOTONIC_COUNT 0x0200 +#define EFI_RT_SUPPORTED_RESET_SYSTEM 0x0400 +#define EFI_RT_SUPPORTED_UPDATE_CAPSULE 0x0800 +#define EFI_RT_SUPPORTED_QUERY_CAPSULE_CAPABILITIES 0x1000 +#define EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO0x2000 + +extern EFI_GUID gEfiRtPropertiesTableGuid; + +#endif diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 5ac1189..2bbf387 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -654,6 +654,11 @@ ## Include/Guid/Btt.h gEfiBttAbstractionGuid = { 0x18633bfc, 0x1735, 0x4217, { 0x8a, 0xc9, 0x17, 0x23, 0x92, 0x82, 0xd3, 0xf8 }} + # GUIDs defined in UEFI2.8a + # + ## Include/Guid/RtPropertiesTable.h + gEfiRtPropertiesTableGuid = { 0xeb66918a, 0x7eef, 0x402a, { 0x84, 0x2e, 0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9 }} + # # GUID defined in PI1.0 # -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59462): https://edk2.groups.io/g/devel/message/59462 Mute This Topic: https://groups.io/mt/74191740/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V5 6/6] SignedCapsulePkg: Add FMP Capsule Image Header extension
Add bitmask to structure which gives a binary-inspectable mechanism to determine if a capsule contains an authentication section or depex section. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev --- .../RecoveryModuleLoadPei/RecoveryModuleLoadPei.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c index 53b821c..307060b 100644 --- a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c +++ b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c @@ -328,10 +328,11 @@ ValidateFmpCapsule ( DEBUG((DEBUG_ERROR, "ImageHeader->Version(0x%x) Unknown\n", ImageHeader->Version)); return EFI_INVALID_PARAMETER; } -if (ImageHeader->Version < EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { +if (ImageHeader->Version == 1) { FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); +} else { + FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport); } - // No overflow if (FmpImageSize != (UINT64)FmpImageHeaderSize + (UINT64)ImageHeader->UpdateImageSize + (UINT64)ImageHeader->UpdateVendorCodeSize) { DEBUG((DEBUG_ERROR, "FmpImageSize(0x%lx) mismatch, UpdateImageSize(0x%x) UpdateVendorCodeSize(0x%x)\n", FmpImageSize, ImageHeader->UpdateImageSize, ImageHeader->UpdateVendorCodeSize)); @@ -639,9 +640,14 @@ ProcessFmpCapsuleImage ( } else { // // If the EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER is version 1, only match ImageTypeId. - // Header should exclude UpdateHardwareInstance field + // Header should exclude UpdateHardwareInstance field. + // If version is 2 Header should exclude ImageCapsuleSupport field. // - Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); + if (ImageHeader->Version == 1) { +Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); + } else { +Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport); + } } Status = ProcessRecoveryImage (Image, ImageHeader->UpdateImageSize); -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59464): https://edk2.groups.io/g/devel/message/59464 Mute This Topic: https://groups.io/mt/74191743/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V5 1/6] MdePkg: Add new CPER Notification types
Add SEA, SEI, and PEI CPER Notification types defined in UEFI 2.8 errata a. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Guid/Cper.h | 15 +++ MdePkg/MdePkg.dec | 9 + 2 files changed, 24 insertions(+) diff --git a/MdePkg/Include/Guid/Cper.h b/MdePkg/Include/Guid/Cper.h index 0cacd30..948f586 100644 --- a/MdePkg/Include/Guid/Cper.h +++ b/MdePkg/Include/Guid/Cper.h @@ -95,6 +95,18 @@ typedef struct { { \ 0x667DD791, 0xC6B3, 0x4c27, { 0x8A, 0x6B, 0x0F, 0x8E, 0x72, 0x2D, 0xEB, 0x41 } \ } +#define EFI_EVENT_NOTIFICATION_TYPE_DMAR_SEA \ + { \ +0x9A78788A, 0xBBE8, 0x11E4, { 0x80, 0x9E, 0x67, 0x61, 0x1E, 0x5D, 0x46, 0xB0 } \ + } +#define EFI_EVENT_NOTIFICATION_TYPE_DMAR_SEI \ + { \ +0x5C284C81, 0xB0AE, 0x4E87, { 0xA3, 0x22, 0xB0, 0x4C, 0x85, 0x62, 0x43, 0x23 } \ + } +#define EFI_EVENT_NOTIFICATION_TYPE_DMAR_PEI \ + { \ +0x09A9D5AC, 0x5204, 0x4214, { 0x96, 0xE5, 0x94, 0x99, 0x2E, 0x75, 0x2B, 0xCD } \ + } ///@} /// @@ -1207,6 +1219,9 @@ extern EFI_GUID gEfiEventNotificationTypeInitGuid; extern EFI_GUID gEfiEventNotificationTypeNmiGuid; extern EFI_GUID gEfiEventNotificationTypeBootGuid; extern EFI_GUID gEfiEventNotificationTypeDmarGuid; +extern EFI_GUID gEfiEventNotificationTypeSeaGuid; +extern EFI_GUID gEfiEventNotificationTypeSeiGuid; +extern EFI_GUID gEfiEventNotificationTypePeiGuid; extern EFI_GUID gEfiProcessorGenericErrorSectionGuid; extern EFI_GUID gEfiProcessorSpecificErrorSectionGuid; diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 86545ac..5ac1189 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -437,6 +437,15 @@ gEfiEventNotificationTypeDmarGuid = { 0x667DD791, 0xC6B3, 0x4c27, { 0x8A, 0x6B, 0x0F, 0x8E, 0x72, 0x2D, 0xEB, 0x41 }} ## Include/Guid/Cper.h + gEfiEventNotificationTypeSeaGuid = { 0x9A78788A, 0xBBE8, 0x11E4, { 0x80, 0x9E, 0x67, 0x61, 0x1E, 0x5D, 0x46, 0xB0 }} + + ## Include/Guid/Cper.h + gEfiEventNotificationTypeSeiGuid = { 0x5C284C81, 0xB0AE, 0x4E87, { 0xA3, 0x22, 0xB0, 0x4C, 0x85, 0x62, 0x43, 0x23 }} + + ## Include/Guid/Cper.h + gEfiEventNotificationTypePeiGuid = { 0x09A9D5AC, 0x5204, 0x4214, { 0x96, 0xE5, 0x94, 0x99, 0x2E, 0x75, 0x2B, 0xCD }} + + ## Include/Guid/Cper.h gEfiProcessorGenericErrorSectionGuid = { 0x9876ccad, 0x47b4, 0x4bdb, { 0xb6, 0x5e, 0x16, 0xf1, 0x93, 0xc4, 0xf3, 0xdb }} ## Include/Guid/Cper.h -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59460): https://edk2.groups.io/g/devel/message/59460 Mute This Topic: https://groups.io/mt/74191738/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V5 0/6] Add definitions introduced in UEFI 2.8a
Following patches add/update structures/definitions, that were introduced/modified by UEFI Spec v.2.8 errata a from Feb 14. V5 passed pull request #612 at Oleksiyy/uefi2.8a Oleksiy Yakovlev (6): MdePkg: Add new CPER Notification types MdePkg: Fix OUT parameters marked as IN OUT MdePkg: Add EFI_RT_PROPERTIES_TABLE MdePkg: Add FMP Capsule Image Header extension MdeModulePkg: Add FMP Capsule Image Header extension SignedCapsulePkg: Add FMP Capsule Image Header extension MdeModulePkg/Application/CapsuleApp/CapsuleDump.c | 1 + .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 20 +-- MdePkg/Include/Guid/Cper.h | 15 + MdePkg/Include/Guid/FmpCapsule.h | 11 +++- MdePkg/Include/Guid/RtPropertiesTable.h| 69 ++ MdePkg/Include/Protocol/AbsolutePointer.h | 2 +- MdePkg/Include/Protocol/AtaPassThru.h | 4 +- MdePkg/Include/Protocol/EdidOverride.h | 4 +- MdePkg/Include/Protocol/FirmwareManagement.h | 4 +- MdePkg/Include/Protocol/NvmExpressPassthru.h | 4 +- MdePkg/Include/Protocol/ScsiPassThruExt.h | 2 +- MdePkg/Include/Protocol/SdMmcPassThru.h| 4 +- MdePkg/Include/Protocol/SimplePointer.h| 2 +- MdePkg/Include/Uefi/UefiSpec.h | 8 +-- MdePkg/MdePkg.dec | 14 + .../RecoveryModuleLoadPei/RecoveryModuleLoadPei.c | 14 +++-- 16 files changed, 152 insertions(+), 26 deletions(-) create mode 100644 MdePkg/Include/Guid/RtPropertiesTable.h -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59459): https://edk2.groups.io/g/devel/message/59459 Mute This Topic: https://groups.io/mt/74191737/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v7 4/7] BaseTools: Bootable NVDIMM namespaces
Provided a mechanism for UEFI FW to identify and hand off bootable NVDIMM namespaces to the OS by standardizing the EFI device path. EFI device path for physical NVDIMM devices changed from an ACPI _ADR device to an ACPI NVDIMM device for correctness. (UEFI 2.8 mantis 1858) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- BaseTools/Source/C/Include/Protocol/DevicePath.h | 12 1 file changed, 12 insertions(+) diff --git a/BaseTools/Source/C/Include/Protocol/DevicePath.h b/BaseTools/Source/C/Include/Protocol/DevicePath.h index e3571ef..27f8135 100644 --- a/BaseTools/Source/C/Include/Protocol/DevicePath.h +++ b/BaseTools/Source/C/Include/Protocol/DevicePath.h @@ -719,6 +719,18 @@ typedef struct { UINT8 StopBits; } UART_DEVICE_PATH; +/// +/// NVDIMM Namespace Device Path SubType. +/// +#define NVDIMM_NAMESPACE_DP 0x20 +typedef struct { + EFI_DEVICE_PATH_PROTOCOLHeader; + /// + /// Namespace unique label identifier UUID. + /// + EFI_GUID Uuid; +} NVDIMM_NAMESPACE_DEVICE_PATH; + // // Use VENDOR_DEVICE_PATH struct // -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59454): https://edk2.groups.io/g/devel/message/59454 Mute This Topic: https://groups.io/mt/74190445/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v7 5/7] MdePkg: Bootable NVDIMM namespaces
Provided a mechanism for UEFI FW to identify and hand off bootable NVDIMM namespaces to the OS by standardizing the EFI device path. EFI device path for physical NVDIMM devices changed from an ACPI _ADR device to an ACPI NVDIMM device for correctness. (UEFI 2.8 mantis 1858) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Protocol/DevicePath.h | 12 1 file changed, 12 insertions(+) diff --git a/MdePkg/Include/Protocol/DevicePath.h b/MdePkg/Include/Protocol/DevicePath.h index aaec0a6..4cf4b65 100644 --- a/MdePkg/Include/Protocol/DevicePath.h +++ b/MdePkg/Include/Protocol/DevicePath.h @@ -712,6 +712,18 @@ typedef struct { UINT8 StopBits; } UART_DEVICE_PATH; +/// +/// NVDIMM Namespace Device Path SubType. +/// +#define NVDIMM_NAMESPACE_DP 0x20 +typedef struct { + EFI_DEVICE_PATH_PROTOCOLHeader; + /// + /// Namespace unique label identifier UUID. + /// + EFI_GUID Uuid; +} NVDIMM_NAMESPACE_DEVICE_PATH; + // // Use VENDOR_DEVICE_PATH struct // -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59455): https://edk2.groups.io/g/devel/message/59455 Mute This Topic: https://groups.io/mt/74190447/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v7 7/7] MdePkg: UEFI JSON Capsule Support
Added Guids and structures, that defines the work flow to perform capsule update using JSON objects. (UEFI 2.8 mantis 1935) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Guid/CapsuleReport.h | 29 +++ MdePkg/Include/Guid/JsonCapsule.h | 98 + MdePkg/Include/Uefi/UefiSpec.h | 1 + MdePkg/MdePkg.dec | 6 +++ 4 files changed, 134 insertions(+) create mode 100644 MdePkg/Include/Guid/JsonCapsule.h diff --git a/MdePkg/Include/Guid/CapsuleReport.h b/MdePkg/Include/Guid/CapsuleReport.h index 93d2bb7..cd91e6d 100644 --- a/MdePkg/Include/Guid/CapsuleReport.h +++ b/MdePkg/Include/Guid/CapsuleReport.h @@ -93,6 +93,35 @@ typedef struct { /// } EFI_CAPSULE_RESULT_VARIABLE_FMP; +typedef struct { + + /// + /// Version of this structure, currently 0x0001 + /// + UINT32Version; + + /// + /// The unique identifier of the capsule whose processing result is recorded in this variable. + /// 0x - 0xEFFF - Implementation Reserved + /// 0xF000 - 0x - Specification Reserved + /// #define REDFISH_DEFINED_JSON_SCHEMA 0xF00 + /// The JSON payload shall conform to a Redfish-defined JSON schema, see DMTF-Redfish + /// Specification. + /// + UINT32 CapsuleId; + + /// + /// The length of Resp in bytes. + /// + UINT32 RespLength; + + /// + /// Variable length buffer containing the replied JSON payload to the caller who delivered JSON + /// capsule to system. The definition of the JSON schema used in the replied payload is beyond + /// the scope of this specification. + /// + UINT8 Resp[]; + } EFI_CAPSULE_RESULT_VARIABLE_JSON; extern EFI_GUID gEfiCapsuleReportGuid; diff --git a/MdePkg/Include/Guid/JsonCapsule.h b/MdePkg/Include/Guid/JsonCapsule.h new file mode 100644 index 000..b34d6e3 --- /dev/null +++ b/MdePkg/Include/Guid/JsonCapsule.h @@ -0,0 +1,98 @@ +/** @file +Guid & data structure for tables defined for reporting firmware configuration data to EFI +Configuration Tables and also for processing JSON payload capsule. + + +Copyright (c) 2020, American Megatrends International LLC. All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef __JSON_CAPSULE_GUID_H__ +#define __JSON_CAPSULE_GUID_H__ + +// +// The address reported in the table entry identified by EFI_JSON_CAPSULE_DATA_TABLE_GUID will be +// referenced as physical and will not be fixed up when transition from preboot to runtime phase. The +// addresses reported in these table entries identified by EFI_JSON_CONFIG_DATA_TABLE_GUID and +// EFI_JSON_CAPSULE_RESULT_TABLE_GUID will be referenced as virtual and will be fixed up when +// transition from preboot to runtime phase. +// +#define EFI_JSON_CONFIG_DATA_TABLE_GUID \ +{0x87367f87, 0x1119, 0x41ce, \ +{0xaa, 0xec, 0x8b, 0xe0, 0x11, 0x1f, 0x55, 0x8a }} +#define EFI_JSON_CAPSULE_DATA_TABLE_GUID \ +{0x35e7a725, 0x8dd2, 0x4cac, \ +{0x80, 0x11, 0x33, 0xcd, 0xa8, 0x10, 0x90, 0x56 }} +#define EFI_JSON_CAPSULE_RESULT_TABLE_GUID \ +{0xdbc461c3, 0xb3de, 0x422a,\ +{0xb9, 0xb4, 0x98, 0x86, 0xfd, 0x49, 0xa1, 0xe5 }} +#define EFI_JSON_CAPSULE_ID_GUID \ +{0x67d6f4cd, 0xd6b8, 0x4573, \ +{0xbf, 0x4a, 0xde, 0x5e, 0x25, 0x2d, 0x61, 0xae }} + + +#pragma pack(1) + +typedef struct { + /// + /// Version of the structure, initially 0x0001. + /// + UINT32 Version; + + /// + /// The unique identifier of this capsule. + /// + UINT32 CapsuleId; + + /// + /// The length of the JSON payload immediately following this header, in bytes. + /// + UINT32 PayloadLength; + + /// + /// Variable length buffer containing the JSON payload that should be parsed and applied to the system. The + /// definition of the JSON schema used in the payload is beyond the scope of this specification. + /// + UINT8 Payload[]; +} EFI_JSON_CAPSULE_HEADER; + +typedef struct { + /// + /// The length of the following ConfigData, in bytes. + /// + UINT32 ConfigDataLength; + + /// + /// Variable length buffer containing the JSON payload that describes one group of configuration data within + /// current system. The definition of the JSON schema used in this payload is beyond the scope of this specification. + /// + UINT8 ConfigData[]; +} EFI_JSON_CONFIG_DATA_ITEM; + +typedef struct { + /// + /// Version of the structure, initially 0x0001. + /// + UINT32 Version; + + /// + The total length of EFI_JSON_CAPSULE_CONFIG_DATA, in bytes. + /// + UINT32 TotalLength; + + /// + /// Array of configuration data groups. + /// + EFI_JSON_CONFIG_DATA_ITEM ConfigDataList[]; +} EFI_JSON_CAPSULE_CONFIG_DATA; + +#pragma pack() + +extern EFI_GUID gEfiJsonConfigDataTableGuid; +extern EFI_GUID gEfiJsonCapsuleDataTableGuid; +extern EFI_GUID gEfiJsonCapsuleResultTableGuid; +extern EFI_GUID gEfiJsonCapsuleIdGuid; + + +#endif diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h i
[edk2-devel] [PATCH v7 0/7] Add definitions introduced in UEFI 2.8
Following patches add/update structures/definitions, that was introduced/modified by UEFI Spec v.2.8. V7 passed pull request Oleksiyy/uefi2.8 #611 Oleksiy Yakovlev (7): MdePkg: Extend SERIAL_IO with DeviceTypeGuid BaseTools: REST style formset MdePkg: REST style formset BaseTools: Bootable NVDIMM namespaces MdePkg: Bootable NVDIMM namespaces MdePkg: Add UEFI Spec Revision 2.8 MdePkg: UEFI JSON Capsule Support .../Common/UefiInternalFormRepresentation.h| 1 + BaseTools/Source/C/Include/Protocol/DevicePath.h | 12 +++ MdePkg/Include/Guid/CapsuleReport.h| 29 +++ MdePkg/Include/Guid/HiiPlatformSetupFormset.h | 4 + MdePkg/Include/Guid/JsonCapsule.h | 98 ++ MdePkg/Include/Protocol/DevicePath.h | 12 +++ MdePkg/Include/Protocol/SerialIo.h | 9 ++ .../Include/Uefi/UefiInternalFormRepresentation.h | 1 + MdePkg/Include/Uefi/UefiSpec.h | 2 + MdePkg/MdePkg.dec | 11 +++ 10 files changed, 179 insertions(+) create mode 100644 MdePkg/Include/Guid/JsonCapsule.h -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59450): https://edk2.groups.io/g/devel/message/59450 Mute This Topic: https://groups.io/mt/74190438/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v7 6/7] MdePkg: Add UEFI Spec Revision 2.8
Added entrie in the EFI_SYSTEM_TABLE related definitions section, to signify UEFI 2.8 spec revision. (UEFI 2.8 mantis 1926) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Uefi/UefiSpec.h | 1 + 1 file changed, 1 insertion(+) diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h index 8ffaf97..b9282cc 100644 --- a/MdePkg/Include/Uefi/UefiSpec.h +++ b/MdePkg/Include/Uefi/UefiSpec.h @@ -1788,6 +1788,7 @@ EFI_STATUS // EFI Runtime Services Table // #define EFI_SYSTEM_TABLE_SIGNATURE SIGNATURE_64 ('I','B','I',' ','S','Y','S','T') +#define EFI_2_80_SYSTEM_TABLE_REVISION ((2 << 16) | (80)) #define EFI_2_70_SYSTEM_TABLE_REVISION ((2 << 16) | (70)) #define EFI_2_60_SYSTEM_TABLE_REVISION ((2 << 16) | (60)) #define EFI_2_50_SYSTEM_TABLE_REVISION ((2 << 16) | (50)) -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59456): https://edk2.groups.io/g/devel/message/59456 Mute This Topic: https://groups.io/mt/74190449/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v7 2/7] BaseTools: REST style formset
In question level, a new flag EFI_IFR_FLAG_REST_STYLE is defined. (UEFI 2.8 mantis 1853) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h | 1 + 1 file changed, 1 insertion(+) diff --git a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h index b0bd7c5..b9fa8c3 100644 --- a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h +++ b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h @@ -728,6 +728,7 @@ typedef struct _EFI_IFR_QUESTION_HEADER { #define EFI_IFR_FLAG_READ_ONLY 0x01 #define EFI_IFR_FLAG_CALLBACK 0x04 #define EFI_IFR_FLAG_RESET_REQUIRED 0x10 +#define EFI_IFR_FLAG_REST_STYLE 0x20 #define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40 #define EFI_IFR_FLAG_OPTIONS_ONLY 0x80 -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59452): https://edk2.groups.io/g/devel/message/59452 Mute This Topic: https://groups.io/mt/74190440/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v7 3/7] MdePkg: REST style formset
New ClassGuid EFI_HII_REST_STYLE_FORMSET_GUID is defined. In question level, a new flag EFI_IFR_FLAG_REST_STYLE is defined. (UEFI 2.8 mantis 1853) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Guid/HiiPlatformSetupFormset.h| 4 MdePkg/Include/Uefi/UefiInternalFormRepresentation.h | 1 + MdePkg/MdePkg.dec| 5 + 3 files changed, 10 insertions(+) diff --git a/MdePkg/Include/Guid/HiiPlatformSetupFormset.h b/MdePkg/Include/Guid/HiiPlatformSetupFormset.h index 540483d..db7b80b 100644 --- a/MdePkg/Include/Guid/HiiPlatformSetupFormset.h +++ b/MdePkg/Include/Guid/HiiPlatformSetupFormset.h @@ -22,8 +22,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define EFI_HII_USER_CREDENTIAL_FORMSET_GUID \ { 0x337f4407, 0x5aee, 0x4b83, { 0xb2, 0xa7, 0x4e, 0xad, 0xca, 0x30, 0x88, 0xcd } } +#define EFI_HII_REST_STYLE_FORMSET_GUID \ + { 0x790217bd, 0xbecf, 0x485b, { 0x91, 0x70, 0x5f, 0xf7, 0x11, 0x31, 0x8b, 0x27 } } + extern EFI_GUID gEfiHiiPlatformSetupFormsetGuid; extern EFI_GUID gEfiHiiDriverHealthFormsetGuid; extern EFI_GUID gEfiHiiUserCredentialFormsetGuid; +extern EFI_GUID gEfiHiiRestStyleFormsetGuid; #endif diff --git a/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h b/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h index 4a1346a..40fcdb7 100644 --- a/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h +++ b/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h @@ -825,6 +825,7 @@ typedef struct _EFI_IFR_QUESTION_HEADER { #define EFI_IFR_FLAG_READ_ONLY 0x01 #define EFI_IFR_FLAG_CALLBACK 0x04 #define EFI_IFR_FLAG_RESET_REQUIRED 0x10 +#define EFI_IFR_FLAG_REST_STYLE 0x20 #define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40 #define EFI_IFR_FLAG_OPTIONS_ONLY 0x80 diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 86545ac..5ae190d 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -645,6 +645,11 @@ ## Include/Guid/Btt.h gEfiBttAbstractionGuid = { 0x18633bfc, 0x1735, 0x4217, { 0x8a, 0xc9, 0x17, 0x23, 0x92, 0x82, 0xd3, 0xf8 }} + # GUIDs defined in UEFI2.8 + # + ## Include/Guid/HiiPlatformSetupFormset.h + gEfiHiiResetStyleFormsetGuid = { 0x790217bd, 0xbecf, 0x485b, { 0x91, 0x70, 0x5f, 0xf7, 0x11, 0x31, 0x8b, 0x27 }} + # # GUID defined in PI1.0 # -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59453): https://edk2.groups.io/g/devel/message/59453 Mute This Topic: https://groups.io/mt/74190444/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v7 1/7] MdePkg: Extend SERIAL_IO with DeviceTypeGuid
EFI_SERIAL_IO_PROTOCOL_REVISION incremented to 0x00010001. CONST EFI_GUID *DeviceTypeGuid field added to the protocol structure. UEFI 2.8 mantis 1832. Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Protocol/SerialIo.h | 9 + 1 file changed, 9 insertions(+) diff --git a/MdePkg/Include/Protocol/SerialIo.h b/MdePkg/Include/Protocol/SerialIo.h index 51eaa53..e2e0c61 100644 --- a/MdePkg/Include/Protocol/SerialIo.h +++ b/MdePkg/Include/Protocol/SerialIo.h @@ -263,6 +263,7 @@ typedef struct { } EFI_SERIAL_IO_MODE; #define EFI_SERIAL_IO_PROTOCOL_REVISION0x0001 +#define EFI_SERIAL_IO_PROTOCOL_REVISION1p1 0x00010001 #define SERIAL_IO_INTERFACE_REVISION EFI_SERIAL_IO_PROTOCOL_REVISION /// @@ -287,6 +288,14 @@ struct _EFI_SERIAL_IO_PROTOCOL { /// Pointer to SERIAL_IO_MODE data. /// EFI_SERIAL_IO_MODE *Mode; + /// + /// Pointer to a GUID identifying the device connected to the serial port. + /// This field is NULL when the protocol is installed by the serial port + /// driver and may be populated by a platform driver for a serial port + /// with a known device attached. The field will remain NULL if there is + /// no platform serial device identification information available. + /// + CONST EFI_GUID *DeviceTypeGuid; // Revision 1.1 }; extern EFI_GUID gEfiSerialIoProtocolGuid; -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59451): https://edk2.groups.io/g/devel/message/59451 Mute This Topic: https://groups.io/mt/74190439/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V4 5/6] MdeModulePkg: Add FMP Capsule Image Header extension
Add bitmask to structure which gives a binary-inspectable mechanism to determine if a capsule contains an authentication section or depex section. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev --- MdeModulePkg/Application/CapsuleApp/CapsuleDump.c| 1 + .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 20 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c index 7e3e072..e3ab199 100644 --- a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c @@ -98,6 +98,7 @@ DumpFmpCapsule ( Print(L" UpdateVendorCodeSize - 0x%x\n", FmpImageHeader->UpdateVendorCodeSize); if (FmpImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { Print(L" UpdateHardwareInstance - 0x%lx\n", FmpImageHeader->UpdateHardwareInstance); + Print(L" ImageCapsuleSupport - 0x%lx\n", FmpImageHeader->ImageCapsuleSupport); } } } diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c index 5dda561..f9819a7 100644 --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c @@ -285,8 +285,10 @@ ValidateFmpCapsule ( DEBUG((DEBUG_ERROR, "ImageHeader->Version(0x%x) Unknown\n", ImageHeader->Version)); return EFI_INVALID_PARAMETER; } -if (ImageHeader->Version < EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { +if (ImageHeader->Version == 1) { FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); +} else { + FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport); } if (FmpImageSize < FmpImageHeaderSize) { DEBUG((DEBUG_ERROR, "FmpImageSize(0x%lx) < FmpImageHeaderSize(0x%x)\n", FmpImageSize, FmpImageHeaderSize)); @@ -521,6 +523,7 @@ DumpFmpCapsule ( DEBUG((DEBUG_VERBOSE, "UpdateVendorCodeSize - 0x%x\n", ImageHeader->UpdateVendorCodeSize)); if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { DEBUG((DEBUG_VERBOSE, "UpdateHardwareInstance - 0x%lx\n", ImageHeader->UpdateHardwareInstance)); + DEBUG((DEBUG_VERBOSE, "ImageCapsuleSupport - 0x%lx\n", ImageHeader->ImageCapsuleSupport)); } } } @@ -928,9 +931,14 @@ SetFmpImageData ( } else { // // If the EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER is version 1, -// Header should exclude UpdateHardwareInstance field +// Header should exclude UpdateHardwareInstance field, and +// ImageCapsuleSupport field if version is 2. // -Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); +if (ImageHeader->Version == 1) { + Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); +} else { + Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport); +} } if (ImageHeader->UpdateVendorCodeSize == 0) { @@ -945,6 +953,7 @@ SetFmpImageData ( DEBUG((DEBUG_INFO, "ImageIndex - 0x%x ", ImageHeader->UpdateImageIndex)); if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { DEBUG((DEBUG_INFO, "(UpdateHardwareInstance - 0x%x)", ImageHeader->UpdateHardwareInstance)); +DEBUG((DEBUG_INFO, "(ImageCapsuleSupport - 0x%x)", ImageHeader->ImageCapsuleSupport)); } DEBUG((DEBUG_INFO, "\n")); @@ -1239,7 +1248,10 @@ ProcessFmpCapsuleImage ( ImageHeader = (EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER *)((UINT8 *)FmpCapsuleHeader + ItemOffsetList[Index]); UpdateHardwareInstance = 0; -if (ImageHeader->Version >= EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { +/// +/// UpdateHardwareInstance field was added in Version 2 +/// +if (ImageHeader->Version >= 2) { UpdateHardwareInstance = ImageHeader->UpdateHardwareInstance; } -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephon
[edk2-devel] [PATCH V4 2/6] MdePkg: Fix OUT parameters marked as IN OUT
Some OUT parameters in the specification were mistakenly marked as IN OUT. "IN OUT" replaced with "OUT" in the following interfaces EFI_BOOT_SERVICES.GetMemoryMap():MemoryMap EFI_BOOT_SERVICES.LocateHandleBuffer():NoHandles EFI_SIMPLE_POINTER_PROTOCOL.GetState():State EFI_ABSOLUTE_POINTER_PROTOCOL.GetState():State EFI_EDID_OVERRIDE_PROTOCOL.GetEdid():EdidSize and Edid EFI_ATA_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath EFI_SD_MMC_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath EFI_EXT_SCSI_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImage():Image (UEFI 2.8 errata a, mantis 2035) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Protocol/AbsolutePointer.h| 2 +- MdePkg/Include/Protocol/AtaPassThru.h| 4 ++-- MdePkg/Include/Protocol/EdidOverride.h | 4 ++-- MdePkg/Include/Protocol/FirmwareManagement.h | 4 ++-- MdePkg/Include/Protocol/NvmExpressPassthru.h | 4 ++-- MdePkg/Include/Protocol/ScsiPassThruExt.h| 2 +- MdePkg/Include/Protocol/SdMmcPassThru.h | 4 ++-- MdePkg/Include/Protocol/SimplePointer.h | 2 +- MdePkg/Include/Uefi/UefiSpec.h | 8 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/MdePkg/Include/Protocol/AbsolutePointer.h b/MdePkg/Include/Protocol/AbsolutePointer.h index 77d34ae..d59ac97 100644 --- a/MdePkg/Include/Protocol/AbsolutePointer.h +++ b/MdePkg/Include/Protocol/AbsolutePointer.h @@ -169,7 +169,7 @@ typedef EFI_STATUS (EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE)( IN EFI_ABSOLUTE_POINTER_PROTOCOL *This, - IN OUT EFI_ABSOLUTE_POINTER_STATE *State + OUT EFI_ABSOLUTE_POINTER_STATE*State ); diff --git a/MdePkg/Include/Protocol/AtaPassThru.h b/MdePkg/Include/Protocol/AtaPassThru.h index ce6f57f..888dff2 100644 --- a/MdePkg/Include/Protocol/AtaPassThru.h +++ b/MdePkg/Include/Protocol/AtaPassThru.h @@ -315,7 +315,7 @@ EFI_STATUS @param[in] PortMultiplierPort The port multiplier port number of the ATA device for which a device path node is to be allocated and built. If there is no port multiplier, then specify 0x. - @param[in,out] DevicePath A pointer to a single device path node that describes the ATA + @param[out]DevicePath A pointer to a single device path node that describes the ATA device specified by Port and PortMultiplierPort. This function is responsible for allocating the buffer DevicePath with the boot service AllocatePool(). It is the caller's responsibility @@ -334,7 +334,7 @@ EFI_STATUS IN EFI_ATA_PASS_THRU_PROTOCOL *This, IN UINT16 Port, IN UINT16 PortMultiplierPort, - IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath + OUTEFI_DEVICE_PATH_PROTOCOL **DevicePath ); /** diff --git a/MdePkg/Include/Protocol/EdidOverride.h b/MdePkg/Include/Protocol/EdidOverride.h index 9036f8b..709ee48 100644 --- a/MdePkg/Include/Protocol/EdidOverride.h +++ b/MdePkg/Include/Protocol/EdidOverride.h @@ -44,8 +44,8 @@ EFI_STATUS IN EFI_EDID_OVERRIDE_PROTOCOL *This, IN EFI_HANDLE *ChildHandle, OUT UINT32 *Attributes, - IN OUT UINTN*EdidSize, - IN OUT UINT8**Edid + OUT UINTN *EdidSize, + OUT UINT8 **Edid ); /// diff --git a/MdePkg/Include/Protocol/FirmwareManagement.h b/MdePkg/Include/Protocol/FirmwareManagement.h index 297bb5f..b501261 100644 --- a/MdePkg/Include/Protocol/FirmwareManagement.h +++ b/MdePkg/Include/Protocol/FirmwareManagement.h @@ -345,7 +345,7 @@ EFI_STATUS @param[in] This A pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance. @param[in] ImageIndex A unique number identifying the firmware image(s) within the device. The number is between 1 and DescriptorCount. - @param[in, out] Image Points to the buffer where the current image is copied to. + @param[out] Image Points to the buffer where the current image is copied to. @param[in, out] ImageSize On entry, points to the size of the buffer pointed to by Image, in bytes. On return, points to the length of the image, in bytes. @@ -364,7 +364,7 @@ EFI_STATUS (EFIAPI *EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE)( IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN UINT8 ImageIndex, - IN OUT VOID *Image, + OUT VOID *Image, IN OUT UINTN
[edk2-devel] [PATCH V4 0/6] Add definitions introduced in UEFI 2.8a
Following patches add/update structures/definitions, that were introduced/modified by UEFI Spec v.2.8 errata a from Feb 14. Oleksiy Yakovlev (6): MdePkg: Add new CPER Notification types MdePkg: Fix OUT parameters marked as IN OUT MdePkg: Add EFI_RT_PROPERTIES_TABLE MdePkg: Add FMP Capsule Image Header extension MdeModulePkg: Add FMP Capsule Image Header extension SignedCapsulePkg: Add FMP Capsule Image Header extension MdeModulePkg/Application/CapsuleApp/CapsuleDump.c | 1 + .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 20 +-- MdePkg/Include/Guid/Cper.h | 15 + MdePkg/Include/Guid/FmpCapsule.h | 11 +++- MdePkg/Include/Guid/RtPropertiesTable.h| 69 ++ MdePkg/Include/Protocol/AbsolutePointer.h | 2 +- MdePkg/Include/Protocol/AtaPassThru.h | 4 +- MdePkg/Include/Protocol/EdidOverride.h | 4 +- MdePkg/Include/Protocol/FirmwareManagement.h | 4 +- MdePkg/Include/Protocol/NvmExpressPassthru.h | 4 +- MdePkg/Include/Protocol/ScsiPassThruExt.h | 2 +- MdePkg/Include/Protocol/SdMmcPassThru.h| 4 +- MdePkg/Include/Protocol/SimplePointer.h| 2 +- MdePkg/Include/Uefi/UefiSpec.h | 8 +-- MdePkg/MdePkg.dec | 14 + .../RecoveryModuleLoadPei/RecoveryModuleLoadPei.c | 14 +++-- 16 files changed, 152 insertions(+), 26 deletions(-) create mode 100644 MdePkg/Include/Guid/RtPropertiesTable.h -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59379): https://edk2.groups.io/g/devel/message/59379 Mute This Topic: https://groups.io/mt/74169591/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V4 3/6] MdePkg: Add EFI_RT_PROPERTIES_TABLE
Define Guid & data structure for EFI_RT_PROPERTIES_TABLE, designed to be published by a platform if it no longer supports all EFI runtime services once ExitBootServices() has been called by the OS. (UEFI 2.8 errata a, mantis 2049) Signed-off-by: Oleksiy Yakovlev --- MdePkg/Include/Guid/RtPropertiesTable.h | 69 + MdePkg/MdePkg.dec | 5 +++ 2 files changed, 74 insertions(+) create mode 100644 MdePkg/Include/Guid/RtPropertiesTable.h diff --git a/MdePkg/Include/Guid/RtPropertiesTable.h b/MdePkg/Include/Guid/RtPropertiesTable.h new file mode 100644 index 000..1b07bf2 --- /dev/null +++ b/MdePkg/Include/Guid/RtPropertiesTable.h @@ -0,0 +1,69 @@ +/** @file +Guid & data structure for EFI_RT _PROPERTIES_TABLE, designed to be published by a +platform if it no longer supports all EFI runtime services once ExitBootServices() +has been called by the OS. Introduced in UEFI 2.8a. + + +Copyright (c) 2020, American Megatrends International LLC. All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef __RT _PROPERTIES_TABLE_GUID_H__ +#define __RT _PROPERTIES_TABLE_GUID_H__ + +// +// Table, defined here, should be published by a platform if it no longer supports all EFI runtime +// services once ExitBootServices() has been called by the OS. Note that this is merely a hint +// to the OS, which it is free to ignore, and so the platform is still required to provide callable +// implementations of unsupported runtime services that simply return EFI_UNSUPPORTED. +// +#define EFI_RT_PROPERTIES_TABLE_GUID \ +{ 0xeb66918a, 0x7eef, 0x402a, \ +{ 0x84, 0x2e, 0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9 }} + + + + +#pragma pack(1) + +typedef struct { + /// + /// Version of the structure, must be 0x1. + /// + UINT16 Version; + + /// + /// Size in bytes of the entire EFI_RT_PROPERTIES_TABLE, must be 8. + /// + UINT16 Length; + + /// + /// Bitmask of which calls are or are not supported, where a bit set to 1 indicates + /// that the call is supported, and 0 indicates that it is not. + /// + UINT32 RuntimeServicesSupported; +} EFI_RT_PROPERTIES_TABLE; + +#pragma pack() + +#define EFI_RT_PROPERTIES_TABLE_VERSION 0x1 + +#define EFI_RT_SUPPORTED_GET_TIME 0x0001 +#define EFI_RT_SUPPORTED_SET_TIME 0x0002 +#define EFI_RT_SUPPORTED_GET_WAKEUP_TIME0x0004 +#define EFI_RT_SUPPORTED_SET_WAKEUP_TIME0x0008 +#define EFI_RT_SUPPORTED_GET_VARIABLE 0x0010 +#define EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME 0x0020 +#define EFI_RT_SUPPORTED_SET_VARIABLE 0x0040 +#define EFI_RT_SUPPORTED_SET_VIRTUAL_ADDRESS_MAP0x0080 +#define EFI_RT_SUPPORTED_CONVERT_POINTER0x0100 +#define EFI_RT_SUPPORTED_GET_NEXT_HIGH_MONOTONIC_COUNT 0x0200 +#define EFI_RT_SUPPORTED_RESET_SYSTEM 0x0400 +#define EFI_RT_SUPPORTED_UPDATE_CAPSULE 0x0800 +#define EFI_RT_SUPPORTED_QUERY_CAPSULE_CAPABILITIES 0x1000 +#define EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO0x2000 + +extern EFI_GUID gEfiRtPropertiesTableGuid; + +#endif diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index ecd7822..0dd20ad 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -654,6 +654,11 @@ ## Include/Guid/Btt.h gEfiBttAbstractionGuid = { 0x18633bfc, 0x1735, 0x4217, { 0x8a, 0xc9, 0x17, 0x23, 0x92, 0x82, 0xd3, 0xf8 }} + # GUIDs defined in UEFI2.8a + # + ## Include/Guid/RtPropertiesTable.h + gEfiRtPropertiesTableGuid = { 0xeb66918a, 0x7eef, 0x402a, { 0x84, 0x2e, 0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9 }} + # # GUID defined in PI1.0 # -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59382): https://edk2.groups.io/g/devel/message/59382 Mute This Topic: https://groups.io/mt/74169594/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V4 6/6] SignedCapsulePkg: Add FMP Capsule Image Header extension
Add bitmask to structure which gives a binary-inspectable mechanism to determine if a capsule contains an authentication section or depex section. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev --- .../RecoveryModuleLoadPei/RecoveryModuleLoadPei.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c index 53b821c..307060b 100644 --- a/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c +++ b/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c @@ -328,10 +328,11 @@ ValidateFmpCapsule ( DEBUG((DEBUG_ERROR, "ImageHeader->Version(0x%x) Unknown\n", ImageHeader->Version)); return EFI_INVALID_PARAMETER; } -if (ImageHeader->Version < EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { +if (ImageHeader->Version == 1) { FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); +} else { + FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport); } - // No overflow if (FmpImageSize != (UINT64)FmpImageHeaderSize + (UINT64)ImageHeader->UpdateImageSize + (UINT64)ImageHeader->UpdateVendorCodeSize) { DEBUG((DEBUG_ERROR, "FmpImageSize(0x%lx) mismatch, UpdateImageSize(0x%x) UpdateVendorCodeSize(0x%x)\n", FmpImageSize, ImageHeader->UpdateImageSize, ImageHeader->UpdateVendorCodeSize)); @@ -639,9 +640,14 @@ ProcessFmpCapsuleImage ( } else { // // If the EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER is version 1, only match ImageTypeId. - // Header should exclude UpdateHardwareInstance field + // Header should exclude UpdateHardwareInstance field. + // If version is 2 Header should exclude ImageCapsuleSupport field. // - Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); + if (ImageHeader->Version == 1) { +Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); + } else { +Image = (UINT8 *)ImageHeader + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport); + } } Status = ProcessRecoveryImage (Image, ImageHeader->UpdateImageSize); -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59385): https://edk2.groups.io/g/devel/message/59385 Mute This Topic: https://groups.io/mt/74169598/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V4 4/6] MdePkg: Add FMP Capsule Image Header extension
Add bitmask to structure which gives a binary-inspectable mechanism to determine if a capsule contains an authentication section or depex section. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Guid/FmpCapsule.h | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/Guid/FmpCapsule.h b/MdePkg/Include/Guid/FmpCapsule.h index fb8c346..bd5cb77 100644 --- a/MdePkg/Include/Guid/FmpCapsule.h +++ b/MdePkg/Include/Guid/FmpCapsule.h @@ -79,13 +79,22 @@ typedef struct { /// therefore can be modified without changing the Auth data. /// UINT64 UpdateHardwareInstance; + + /// + /// A 64-bit bitmask that determines what sections are added to the payload. + /// #define CAPSULE_SUPPORT_AUTHENTICATION 0x0001 + /// #define CAPSULE_SUPPORT_DEPENDENCY 0x0002 + /// + UINT64 ImageCapsuleSupport; } EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER; #pragma pack() #define EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER_INIT_VERSION 0x0001 -#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x0002 +#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x0003 +#define CAPSULE_SUPPORT_AUTHENTICATION0x0001 +#define CAPSULE_SUPPORT_DEPENDENCY0x0002 extern EFI_GUID gEfiFmpCapsuleGuid; -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59383): https://edk2.groups.io/g/devel/message/59383 Mute This Topic: https://groups.io/mt/74169595/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V4 1/6] MdePkg: Add new CPER Notification types
Add SEA, SEI, and PEI CPER Notification types defined in UEFI 2.8 errata a. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Guid/Cper.h | 15 +++ MdePkg/MdePkg.dec | 9 + 2 files changed, 24 insertions(+) diff --git a/MdePkg/Include/Guid/Cper.h b/MdePkg/Include/Guid/Cper.h index 0cacd30..948f586 100644 --- a/MdePkg/Include/Guid/Cper.h +++ b/MdePkg/Include/Guid/Cper.h @@ -95,6 +95,18 @@ typedef struct { { \ 0x667DD791, 0xC6B3, 0x4c27, { 0x8A, 0x6B, 0x0F, 0x8E, 0x72, 0x2D, 0xEB, 0x41 } \ } +#define EFI_EVENT_NOTIFICATION_TYPE_DMAR_SEA \ + { \ +0x9A78788A, 0xBBE8, 0x11E4, { 0x80, 0x9E, 0x67, 0x61, 0x1E, 0x5D, 0x46, 0xB0 } \ + } +#define EFI_EVENT_NOTIFICATION_TYPE_DMAR_SEI \ + { \ +0x5C284C81, 0xB0AE, 0x4E87, { 0xA3, 0x22, 0xB0, 0x4C, 0x85, 0x62, 0x43, 0x23 } \ + } +#define EFI_EVENT_NOTIFICATION_TYPE_DMAR_PEI \ + { \ +0x09A9D5AC, 0x5204, 0x4214, { 0x96, 0xE5, 0x94, 0x99, 0x2E, 0x75, 0x2B, 0xCD } \ + } ///@} /// @@ -1207,6 +1219,9 @@ extern EFI_GUID gEfiEventNotificationTypeInitGuid; extern EFI_GUID gEfiEventNotificationTypeNmiGuid; extern EFI_GUID gEfiEventNotificationTypeBootGuid; extern EFI_GUID gEfiEventNotificationTypeDmarGuid; +extern EFI_GUID gEfiEventNotificationTypeSeaGuid; +extern EFI_GUID gEfiEventNotificationTypeSeiGuid; +extern EFI_GUID gEfiEventNotificationTypePeiGuid; extern EFI_GUID gEfiProcessorGenericErrorSectionGuid; extern EFI_GUID gEfiProcessorSpecificErrorSectionGuid; diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 0b9c4bc..ecd7822 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -437,6 +437,15 @@ gEfiEventNotificationTypeDmarGuid = { 0x667DD791, 0xC6B3, 0x4c27, { 0x8A, 0x6B, 0x0F, 0x8E, 0x72, 0x2D, 0xEB, 0x41 }} ## Include/Guid/Cper.h + gEfiEventNotificationTypeSeaGuid = { 0x9A78788A, 0xBBE8, 0x11E4, { 0x80, 0x9E, 0x67, 0x61, 0x1E, 0x5D, 0x46, 0xB0 }} + + ## Include/Guid/Cper.h + gEfiEventNotificationTypeSeiGuid = { 0x5C284C81, 0xB0AE, 0x4E87, { 0xA3, 0x22, 0xB0, 0x4C, 0x85, 0x62, 0x43, 0x23 }} + + ## Include/Guid/Cper.h + gEfiEventNotificationTypePeiGuid = { 0x09A9D5AC, 0x5204, 0x4214, { 0x96, 0xE5, 0x94, 0x99, 0x2E, 0x75, 0x2B, 0xCD }} + + ## Include/Guid/Cper.h gEfiProcessorGenericErrorSectionGuid = { 0x9876ccad, 0x47b4, 0x4bdb, { 0xb6, 0x5e, 0x16, 0xf1, 0x93, 0xc4, 0xf3, 0xdb }} ## Include/Guid/Cper.h -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59380): https://edk2.groups.io/g/devel/message/59380 Mute This Topic: https://groups.io/mt/74169592/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v6 1/7] MdePkg: Extend SERIAL_IO with DeviceTypeGuid
EFI_SERIAL_IO_PROTOCOL_REVISION incremented to 0x00010001. CONST EFI_GUID *DeviceTypeGuid field added to the protocol structure. UEFI 2.8 mantis 1832. Signed-off-by: Oleksiy Yakovlev --- MdePkg/Include/Protocol/SerialIo.h | 9 + 1 file changed, 9 insertions(+) diff --git a/MdePkg/Include/Protocol/SerialIo.h b/MdePkg/Include/Protocol/SerialIo.h index 51eaa53..e2e0c61 100644 --- a/MdePkg/Include/Protocol/SerialIo.h +++ b/MdePkg/Include/Protocol/SerialIo.h @@ -263,6 +263,7 @@ typedef struct { } EFI_SERIAL_IO_MODE; #define EFI_SERIAL_IO_PROTOCOL_REVISION0x0001 +#define EFI_SERIAL_IO_PROTOCOL_REVISION1p1 0x00010001 #define SERIAL_IO_INTERFACE_REVISION EFI_SERIAL_IO_PROTOCOL_REVISION /// @@ -287,6 +288,14 @@ struct _EFI_SERIAL_IO_PROTOCOL { /// Pointer to SERIAL_IO_MODE data. /// EFI_SERIAL_IO_MODE *Mode; + /// + /// Pointer to a GUID identifying the device connected to the serial port. + /// This field is NULL when the protocol is installed by the serial port + /// driver and may be populated by a platform driver for a serial port + /// with a known device attached. The field will remain NULL if there is + /// no platform serial device identification information available. + /// + CONST EFI_GUID *DeviceTypeGuid; // Revision 1.1 }; extern EFI_GUID gEfiSerialIoProtocolGuid; -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59365): https://edk2.groups.io/g/devel/message/59365 Mute This Topic: https://groups.io/mt/74168064/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v6 0/7] Add definitions introduced in UEFI 2.8
Following patches add/update structures/definitions, that was introduced/modified by UEFI Spec v.2.8. Oleksiy Yakovlev (7): MdePkg: Extend SERIAL_IO with DeviceTypeGuid BaseTools: REST style formset MdePkg: REST style formset BaseTools: Bootable NVDIMM namespaces MdePkg: Bootable NVDIMM namespaces MdePkg: Add UEFI Spec Revision 2.8 MdePkg: UEFI JSON Capsule Support .../Common/UefiInternalFormRepresentation.h| 1 + BaseTools/Source/C/Include/Protocol/DevicePath.h | 12 +++ MdePkg/Include/Guid/CapsuleReport.h| 29 +++ MdePkg/Include/Guid/HiiPlatformSetupFormset.h | 4 + MdePkg/Include/Guid/JsonCapsule.h | 98 ++ MdePkg/Include/Protocol/DevicePath.h | 12 +++ MdePkg/Include/Protocol/SerialIo.h | 9 ++ .../Include/Uefi/UefiInternalFormRepresentation.h | 1 + MdePkg/Include/Uefi/UefiSpec.h | 2 + MdePkg/MdePkg.dec | 11 +++ 10 files changed, 179 insertions(+) create mode 100644 MdePkg/Include/Guid/JsonCapsule.h -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59364): https://edk2.groups.io/g/devel/message/59364 Mute This Topic: https://groups.io/mt/74168062/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v6 5/7] MdePkg: Bootable NVDIMM namespaces
Provided a mechanism for UEFI FW to identify and hand off bootable NVDIMM namespaces to the OS by standardizing the EFI device path. EFI device path for physical NVDIMM devices changed from an ACPI _ADR device to an ACPI NVDIMM device for correctness. (UEFI 2.8 mantis 1858) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Protocol/DevicePath.h | 12 1 file changed, 12 insertions(+) diff --git a/MdePkg/Include/Protocol/DevicePath.h b/MdePkg/Include/Protocol/DevicePath.h index aaec0a6..4cf4b65 100644 --- a/MdePkg/Include/Protocol/DevicePath.h +++ b/MdePkg/Include/Protocol/DevicePath.h @@ -712,6 +712,18 @@ typedef struct { UINT8 StopBits; } UART_DEVICE_PATH; +/// +/// NVDIMM Namespace Device Path SubType. +/// +#define NVDIMM_NAMESPACE_DP 0x20 +typedef struct { + EFI_DEVICE_PATH_PROTOCOLHeader; + /// + /// Namespace unique label identifier UUID. + /// + EFI_GUID Uuid; +} NVDIMM_NAMESPACE_DEVICE_PATH; + // // Use VENDOR_DEVICE_PATH struct // -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59369): https://edk2.groups.io/g/devel/message/59369 Mute This Topic: https://groups.io/mt/74168070/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v6 2/7] BaseTools: REST style formset
In question level, a new flag EFI_IFR_FLAG_REST_STYLE is defined. (UEFI 2.8 mantis 1853) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h | 1 + 1 file changed, 1 insertion(+) diff --git a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h index b0bd7c5..b9fa8c3 100644 --- a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h +++ b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h @@ -728,6 +728,7 @@ typedef struct _EFI_IFR_QUESTION_HEADER { #define EFI_IFR_FLAG_READ_ONLY 0x01 #define EFI_IFR_FLAG_CALLBACK 0x04 #define EFI_IFR_FLAG_RESET_REQUIRED 0x10 +#define EFI_IFR_FLAG_REST_STYLE 0x20 #define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40 #define EFI_IFR_FLAG_OPTIONS_ONLY 0x80 -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59366): https://edk2.groups.io/g/devel/message/59366 Mute This Topic: https://groups.io/mt/74168065/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v6 3/7] MdePkg: REST style formset
New ClassGuid EFI_HII_REST_STYLE_FORMSET_GUID is defined. In question level, a new flag EFI_IFR_FLAG_REST_STYLE is defined. (UEFI 2.8 mantis 1853) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Guid/HiiPlatformSetupFormset.h| 4 MdePkg/Include/Uefi/UefiInternalFormRepresentation.h | 1 + MdePkg/MdePkg.dec| 5 + 3 files changed, 10 insertions(+) diff --git a/MdePkg/Include/Guid/HiiPlatformSetupFormset.h b/MdePkg/Include/Guid/HiiPlatformSetupFormset.h index 540483d..db7b80b 100644 --- a/MdePkg/Include/Guid/HiiPlatformSetupFormset.h +++ b/MdePkg/Include/Guid/HiiPlatformSetupFormset.h @@ -22,8 +22,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define EFI_HII_USER_CREDENTIAL_FORMSET_GUID \ { 0x337f4407, 0x5aee, 0x4b83, { 0xb2, 0xa7, 0x4e, 0xad, 0xca, 0x30, 0x88, 0xcd } } +#define EFI_HII_REST_STYLE_FORMSET_GUID \ + { 0x790217bd, 0xbecf, 0x485b, { 0x91, 0x70, 0x5f, 0xf7, 0x11, 0x31, 0x8b, 0x27 } } + extern EFI_GUID gEfiHiiPlatformSetupFormsetGuid; extern EFI_GUID gEfiHiiDriverHealthFormsetGuid; extern EFI_GUID gEfiHiiUserCredentialFormsetGuid; +extern EFI_GUID gEfiHiiRestStyleFormsetGuid; #endif diff --git a/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h b/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h index 4a1346a..40fcdb7 100644 --- a/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h +++ b/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h @@ -825,6 +825,7 @@ typedef struct _EFI_IFR_QUESTION_HEADER { #define EFI_IFR_FLAG_READ_ONLY 0x01 #define EFI_IFR_FLAG_CALLBACK 0x04 #define EFI_IFR_FLAG_RESET_REQUIRED 0x10 +#define EFI_IFR_FLAG_REST_STYLE 0x20 #define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40 #define EFI_IFR_FLAG_OPTIONS_ONLY 0x80 diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 0b9c4bc..b6da94b 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -645,6 +645,11 @@ ## Include/Guid/Btt.h gEfiBttAbstractionGuid = { 0x18633bfc, 0x1735, 0x4217, { 0x8a, 0xc9, 0x17, 0x23, 0x92, 0x82, 0xd3, 0xf8 }} + # GUIDs defined in UEFI2.8 + # + ## Include/Guid/HiiPlatformSetupFormset.h + gEfiHiiResetStyleFormsetGuid = { 0x790217bd, 0xbecf, 0x485b, { 0x91, 0x70, 0x5f, 0xf7, 0x11, 0x31, 0x8b, 0x27 }} + # # GUID defined in PI1.0 # -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59367): https://edk2.groups.io/g/devel/message/59367 Mute This Topic: https://groups.io/mt/74168066/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v6 6/7] MdePkg: Add UEFI Spec Revision 2.8
Added entrie in the EFI_SYSTEM_TABLE related definitions section, to signify UEFI 2.8 spec revision. (UEFI 2.8 mantis 1926) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Uefi/UefiSpec.h | 1 + 1 file changed, 1 insertion(+) diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h index 8ffaf97..b9282cc 100644 --- a/MdePkg/Include/Uefi/UefiSpec.h +++ b/MdePkg/Include/Uefi/UefiSpec.h @@ -1788,6 +1788,7 @@ EFI_STATUS // EFI Runtime Services Table // #define EFI_SYSTEM_TABLE_SIGNATURE SIGNATURE_64 ('I','B','I',' ','S','Y','S','T') +#define EFI_2_80_SYSTEM_TABLE_REVISION ((2 << 16) | (80)) #define EFI_2_70_SYSTEM_TABLE_REVISION ((2 << 16) | (70)) #define EFI_2_60_SYSTEM_TABLE_REVISION ((2 << 16) | (60)) #define EFI_2_50_SYSTEM_TABLE_REVISION ((2 << 16) | (50)) -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59370): https://edk2.groups.io/g/devel/message/59370 Mute This Topic: https://groups.io/mt/74168071/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v6 7/7] MdePkg: UEFI JSON Capsule Support
Added Guids and structures, that defines the work flow to perform capsule update using JSON objects. (UEFI 2.8 mantis 1935) Signed-off-by: Oleksiy Yakovlev --- MdePkg/Include/Guid/CapsuleReport.h | 29 +++ MdePkg/Include/Guid/JsonCapsule.h | 98 + MdePkg/Include/Uefi/UefiSpec.h | 1 + MdePkg/MdePkg.dec | 6 +++ 4 files changed, 134 insertions(+) create mode 100644 MdePkg/Include/Guid/JsonCapsule.h diff --git a/MdePkg/Include/Guid/CapsuleReport.h b/MdePkg/Include/Guid/CapsuleReport.h index 93d2bb7..53720e0 100644 --- a/MdePkg/Include/Guid/CapsuleReport.h +++ b/MdePkg/Include/Guid/CapsuleReport.h @@ -93,6 +93,35 @@ typedef struct { /// } EFI_CAPSULE_RESULT_VARIABLE_FMP; +typedef struct { + + /// + /// Version of this structure, currently 0x0001 + /// + UINT32Version; + + /// + /// The unique identifier of the capsule whose processing result is recorded in this variable. + /// 0x 0xEFFF Implementation Reserved + /// 0xF000 0x Specification Reserved + /// #define REDFISH_DEFINED_JSON_SCHEMA 0xF00 + /// The JSON payload shall conform to a Redfish-defined JSON schema, see DMTF-Redfish + /// Specification. + /// + UINT32 CapsuleId; + + /// + /// The length of Resp in bytes. + /// + UINT32 RespLength; + + /// + /// Variable length buffer containing the replied JSON payload to the caller who delivered JSON + /// capsule to system. The definition of the JSON schema used in the replied payload is beyond + /// the scope of this specification. + /// + UINT8 Resp[]; + } EFI_CAPSULE_RESULT_VARIABLE_JSON; extern EFI_GUID gEfiCapsuleReportGuid; diff --git a/MdePkg/Include/Guid/JsonCapsule.h b/MdePkg/Include/Guid/JsonCapsule.h new file mode 100644 index 000..b34d6e3 --- /dev/null +++ b/MdePkg/Include/Guid/JsonCapsule.h @@ -0,0 +1,98 @@ +/** @file +Guid & data structure for tables defined for reporting firmware configuration data to EFI +Configuration Tables and also for processing JSON payload capsule. + + +Copyright (c) 2020, American Megatrends International LLC. All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef __JSON_CAPSULE_GUID_H__ +#define __JSON_CAPSULE_GUID_H__ + +// +// The address reported in the table entry identified by EFI_JSON_CAPSULE_DATA_TABLE_GUID will be +// referenced as physical and will not be fixed up when transition from preboot to runtime phase. The +// addresses reported in these table entries identified by EFI_JSON_CONFIG_DATA_TABLE_GUID and +// EFI_JSON_CAPSULE_RESULT_TABLE_GUID will be referenced as virtual and will be fixed up when +// transition from preboot to runtime phase. +// +#define EFI_JSON_CONFIG_DATA_TABLE_GUID \ +{0x87367f87, 0x1119, 0x41ce, \ +{0xaa, 0xec, 0x8b, 0xe0, 0x11, 0x1f, 0x55, 0x8a }} +#define EFI_JSON_CAPSULE_DATA_TABLE_GUID \ +{0x35e7a725, 0x8dd2, 0x4cac, \ +{0x80, 0x11, 0x33, 0xcd, 0xa8, 0x10, 0x90, 0x56 }} +#define EFI_JSON_CAPSULE_RESULT_TABLE_GUID \ +{0xdbc461c3, 0xb3de, 0x422a,\ +{0xb9, 0xb4, 0x98, 0x86, 0xfd, 0x49, 0xa1, 0xe5 }} +#define EFI_JSON_CAPSULE_ID_GUID \ +{0x67d6f4cd, 0xd6b8, 0x4573, \ +{0xbf, 0x4a, 0xde, 0x5e, 0x25, 0x2d, 0x61, 0xae }} + + +#pragma pack(1) + +typedef struct { + /// + /// Version of the structure, initially 0x0001. + /// + UINT32 Version; + + /// + /// The unique identifier of this capsule. + /// + UINT32 CapsuleId; + + /// + /// The length of the JSON payload immediately following this header, in bytes. + /// + UINT32 PayloadLength; + + /// + /// Variable length buffer containing the JSON payload that should be parsed and applied to the system. The + /// definition of the JSON schema used in the payload is beyond the scope of this specification. + /// + UINT8 Payload[]; +} EFI_JSON_CAPSULE_HEADER; + +typedef struct { + /// + /// The length of the following ConfigData, in bytes. + /// + UINT32 ConfigDataLength; + + /// + /// Variable length buffer containing the JSON payload that describes one group of configuration data within + /// current system. The definition of the JSON schema used in this payload is beyond the scope of this specification. + /// + UINT8 ConfigData[]; +} EFI_JSON_CONFIG_DATA_ITEM; + +typedef struct { + /// + /// Version of the structure, initially 0x0001. + /// + UINT32 Version; + + /// + The total length of EFI_JSON_CAPSULE_CONFIG_DATA, in bytes. + /// + UINT32 TotalLength; + + /// + /// Array of configuration data groups. + /// + EFI_JSON_CONFIG_DATA_ITEM ConfigDataList[]; +} EFI_JSON_CAPSULE_CONFIG_DATA; + +#pragma pack() + +extern EFI_GUID gEfiJsonConfigDataTableGuid; +extern EFI_GUID gEfiJsonCapsuleDataTableGuid; +extern EFI_GUID gEfiJsonCapsuleResultTableGuid; +extern EFI_GUID gEfiJsonCapsuleIdGuid; + + +#endif diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h index b9282cc..3547345 100644 --- a/Md
[edk2-devel] [PATCH v6 4/7] BaseTools: Bootable NVDIMM namespaces
Provided a mechanism for UEFI FW to identify and hand off bootable NVDIMM namespaces to the OS by standardizing the EFI device path. EFI device path for physical NVDIMM devices changed from an ACPI _ADR device to an ACPI NVDIMM device for correctness. (UEFI 2.8 mantis 1858) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- BaseTools/Source/C/Include/Protocol/DevicePath.h | 12 1 file changed, 12 insertions(+) diff --git a/BaseTools/Source/C/Include/Protocol/DevicePath.h b/BaseTools/Source/C/Include/Protocol/DevicePath.h index e3571ef..27f8135 100644 --- a/BaseTools/Source/C/Include/Protocol/DevicePath.h +++ b/BaseTools/Source/C/Include/Protocol/DevicePath.h @@ -719,6 +719,18 @@ typedef struct { UINT8 StopBits; } UART_DEVICE_PATH; +/// +/// NVDIMM Namespace Device Path SubType. +/// +#define NVDIMM_NAMESPACE_DP 0x20 +typedef struct { + EFI_DEVICE_PATH_PROTOCOLHeader; + /// + /// Namespace unique label identifier UUID. + /// + EFI_GUID Uuid; +} NVDIMM_NAMESPACE_DEVICE_PATH; + // // Use VENDOR_DEVICE_PATH struct // -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59368): https://edk2.groups.io/g/devel/message/59368 Mute This Topic: https://groups.io/mt/74168069/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v5 1/7] MdePkg: Extend SERIAL_IO with DeviceTypeGuid
Hi Liming. I made a mistake in implementation. Instead of changing EFI_SERIAL_IO_PROTOCOL_REVISION they introduced a new definition - EFI_SERIAL_IO_PROTOCOL_REVISION1p1. This way it will be completely backward compatible and would not affect MdeModulePkg\Universal\SerialDxe and MdeModulePkg\Bus\Pci\PciSioSerialDxe. I used wrong ECR document. This way we will have no problems with Extend SERIAL_IO with DeviceTypeGuid. I will resubmit patches asap. Regards, Oleksiy. -Original Message- From: Gao, Liming [mailto:liming@intel.com] Sent: Monday, May 11, 2020 8:52 PM To: devel@edk2.groups.io; Oleksiy Yakovlev Cc: Feng, Bob C; Kinney, Michael D; Felix Polyudov Subject: RE: [edk2-devel] [PATCH v5 1/7] MdePkg: Extend SERIAL_IO with DeviceTypeGuid Oleksiy: Seemly, this patch doesn't response to my comment. Is there the comments to be added for new field DeviceTypeGuid? Can its value be NULL? And, are MdeModulePkg\Universal\SerialDxe and MdeModulePkg\Bus\Pci\PciSioSerialDxe required to be updated together? Thanks Liming -Original Message- From: devel@edk2.groups.io On Behalf Of Oleksiy Yakovlev Sent: 2020年5月12日 4:19 To: devel@edk2.groups.io Cc: Feng, Bob C ; Gao, Liming ; Kinney, Michael D ; fel...@ami.com; oleks...@ami.com Subject: [edk2-devel] [PATCH v5 1/7] MdePkg: Extend SERIAL_IO with DeviceTypeGuid EFI_SERIAL_IO_PROTOCOL_REVISION incremented to 0x00010001. CONST EFI_GUID *DeviceTypeGuid field added to the protocol structure. UEFI 2.8 mantis 1832. Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Protocol/SerialIo.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/Protocol/SerialIo.h b/MdePkg/Include/Protocol/SerialIo.h index 51eaa53..b2398c2 100644 --- a/MdePkg/Include/Protocol/SerialIo.h +++ b/MdePkg/Include/Protocol/SerialIo.h @@ -262,7 +262,7 @@ typedef struct { UINT32 StopBits; } EFI_SERIAL_IO_MODE; -#define EFI_SERIAL_IO_PROTOCOL_REVISION0x0001 +#define EFI_SERIAL_IO_PROTOCOL_REVISION0x00010001 #define SERIAL_IO_INTERFACE_REVISION EFI_SERIAL_IO_PROTOCOL_REVISION /// @@ -287,6 +287,7 @@ struct _EFI_SERIAL_IO_PROTOCOL { /// Pointer to SERIAL_IO_MODE data. /// EFI_SERIAL_IO_MODE *Mode; + CONST EFI_GUID *DeviceTypeGuid; // Revision 1.1 }; extern EFI_GUID gEfiSerialIoProtocolGuid; -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59297): https://edk2.groups.io/g/devel/message/59297 Mute This Topic: https://groups.io/mt/74144884/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v5 1/7] MdePkg: Extend SERIAL_IO with DeviceTypeGuid
Hi Liming. The intention of this patch series was to add headers to MdePkg, to make it possible start working on features implementation. Implementing all features in all affected files through all possible module was not in my intentions at all. I agreed to change DxeCapsuleLib to speed up adoption of this series. We need this headers ASAP to start implementing those features in our own products. So we need headers before soft freeze. Regards, Oleksiy. -Original Message- From: Gao, Liming [mailto:liming@intel.com] Sent: Tuesday, May 12, 2020 10:07 AM To: Oleksiy Yakovlev; devel@edk2.groups.io Cc: Feng, Bob C; Kinney, Michael D; Felix Polyudov Subject: RE: [edk2-devel] [PATCH v5 1/7] MdePkg: Extend SERIAL_IO with DeviceTypeGuid MdeModulePkg\Universal\SerialDxe and MdeModulePkg\Bus\Pci\PciSioSerialDxe are two drivers to install SerialIo protocol with the original structure. Please see below code logic. With this patch, SERIAL_IO_INTERFACE_REVISION macro is updated to 1.1. But, this protocol doesn't set the value for new field DeviceTypeGuid. So, I want to confirm whether NULL DeviceTypeGuid is valid or not. EFI_SERIAL_IO_PROTOCOL mSerialIoTemplate = { SERIAL_IO_INTERFACE_REVISION, SerialReset, SerialSetAttributes, SerialSetControl, SerialGetControl, SerialWrite, SerialRead, &mSerialIoMode }; > -Original Message----- > From: Oleksiy Yakovlev > Sent: Tuesday, May 12, 2020 10:01 PM > To: Gao, Liming ; devel@edk2.groups.io > Cc: Feng, Bob C ; Kinney, Michael D > ; Felix Polyudov > Subject: RE: [edk2-devel] [PATCH v5 1/7] MdePkg: Extend SERIAL_IO with > DeviceTypeGuid > > Hi Liming. > > I did not understand your question about MdeModulePkg\Universal\SerialDxe and > MdeModulePkg\Bus\Pci\PciSioSerialDxe > > Regards, Oleksiy. > > -Original Message- > From: Gao, Liming [mailto:liming@intel.com] > Sent: Monday, May 11, 2020 8:52 PM > To: devel@edk2.groups.io; Oleksiy Yakovlev > Cc: Feng, Bob C; Kinney, Michael D; Felix Polyudov > Subject: RE: [edk2-devel] [PATCH v5 1/7] MdePkg: Extend SERIAL_IO with > DeviceTypeGuid > > Oleksiy: > Seemly, this patch doesn't response to my comment. Is there the comments to > be added for new field DeviceTypeGuid? Can its > value be NULL? And, are MdeModulePkg\Universal\SerialDxe and > MdeModulePkg\Bus\Pci\PciSioSerialDxe required to be updated > together? > > Thanks > Liming > -Original Message- > From: devel@edk2.groups.io On Behalf Of Oleksiy > Yakovlev > Sent: 2020年5月12日 4:19 > To: devel@edk2.groups.io > Cc: Feng, Bob C ; Gao, Liming ; > Kinney, Michael D ; > fel...@ami.com; oleks...@ami.com > Subject: [edk2-devel] [PATCH v5 1/7] MdePkg: Extend SERIAL_IO with > DeviceTypeGuid > > EFI_SERIAL_IO_PROTOCOL_REVISION incremented to 0x00010001. > CONST EFI_GUID *DeviceTypeGuid field added to the protocol structure. > UEFI 2.8 mantis 1832. > > Signed-off-by: Oleksiy Yakovlev > > Reviewed-by: Liming Gao > --- > MdePkg/Include/Protocol/SerialIo.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/MdePkg/Include/Protocol/SerialIo.h > b/MdePkg/Include/Protocol/SerialIo.h > index 51eaa53..b2398c2 100644 > --- a/MdePkg/Include/Protocol/SerialIo.h > +++ b/MdePkg/Include/Protocol/SerialIo.h > @@ -262,7 +262,7 @@ typedef struct { >UINT32 StopBits; > } EFI_SERIAL_IO_MODE; > > -#define EFI_SERIAL_IO_PROTOCOL_REVISION0x0001 > +#define EFI_SERIAL_IO_PROTOCOL_REVISION0x00010001 > #define SERIAL_IO_INTERFACE_REVISION EFI_SERIAL_IO_PROTOCOL_REVISION > > /// > @@ -287,6 +287,7 @@ struct _EFI_SERIAL_IO_PROTOCOL { >/// Pointer to SERIAL_IO_MODE data. >/// >EFI_SERIAL_IO_MODE *Mode; > + CONST EFI_GUID *DeviceTypeGuid; // Revision 1.1 > }; > > extern EFI_GUID gEfiSerialIoProtocolGuid; > -- > 2.9.0.windows.1 > > > Please consider the environment before printing this email. > > The information contained in this message may be confidential and proprietary > to American Megatrends (AMI). This communication > is intended to be read only by the individual or entity to whom it is > addressed or by their designee. If the reader of this message is > not the intended recipient, you are on notice that any distribution of this > message, in any form, is strictly prohibited. Please > promptly notify the sender by reply e-mail or by telephone at 770-246-8600, > and then delete or destroy all copies of the transmission. > > > > > Please consider the environment before printing this email. > > The information contained in this message may be confidential and proprietary > to American Megatrends (AMI). This communication > is intend
Re: [edk2-devel] [PATCH V3 5/5] MdeModulePkg: Add FMP Capsule Image Header extension
Hi Wei. The intention of this patch series was to add headers to MdePkg, to make it possible start working on features implementation. Implementing all features in all affected files through all possible module was not in my intentions at all. I agreed to change DxeCapsuleLib to speed up adoption of this series. We need this headers ASAP to start implementing those features in our own products. So we need headers before soft freeze. Regards, Oleksiy. -Original Message- From: Xu, Wei6 [mailto:wei6...@intel.com] Sent: Monday, May 11, 2020 10:39 PM To: devel@edk2.groups.io; Oleksiy Yakovlev Cc: Gao, Liming; Kinney, Michael D; Wang, Jian J; Wu, Hao A; Felix Polyudov Subject: RE: [edk2-devel] [PATCH V3 5/5] MdeModulePkg: Add FMP Capsule Image Header extension Hi Oleksiy, Thanks a lot for the update. But besides it, there are several other places need to be updated as well: https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c#L99 https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c#L522 https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c#L926 https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c#L946 https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c#L1242 https://github.com/tianocore/edk2/blob/master/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c#L331 https://github.com/tianocore/edk2/blob/master/SignedCapsulePkg/Universal/RecoveryModuleLoadPei/RecoveryModuleLoadPei.c#L637 BR, Wei -Original Message- From: devel@edk2.groups.io On Behalf Of Oleksiy Yakovlev Sent: Tuesday, May 12, 2020 5:51 AM To: devel@edk2.groups.io Cc: Gao, Liming ; Kinney, Michael D ; Wang, Jian J ; Wu, Hao A ; fel...@ami.com; oleks...@ami.com Subject: [edk2-devel] [PATCH V3 5/5] MdeModulePkg: Add FMP Capsule Image Header extension Add bitmask to structure which gives a binary-inspectable mechanism to determine if a capsule contains an authentication section or depex section. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev --- MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c index 5dda561..af80039 100644 --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c @@ -285,8 +285,10 @@ ValidateFmpCapsule ( DEBUG((DEBUG_ERROR, "ImageHeader->Version(0x%x) Unknown\n", ImageHeader->Version)); return EFI_INVALID_PARAMETER; } -if (ImageHeader->Version < EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { +if (ImageHeader->Version == 1) { FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); +} else { + FmpImageHeaderSize = + OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, + ImageCapsuleSupport); } if (FmpImageSize < FmpImageHeaderSize) { DEBUG((DEBUG_ERROR, "FmpImageSize(0x%lx) < FmpImageHeaderSize(0x%x)\n", FmpImageSize, FmpImageHeaderSize)); -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59288): https://edk2.groups.io/g/devel/message/59288 Mute This Topic: https://groups.io/mt/74146781/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v5 1/7] MdePkg: Extend SERIAL_IO with DeviceTypeGuid
Hi Liming. I did not understand your question about MdeModulePkg\Universal\SerialDxe and MdeModulePkg\Bus\Pci\PciSioSerialDxe Regards, Oleksiy. -Original Message- From: Gao, Liming [mailto:liming@intel.com] Sent: Monday, May 11, 2020 8:52 PM To: devel@edk2.groups.io; Oleksiy Yakovlev Cc: Feng, Bob C; Kinney, Michael D; Felix Polyudov Subject: RE: [edk2-devel] [PATCH v5 1/7] MdePkg: Extend SERIAL_IO with DeviceTypeGuid Oleksiy: Seemly, this patch doesn't response to my comment. Is there the comments to be added for new field DeviceTypeGuid? Can its value be NULL? And, are MdeModulePkg\Universal\SerialDxe and MdeModulePkg\Bus\Pci\PciSioSerialDxe required to be updated together? Thanks Liming -Original Message- From: devel@edk2.groups.io On Behalf Of Oleksiy Yakovlev Sent: 2020年5月12日 4:19 To: devel@edk2.groups.io Cc: Feng, Bob C ; Gao, Liming ; Kinney, Michael D ; fel...@ami.com; oleks...@ami.com Subject: [edk2-devel] [PATCH v5 1/7] MdePkg: Extend SERIAL_IO with DeviceTypeGuid EFI_SERIAL_IO_PROTOCOL_REVISION incremented to 0x00010001. CONST EFI_GUID *DeviceTypeGuid field added to the protocol structure. UEFI 2.8 mantis 1832. Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Protocol/SerialIo.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/Protocol/SerialIo.h b/MdePkg/Include/Protocol/SerialIo.h index 51eaa53..b2398c2 100644 --- a/MdePkg/Include/Protocol/SerialIo.h +++ b/MdePkg/Include/Protocol/SerialIo.h @@ -262,7 +262,7 @@ typedef struct { UINT32 StopBits; } EFI_SERIAL_IO_MODE; -#define EFI_SERIAL_IO_PROTOCOL_REVISION0x0001 +#define EFI_SERIAL_IO_PROTOCOL_REVISION0x00010001 #define SERIAL_IO_INTERFACE_REVISION EFI_SERIAL_IO_PROTOCOL_REVISION /// @@ -287,6 +287,7 @@ struct _EFI_SERIAL_IO_PROTOCOL { /// Pointer to SERIAL_IO_MODE data. /// EFI_SERIAL_IO_MODE *Mode; + CONST EFI_GUID *DeviceTypeGuid; // Revision 1.1 }; extern EFI_GUID gEfiSerialIoProtocolGuid; -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59281): https://edk2.groups.io/g/devel/message/59281 Mute This Topic: https://groups.io/mt/74144884/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V3 1/5] MdePkg: Add new CPER Notification types
Add SEA, SEI, and PEI CPER Notification types defined in UEFI 2.8 errata a. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Guid/Cper.h | 15 +++ MdePkg/MdePkg.dec | 9 + 2 files changed, 24 insertions(+) diff --git a/MdePkg/Include/Guid/Cper.h b/MdePkg/Include/Guid/Cper.h index 0cacd30..948f586 100644 --- a/MdePkg/Include/Guid/Cper.h +++ b/MdePkg/Include/Guid/Cper.h @@ -95,6 +95,18 @@ typedef struct { { \ 0x667DD791, 0xC6B3, 0x4c27, { 0x8A, 0x6B, 0x0F, 0x8E, 0x72, 0x2D, 0xEB, 0x41 } \ } +#define EFI_EVENT_NOTIFICATION_TYPE_DMAR_SEA \ + { \ +0x9A78788A, 0xBBE8, 0x11E4, { 0x80, 0x9E, 0x67, 0x61, 0x1E, 0x5D, 0x46, 0xB0 } \ + } +#define EFI_EVENT_NOTIFICATION_TYPE_DMAR_SEI \ + { \ +0x5C284C81, 0xB0AE, 0x4E87, { 0xA3, 0x22, 0xB0, 0x4C, 0x85, 0x62, 0x43, 0x23 } \ + } +#define EFI_EVENT_NOTIFICATION_TYPE_DMAR_PEI \ + { \ +0x09A9D5AC, 0x5204, 0x4214, { 0x96, 0xE5, 0x94, 0x99, 0x2E, 0x75, 0x2B, 0xCD } \ + } ///@} /// @@ -1207,6 +1219,9 @@ extern EFI_GUID gEfiEventNotificationTypeInitGuid; extern EFI_GUID gEfiEventNotificationTypeNmiGuid; extern EFI_GUID gEfiEventNotificationTypeBootGuid; extern EFI_GUID gEfiEventNotificationTypeDmarGuid; +extern EFI_GUID gEfiEventNotificationTypeSeaGuid; +extern EFI_GUID gEfiEventNotificationTypeSeiGuid; +extern EFI_GUID gEfiEventNotificationTypePeiGuid; extern EFI_GUID gEfiProcessorGenericErrorSectionGuid; extern EFI_GUID gEfiProcessorSpecificErrorSectionGuid; diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 0b9c4bc..ecd7822 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -437,6 +437,15 @@ gEfiEventNotificationTypeDmarGuid = { 0x667DD791, 0xC6B3, 0x4c27, { 0x8A, 0x6B, 0x0F, 0x8E, 0x72, 0x2D, 0xEB, 0x41 }} ## Include/Guid/Cper.h + gEfiEventNotificationTypeSeaGuid = { 0x9A78788A, 0xBBE8, 0x11E4, { 0x80, 0x9E, 0x67, 0x61, 0x1E, 0x5D, 0x46, 0xB0 }} + + ## Include/Guid/Cper.h + gEfiEventNotificationTypeSeiGuid = { 0x5C284C81, 0xB0AE, 0x4E87, { 0xA3, 0x22, 0xB0, 0x4C, 0x85, 0x62, 0x43, 0x23 }} + + ## Include/Guid/Cper.h + gEfiEventNotificationTypePeiGuid = { 0x09A9D5AC, 0x5204, 0x4214, { 0x96, 0xE5, 0x94, 0x99, 0x2E, 0x75, 0x2B, 0xCD }} + + ## Include/Guid/Cper.h gEfiProcessorGenericErrorSectionGuid = { 0x9876ccad, 0x47b4, 0x4bdb, { 0xb6, 0x5e, 0x16, 0xf1, 0x93, 0xc4, 0xf3, 0xdb }} ## Include/Guid/Cper.h -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59212): https://edk2.groups.io/g/devel/message/59212 Mute This Topic: https://groups.io/mt/74146777/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V3 0/5] Add definitions introduced in UEFI 2.8a
Following patches add/update structures/definitions, that were introduced/modified by UEFI Spec v.2.8 errata a from Feb 14. Oleksiy Yakovlev (5): MdePkg: Add new CPER Notification types MdePkg: Fix OUT parameters marked as IN OUT MdePkg: Add EFI_RT_PROPERTIES_TABLE MdePkg: Add FMP Capsule Image Header extension MdeModulePkg: Add FMP Capsule Image Header extension .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 4 +- MdePkg/Include/Guid/Cper.h | 15 + MdePkg/Include/Guid/FmpCapsule.h | 11 +++- MdePkg/Include/Guid/RtPropertiesTable.h| 69 ++ MdePkg/Include/Protocol/AbsolutePointer.h | 2 +- MdePkg/Include/Protocol/AtaPassThru.h | 4 +- MdePkg/Include/Protocol/EdidOverride.h | 4 +- MdePkg/Include/Protocol/FirmwareManagement.h | 4 +- MdePkg/Include/Protocol/NvmExpressPassthru.h | 4 +- MdePkg/Include/Protocol/ScsiPassThruExt.h | 2 +- MdePkg/Include/Protocol/SdMmcPassThru.h| 4 +- MdePkg/Include/Protocol/SimplePointer.h| 2 +- MdePkg/Include/Uefi/UefiSpec.h | 8 +-- MdePkg/MdePkg.dec | 14 + 14 files changed, 128 insertions(+), 19 deletions(-) create mode 100644 MdePkg/Include/Guid/RtPropertiesTable.h -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59211): https://edk2.groups.io/g/devel/message/59211 Mute This Topic: https://groups.io/mt/74146776/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V3 2/5] MdePkg: Fix OUT parameters marked as IN OUT
Some OUT parameters in the specification were mistakenly marked as IN OUT. "IN OUT" replaced with "OUT" in the following interfaces EFI_BOOT_SERVICES.GetMemoryMap():MemoryMap EFI_BOOT_SERVICES.LocateHandleBuffer():NoHandles EFI_SIMPLE_POINTER_PROTOCOL.GetState():State EFI_ABSOLUTE_POINTER_PROTOCOL.GetState():State EFI_EDID_OVERRIDE_PROTOCOL.GetEdid():EdidSize and Edid EFI_ATA_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath EFI_NVM_EXPRESS_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath EFI_SD_MMC_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath EFI_EXT_SCSI_PASS_THRU_PROTOCOL.BuildDevicePath():DevicePath EFI_FIRMWARE_MANAGEMENT_PROTOCOL.GetImage():Image (UEFI 2.8 errata a, mantis 2035) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Protocol/AbsolutePointer.h| 2 +- MdePkg/Include/Protocol/AtaPassThru.h| 4 ++-- MdePkg/Include/Protocol/EdidOverride.h | 4 ++-- MdePkg/Include/Protocol/FirmwareManagement.h | 4 ++-- MdePkg/Include/Protocol/NvmExpressPassthru.h | 4 ++-- MdePkg/Include/Protocol/ScsiPassThruExt.h| 2 +- MdePkg/Include/Protocol/SdMmcPassThru.h | 4 ++-- MdePkg/Include/Protocol/SimplePointer.h | 2 +- MdePkg/Include/Uefi/UefiSpec.h | 8 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/MdePkg/Include/Protocol/AbsolutePointer.h b/MdePkg/Include/Protocol/AbsolutePointer.h index 77d34ae..d59ac97 100644 --- a/MdePkg/Include/Protocol/AbsolutePointer.h +++ b/MdePkg/Include/Protocol/AbsolutePointer.h @@ -169,7 +169,7 @@ typedef EFI_STATUS (EFIAPI *EFI_ABSOLUTE_POINTER_GET_STATE)( IN EFI_ABSOLUTE_POINTER_PROTOCOL *This, - IN OUT EFI_ABSOLUTE_POINTER_STATE *State + OUT EFI_ABSOLUTE_POINTER_STATE*State ); diff --git a/MdePkg/Include/Protocol/AtaPassThru.h b/MdePkg/Include/Protocol/AtaPassThru.h index ce6f57f..888dff2 100644 --- a/MdePkg/Include/Protocol/AtaPassThru.h +++ b/MdePkg/Include/Protocol/AtaPassThru.h @@ -315,7 +315,7 @@ EFI_STATUS @param[in] PortMultiplierPort The port multiplier port number of the ATA device for which a device path node is to be allocated and built. If there is no port multiplier, then specify 0x. - @param[in,out] DevicePath A pointer to a single device path node that describes the ATA + @param[out]DevicePath A pointer to a single device path node that describes the ATA device specified by Port and PortMultiplierPort. This function is responsible for allocating the buffer DevicePath with the boot service AllocatePool(). It is the caller's responsibility @@ -334,7 +334,7 @@ EFI_STATUS IN EFI_ATA_PASS_THRU_PROTOCOL *This, IN UINT16 Port, IN UINT16 PortMultiplierPort, - IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath + OUTEFI_DEVICE_PATH_PROTOCOL **DevicePath ); /** diff --git a/MdePkg/Include/Protocol/EdidOverride.h b/MdePkg/Include/Protocol/EdidOverride.h index 9036f8b..709ee48 100644 --- a/MdePkg/Include/Protocol/EdidOverride.h +++ b/MdePkg/Include/Protocol/EdidOverride.h @@ -44,8 +44,8 @@ EFI_STATUS IN EFI_EDID_OVERRIDE_PROTOCOL *This, IN EFI_HANDLE *ChildHandle, OUT UINT32 *Attributes, - IN OUT UINTN*EdidSize, - IN OUT UINT8**Edid + OUT UINTN *EdidSize, + OUT UINT8 **Edid ); /// diff --git a/MdePkg/Include/Protocol/FirmwareManagement.h b/MdePkg/Include/Protocol/FirmwareManagement.h index 297bb5f..b501261 100644 --- a/MdePkg/Include/Protocol/FirmwareManagement.h +++ b/MdePkg/Include/Protocol/FirmwareManagement.h @@ -345,7 +345,7 @@ EFI_STATUS @param[in] This A pointer to the EFI_FIRMWARE_MANAGEMENT_PROTOCOL instance. @param[in] ImageIndex A unique number identifying the firmware image(s) within the device. The number is between 1 and DescriptorCount. - @param[in, out] Image Points to the buffer where the current image is copied to. + @param[out] Image Points to the buffer where the current image is copied to. @param[in, out] ImageSize On entry, points to the size of the buffer pointed to by Image, in bytes. On return, points to the length of the image, in bytes. @@ -364,7 +364,7 @@ EFI_STATUS (EFIAPI *EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GET_IMAGE)( IN EFI_FIRMWARE_MANAGEMENT_PROTOCOL *This, IN UINT8 ImageIndex, - IN OUT VOID *Image, + OUT VOID *Image, IN OUT UINTN
[edk2-devel] [PATCH V3 4/5] MdePkg: Add FMP Capsule Image Header extension
Add bitmask to structure which gives a binary-inspectable mechanism to determine if a capsule contains an authentication section or depex section. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Guid/FmpCapsule.h | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/Guid/FmpCapsule.h b/MdePkg/Include/Guid/FmpCapsule.h index fb8c346..bd5cb77 100644 --- a/MdePkg/Include/Guid/FmpCapsule.h +++ b/MdePkg/Include/Guid/FmpCapsule.h @@ -79,13 +79,22 @@ typedef struct { /// therefore can be modified without changing the Auth data. /// UINT64 UpdateHardwareInstance; + + /// + /// A 64-bit bitmask that determines what sections are added to the payload. + /// #define CAPSULE_SUPPORT_AUTHENTICATION 0x0001 + /// #define CAPSULE_SUPPORT_DEPENDENCY 0x0002 + /// + UINT64 ImageCapsuleSupport; } EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER; #pragma pack() #define EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER_INIT_VERSION 0x0001 -#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x0002 +#define EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION 0x0003 +#define CAPSULE_SUPPORT_AUTHENTICATION0x0001 +#define CAPSULE_SUPPORT_DEPENDENCY0x0002 extern EFI_GUID gEfiFmpCapsuleGuid; -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59215): https://edk2.groups.io/g/devel/message/59215 Mute This Topic: https://groups.io/mt/74146780/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V3 5/5] MdeModulePkg: Add FMP Capsule Image Header extension
Add bitmask to structure which gives a binary-inspectable mechanism to determine if a capsule contains an authentication section or depex section. (UEFI 2.8 errata a, mantis 2026) Signed-off-by: Oleksiy Yakovlev --- MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c index 5dda561..af80039 100644 --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleLib.c @@ -285,8 +285,10 @@ ValidateFmpCapsule ( DEBUG((DEBUG_ERROR, "ImageHeader->Version(0x%x) Unknown\n", ImageHeader->Version)); return EFI_INVALID_PARAMETER; } -if (ImageHeader->Version < EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER_INIT_VERSION) { +if (ImageHeader->Version == 1) { FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, UpdateHardwareInstance); +} else { + FmpImageHeaderSize = OFFSET_OF(EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER, ImageCapsuleSupport); } if (FmpImageSize < FmpImageHeaderSize) { DEBUG((DEBUG_ERROR, "FmpImageSize(0x%lx) < FmpImageHeaderSize(0x%x)\n", FmpImageSize, FmpImageHeaderSize)); -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59216): https://edk2.groups.io/g/devel/message/59216 Mute This Topic: https://groups.io/mt/74146781/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V3 3/5] MdePkg: Add EFI_RT_PROPERTIES_TABLE
Define Guid & data structure for EFI_RT_PROPERTIES_TABLE, designed to be published by a platform if it no longer supports all EFI runtime services once ExitBootServices() has been called by the OS. (UEFI 2.8 errata a, mantis 2049) Signed-off-by: Oleksiy Yakovlev --- MdePkg/Include/Guid/RtPropertiesTable.h | 69 + MdePkg/MdePkg.dec | 5 +++ 2 files changed, 74 insertions(+) create mode 100644 MdePkg/Include/Guid/RtPropertiesTable.h diff --git a/MdePkg/Include/Guid/RtPropertiesTable.h b/MdePkg/Include/Guid/RtPropertiesTable.h new file mode 100644 index 000..1b07bf2 --- /dev/null +++ b/MdePkg/Include/Guid/RtPropertiesTable.h @@ -0,0 +1,69 @@ +/** @file +Guid & data structure for EFI_RT _PROPERTIES_TABLE, designed to be published by a +platform if it no longer supports all EFI runtime services once ExitBootServices() +has been called by the OS. Introduced in UEFI 2.8a. + + +Copyright (c) 2020, American Megatrends International LLC. All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef __RT _PROPERTIES_TABLE_GUID_H__ +#define __RT _PROPERTIES_TABLE_GUID_H__ + +// +// Table, defined here, should be published by a platform if it no longer supports all EFI runtime +// services once ExitBootServices() has been called by the OS. Note that this is merely a hint +// to the OS, which it is free to ignore, and so the platform is still required to provide callable +// implementations of unsupported runtime services that simply return EFI_UNSUPPORTED. +// +#define EFI_RT_PROPERTIES_TABLE_GUID \ +{ 0xeb66918a, 0x7eef, 0x402a, \ +{ 0x84, 0x2e, 0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9 }} + + + + +#pragma pack(1) + +typedef struct { + /// + /// Version of the structure, must be 0x1. + /// + UINT16 Version; + + /// + /// Size in bytes of the entire EFI_RT_PROPERTIES_TABLE, must be 8. + /// + UINT16 Length; + + /// + /// Bitmask of which calls are or are not supported, where a bit set to 1 indicates + /// that the call is supported, and 0 indicates that it is not. + /// + UINT32 RuntimeServicesSupported; +} EFI_RT_PROPERTIES_TABLE; + +#pragma pack() + +#define EFI_RT_PROPERTIES_TABLE_VERSION 0x1 + +#define EFI_RT_SUPPORTED_GET_TIME 0x0001 +#define EFI_RT_SUPPORTED_SET_TIME 0x0002 +#define EFI_RT_SUPPORTED_GET_WAKEUP_TIME0x0004 +#define EFI_RT_SUPPORTED_SET_WAKEUP_TIME0x0008 +#define EFI_RT_SUPPORTED_GET_VARIABLE 0x0010 +#define EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME 0x0020 +#define EFI_RT_SUPPORTED_SET_VARIABLE 0x0040 +#define EFI_RT_SUPPORTED_SET_VIRTUAL_ADDRESS_MAP0x0080 +#define EFI_RT_SUPPORTED_CONVERT_POINTER0x0100 +#define EFI_RT_SUPPORTED_GET_NEXT_HIGH_MONOTONIC_COUNT 0x0200 +#define EFI_RT_SUPPORTED_RESET_SYSTEM 0x0400 +#define EFI_RT_SUPPORTED_UPDATE_CAPSULE 0x0800 +#define EFI_RT_SUPPORTED_QUERY_CAPSULE_CAPABILITIES 0x1000 +#define EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO0x2000 + +extern EFI_GUID gEfiRtPropertiesTableGuid; + +#endif diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index ecd7822..0dd20ad 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -654,6 +654,11 @@ ## Include/Guid/Btt.h gEfiBttAbstractionGuid = { 0x18633bfc, 0x1735, 0x4217, { 0x8a, 0xc9, 0x17, 0x23, 0x92, 0x82, 0xd3, 0xf8 }} + # GUIDs defined in UEFI2.8a + # + ## Include/Guid/RtPropertiesTable.h + gEfiRtPropertiesTableGuid = { 0xeb66918a, 0x7eef, 0x402a, { 0x84, 0x2e, 0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9 }} + # # GUID defined in PI1.0 # -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59214): https://edk2.groups.io/g/devel/message/59214 Mute This Topic: https://groups.io/mt/74146779/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v2 5/5] MdePkg: Update structures for MpServices Protocol
From: Robert Phelps Added EXTENDED_PROCESSOR_INFORMATION structure and supporting structures and definitions. The intent is to support updated topology layout for CPUs. (PI 1.7a Mantis 2071) Signed-off-by: Robert Phelps Reviewed-by: Ray Ni --- MdePkg/Include/Protocol/MpService.h | 50 + 1 file changed, 50 insertions(+) diff --git a/MdePkg/Include/Protocol/MpService.h b/MdePkg/Include/Protocol/MpService.h index 10e2405daf..9445c5567f 100644 --- a/MdePkg/Include/Protocol/MpService.h +++ b/MdePkg/Include/Protocol/MpService.h @@ -47,6 +47,11 @@ SPDX-License-Identifier: BSD-2-Clause-Patent 0x3fdda605, 0xa76e, 0x4f46, {0xad, 0x29, 0x12, 0xf4, 0x53, 0x1b, 0x3d, 0x08} \ } +/// +/// Value used in the NumberProcessors parameter of the GetProcessorInfo function +/// +#define CPU_V2_EXTENDED_TOPOLOGY BIT24 + /// /// Forward declaration for the EFI_MP_SERVICES_PROTOCOL. /// @@ -96,6 +101,47 @@ typedef struct { UINT32 Thread; } EFI_CPU_PHYSICAL_LOCATION; +/// +/// Structure that defines the 6-level physical location of the processor +/// +typedef struct { +/// +///Package Zero-based physical package number that identifies the cartridge of the processor. +/// +UINT32 Package; +/// +///Module Zero-based physical module number within package of the processor. +/// +UINT32 Module; +/// +///TileZero-based physical tile number within module of the processor. +/// +UINT32 Tile; +/// +///Die Zero-based physical die number within tile of the processor. +/// +UINT32 Die; +/// +/// CoreZero-based physical core number within die of the processor. +/// +UINT32 Core; +/// +/// Thread Zero-based logical thread number within core of the processor. +/// +UINT32 Thread; +} EFI_CPU_PHYSICAL_LOCATION2; + + +typedef union { + /// The 6-level physical location of the processor, including the + /// physical package number that identifies the cartridge, the physical + /// module number within package, the physical tile number within the module, + /// the physical die number within the tile, the physical core number within + /// package, and logical thread number within core. + EFI_CPU_PHYSICAL_LOCATION2 Location2; +} EXTENDED_PROCESSOR_INFORMATION; + + /// /// Structure that describes information about a logical CPU. /// @@ -132,6 +178,10 @@ typedef struct { /// logical thread number within core. /// EFI_CPU_PHYSICAL_LOCATION Location; + /// + /// The extended information of the processor. This field is filled only when + /// CPU_V2_EXTENDED_TOPOLOGY is set in parameter ProcessorNumber. + EXTENDED_PROCESSOR_INFORMATION ExtendedInformation; } EFI_PROCESSOR_INFORMATION; /** -- 2.24.1.windows.2 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59195): https://edk2.groups.io/g/devel/message/59195 Mute This Topic: https://groups.io/mt/74145026/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v2 3/5] MdePkg: EFI_MM_COMUNICATION2_PROTOCOL
From: Robert Phelps Created a new header to support the new EFI_MM_COMMUNICATION2_PROTOCOL Protocol as defined in the PI 1.7a Specification (PI 1.7a Mantis 1993) Signed-off-by: Robert Phelps Reviewed-by: Zhiguang Liu --- MdePkg/Include/Protocol/MmCommunication2.h | 72 ++ MdePkg/MdePkg.dec | 7 +++ 2 files changed, 79 insertions(+) create mode 100644 MdePkg/Include/Protocol/MmCommunication2.h diff --git a/MdePkg/Include/Protocol/MmCommunication2.h b/MdePkg/Include/Protocol/MmCommunication2.h new file mode 100644 index 00..2d1f44f309 --- /dev/null +++ b/MdePkg/Include/Protocol/MmCommunication2.h @@ -0,0 +1,72 @@ +/** @file +EFI MM Communication Protocol 2 as defined in the PI 1.7 errata A specification. + +Provides a runtime service for communicating between DXE drivers and a registered MMI handler + +Copyright (c) 2020, American Megatrends International LLC. All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ +#ifndef _MM_COMMUNICATION2_H_ +#define _MM_COMMUNICATION2_H_ + +/// +/// Global ID for EFI_MM_COMUNICATION@_PROTOCOL_GUID +/// +#define EFI_MM_COMMUNICATION2_PROTOCOL_GUID \ +{ 0x378daedc, 0xf06b, 0x4446, { 0x83, 0x14, 0x40, 0xab, 0x93, 0x3c, 0x87, 0xa3 }} + + +/// +/// The forward declaration for EFI_MM_COMMUNICATION2_PROTOCOL_GUID +/// +typedef struct _EFI_MM_COMMUNICATION2_PROTOCOL EFI_MM_COMMUNICATION2_PROTOCOL; + + +/** + Communicates with a registered handler. + +Usage is identical to EFI_MM_COMMUNICATION_PROTOCOL.Communicate() except for the notes below: +- Instead of passing just the physical address via the CommBuffer parameter, the caller must pass both the physical and the virtual addresses of the communication buffer. +- If no virtual remapping has taken place, the physical address will be equal to the virtual address, and so the caller is required to pass the same value for both parameters. + +@param This The EFI_MM_COMMUNICATION2_PROTOCOL instance. +@param CommBufferPhysical Physical address of the buffer to convey into MMRAM. +@param CommBufferVirtualVirtual address of the buffer to convey into MMRAM. +@param CommSize The size of the data buffer being passed in. On exit, the +size of data being returned. Zero if the handler does not +wish to reply with any data. This parameter is optional and may be NULL. + + +@retval EFI_SUCCESS The message was successfully posted. +@retval EFI_INVALID_PARAMETER The CommBuffer** parameters do not refer to the same location in memory. +@retval EFI_BAD_BUFFER_SIZE The buffer is too large for the MM implementation. +If this error is returned, the MessageLength field +in the CommBuffer header or the integer pointed by +CommSize, are updated to reflect the maximum payload +size the implementation can accommodate. +@retval EFI_ACCESS_DENIED The CommunicateBuffer parameter or CommSize parameter, +if not omitted, are in address range that cannot be +accessed by the MM environment. +**/ + +typedef +EFI_STATUS +(EFIAPI *EFI_MM_COMMUNICATE2)( +IN CONST EFI_MM_COMMUNICATION2_PROTOCOL *This, +IN OUT VOID *CommBufferPhysical, +IN OUT VOID *CommBufferVirtual, +IN OUT UINTN*CommSize OPTIONAL +); + + +/// This protocol provides a means of communicating between drivers outside +/// of MM and MMI handlers inside of MM, in a way that hides the implementation +/// details regarding whether traditional or standalone MM is being used. + +typedef struct _EFI_MM_COMMUNICATION2_PROTOCOL { +EFI_MM_COMMUNICATE2Communicate; +} EFI_MM_COMMUNICATION2_PROTOCOL; + + +#endif diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 0b9c4bc40a..2591b8e135 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -1280,6 +1280,13 @@ ## Include/Protocol/SpiSmmNorFlash.h gEfiSpiSmmNorFlashProtocolGuid = { 0xaab18f19, 0xfe14, 0x4666, { 0x86, 0x04, 0x87, 0xff, 0x6d, 0x66, 0x2c, 0x9a }} + # + # Protocols defined in PI 1.7 + # + + ## Include/Protocol/MmComunication2.h + gEfiMmCommunication2ProtocolGuid = { 0x378daedc, 0xf06b, 0x4446, { 0x83, 0x14, 0x40, 0xab, 0x93, 0x3c, 0x87, 0xa3 }} + # # Protocols defined in UEFI2.1/UEFI2.0/EFI1.1 # -- 2.24.1.windows.2 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the re
[edk2-devel] [PATCH v2 4/5] MdePkg: Added header file for Delayed Dispatch PPI
From: Robert Phelps Created new header file for the new EFI_DELAYED_DISPATCH_PPI PPI (PI 1.7 Mantis 1891) Signed-off-by: Robert Phelps Reviewed-by: Zhiguang Liu --- MdePkg/Include/Ppi/DelayedDispatch.h | 85 MdePkg/MdePkg.dec| 3 + 2 files changed, 88 insertions(+) create mode 100644 MdePkg/Include/Ppi/DelayedDispatch.h diff --git a/MdePkg/Include/Ppi/DelayedDispatch.h b/MdePkg/Include/Ppi/DelayedDispatch.h new file mode 100644 index 00..195c5a36a4 --- /dev/null +++ b/MdePkg/Include/Ppi/DelayedDispatch.h @@ -0,0 +1,85 @@ +/** @file +EFI Delayed Dispatch PPI as defined in the PI 1.7 Specification + +Provide timed event service in PEI + +Copyright (c) 2020, American Megatrends International LLC. All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-Patent +**/ + +#ifndef __DELAYED_DISPATCH_PPI_H__ +#define __DELAYED_DISPATCH_PPI_H__ + +/// +/// Global ID for EFI_DELAYED_DISPATCH_PPI_GUID +/// +#define EFI_DELAYED_DISPATCH_PPI_GUID \ + { \ +0x869c711d, 0x649c, 0x44fe, { 0x8b, 0x9e, 0x2c, 0xbb, 0x29, 0x11, 0xc3, 0xe6} } \ + } + + +/** + Delayed Dispatch function. This routine is called sometime after the required + delay. Upon return, if NewDelay is 0, the function is unregistered. If NewDelay + is not zero, this routine will be called again after the new delay period. + + @param[in,out] Context Pointer to Context. Can be updated by routine. + @param[out]NewDelayThe new delay in us. Leave at 0 to unregister callback. + +**/ + +typedef +VOID +(EFIAPI *EFI_DELAYED_DISPATCH_FUNCTION) ( + IN OUT UINT64 *Context, + OUT UINT32 *NewDelay + ); + + +/// +/// The forward declaration for EFI_DELAYED_DISPATCH_PPI +/// + +typedef struct _EFI_DELAYED_DISPATCH_PPI EFI_DELAYED_DISPATCH_PPI; + + +/** +Register a callback to be called after a minimum delay has occurred. + +This service is the single member function of the EFI_DELAYED_DISPATCH_PPI + + @param This Pointer to the EFI_DELAYED_DISPATCH_PPI instance + @param Function Function to call back + @param ContextContext data + @param Delay Delay interval + + @retval EFI_SUCCESS Function successfully loaded + @retval EFI_INVALID_PARAMETER One of the Arguments is not supported + @retval EFI_OUT_OF_RESOURCES No more entries + +**/ +typedef +EFI_STATUS +(EFIAPI *EFI_DELAYED_DISPATCH_REGISTER)( + IN EFI_DELAYED_DISPATCH_PPI *This, + IN EFI_DELAYED_DISPATCH_FUNCTION Function, + IN UINT64 Context, + OUT UINT32 Delay + ); + + +/// +/// This PPI is a pointer to the Delayed Dispatch Service. +/// This service will be published by the Pei Foundation. The PEI Foundation +/// will use this service to relaunch a known function that requests a delayed +/// execution. +/// +struct _EFI_DELAYED_DISPATCH_PPI { + EFI_DELAYED_DISPATCH_REGISTER Register; +}; + + +extern EFI_GUID gEfiPeiDelayedDispatchPpiGuid; + +#endif diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 2591b8e135..4c05a46a3c 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -945,6 +945,9 @@ ## Include/Ppi/PeiCoreFvLocation.h gEfiPeiCoreFvLocationPpiGuid = { 0x52888eae, 0x5b10, 0x47d0, { 0xa8, 0x7f, 0xb8, 0x22, 0xab, 0xa0, 0xca, 0xf4 }} + ## Include/Ppi/DelayedDispatch.h + gEfiPeiDelayedDispatchPpiGuid = { 0x869c711d, 0x649c, 0x44fe, { 0x8b, 0x9e, 0x2c, 0xbb, 0x29, 0x11, 0xc3, 0xe6 }} + [Protocols] ## Include/Protocol/Pcd.h gPcdProtocolGuid = { 0x11B34006, 0xD85B, 0x4D0A, { 0xA2, 0x90, 0xD5, 0xA5, 0x71, 0x31, 0x0E, 0xF7 }} -- 2.24.1.windows.2 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59194): https://edk2.groups.io/g/devel/message/59194 Mute This Topic: https://groups.io/mt/74145025/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v2 0/5] Add Definitions introduced in PI 1.7 and PI 1.7a
From: Robert Phelps The following patches add and update the current structures and definitions that were introduced by the PI 1.7 and PI 1.7a specifications Signed-off-by: Robert Phelps Robert Phelps (5): MdePkg: New Status Codes MdePkg: Updates to PI 1.7 Revision numbers for PEI and DXE MdePkg: EFI_MM_COMUNICATION2_PROTOCOL MdePkg: Added header file for Delayed Dispatch PPI MdePkg: Updates to structures in the MP Services Protocol MdePkg/Include/Pi/PiDxeCis.h | 4 +- MdePkg/Include/Pi/PiPeiCis.h | 4 +- MdePkg/Include/Pi/PiStatusCode.h | 17 - MdePkg/Include/Ppi/DelayedDispatch.h | 85 ++ MdePkg/Include/Protocol/MmCommunication2.h | 72 ++ MdePkg/Include/Protocol/MpService.h| 50 + MdePkg/MdePkg.dec | 10 +++ 7 files changed, 236 insertions(+), 6 deletions(-) create mode 100644 MdePkg/Include/Ppi/DelayedDispatch.h create mode 100644 MdePkg/Include/Protocol/MmCommunication2.h -- 2.24.1.windows.2 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59190): https://edk2.groups.io/g/devel/message/59190 Mute This Topic: https://groups.io/mt/74145019/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v2 1/5] MdePkg: New Status Codes
From: Robert Phelps Updated PiStatusCodes to reflect changes to PI 1.7 Specification (PI 1.7 Mantis 1889) Signed-off-by: Robert Phelps Reviewed-by: Zhiguang Liu --- MdePkg/Include/Pi/PiStatusCode.h | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/Pi/PiStatusCode.h b/MdePkg/Include/Pi/PiStatusCode.h index 0ffd29a714..9f6c2abaa7 100644 --- a/MdePkg/Include/Pi/PiStatusCode.h +++ b/MdePkg/Include/Pi/PiStatusCode.h @@ -340,6 +340,7 @@ typedef struct { #define EFI_CHIPSET_EC_BAD_BATTERY (EFI_SUBCLASS_SPECIFIC | 0x) #define EFI_CHIPSET_EC_DXE_NB_ERROR (EFI_SUBCLASS_SPECIFIC | 0x0001) #define EFI_CHIPSET_EC_DXE_SB_ERROR (EFI_SUBCLASS_SPECIFIC | 0x0002) +#define EFI_CHIPSET_EC_INTRUDER_DETECT (EFI_SUBCLASS_SPECIFIC | 0x0003) ///@} /// @@ -361,6 +362,7 @@ typedef struct { #define EFI_PERIPHERAL_AUDIO_OUTPUT (EFI_PERIPHERAL | 0x000A) #define EFI_PERIPHERAL_LCD_DEVICE (EFI_PERIPHERAL | 0x000B) #define EFI_PERIPHERAL_NETWORK (EFI_PERIPHERAL | 0x000C) +#define EFI_PERIPHERAL_DOCKING (EFI_PERIPHERAL | 0x000D) ///@} /// @@ -375,6 +377,7 @@ typedef struct { #define EFI_P_PC_ENABLE 0x0004 #define EFI_P_PC_RECONFIG 0x0005 #define EFI_P_PC_DETECTED 0x0006 +#define EFI_P_PC_REMOVED 0x0007 ///@} // @@ -464,8 +467,9 @@ typedef struct { /// Peripheral Class Keyboard Subclass Error Code definitions. /// ///@{ -#define EFI_P_KEYBOARD_EC_LOCKED(EFI_SUBCLASS_SPECIFIC | 0x) -#define EFI_P_KEYBOARD_EC_STUCK_KEY (EFI_SUBCLASS_SPECIFIC | 0x0001) +#define EFI_P_KEYBOARD_EC_LOCKED (EFI_SUBCLASS_SPECIFIC | 0x) +#define EFI_P_KEYBOARD_EC_STUCK_KEY (EFI_SUBCLASS_SPECIFIC | 0x0001) +#define EFI_P_KEYBOARD_EC_BUFFER_FULL (EFI_SUBCLASS_SPECIFIC | 0x0002) ///@} /// @@ -762,6 +766,7 @@ typedef struct { #define EFI_SW_PEI_PC_RECOVERY_AUTO (EFI_SUBCLASS_SPECIFIC | 0x0004) #define EFI_SW_PEI_PC_S3_BOOT_SCRIPT (EFI_SUBCLASS_SPECIFIC | 0x0005) #define EFI_SW_PEI_PC_OS_WAKE (EFI_SUBCLASS_SPECIFIC | 0x0006) +#define EFI_SW_PEI_PC_S3_STARTED (EFI_SUBCLASS_SPECIFIC | 0x0007) ///@} /// @@ -784,7 +789,11 @@ typedef struct { #define EFI_SW_DXE_BS_PC_LEGACY_BOOT_EVENT(EFI_SUBCLASS_SPECIFIC | 0x0002) #define EFI_SW_DXE_BS_PC_EXIT_BOOT_SERVICES_EVENT (EFI_SUBCLASS_SPECIFIC | 0x0003) #define EFI_SW_DXE_BS_PC_VIRTUAL_ADDRESS_CHANGE_EVENT (EFI_SUBCLASS_SPECIFIC | 0x0004) +#define EFI_SW_DXE_BS_PC_VARIABLE_SERVICES_INIT (EFI_SUBCLASS_SPECIFIC | 0x0005) +#define EFI_SW_DXE_BS_PC_VARIABLE_RECLAIM (EFI_SUBCLASS_SPECIFIC | 0x0006) #define EFI_SW_DXE_BS_PC_ATTEMPT_BOOT_ORDER_EVENT (EFI_SUBCLASS_SPECIFIC | 0x0007) +#define EFI_SW_DXE_BS_PC_CONFIG_RESET (EFI_SUBCLASS_SPECIFIC | 0x0008) +#define EFI_SW_DXE_BS_PC_CSM_INIT (EFI_SUBCLASS_SPECIFIC | 0x0009) ///@} // @@ -974,6 +983,8 @@ typedef struct { #define EFI_SW_EC_PWD_CLR_REQUEST 0x000F #define EFI_SW_EC_PWD_CLEARED 0x0010 #define EFI_SW_EC_EVENT_LOG_FULL 0x0011 +#define EFI_SW_EC_WRITE_PROTECTED 0x0012 +#define EFI_SW_EC_FV_CORRUPTED0x0013 ///@} // @@ -1005,6 +1016,8 @@ typedef struct { #define EFI_SW_PEI_EC_S3_RESUME_FAILED (EFI_SUBCLASS_SPECIFIC | 0x0005) #define EFI_SW_PEI_EC_RECOVERY_PPI_NOT_FOUND (EFI_SUBCLASS_SPECIFIC | 0x0006) #define EFI_SW_PEI_EC_RECOVERY_FAILED (EFI_SUBCLASS_SPECIFIC | 0x0007) +#define EFI_SW_PEI_EC_S3_RESUME_ERROR (EFI_SUBCLASS_SPECIFIC | 0x0008) +#define EFI_SW_PEI_EC_INVALID_CAPSULE (EFI_SUBCLASS_SPECIFIC | 0x0009) ///@} /// -- 2.24.1.windows.2 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59191): https://edk2.groups.io/g/devel/message/59191 Mute This Topic: https://groups.io/mt/74145020/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v2 2/5] MdePkg: Updates to PI 1.7 Revision numbers for
From: Robert Phelps Revision number defines and MACROs were incorrect for the current version of the Specification (PI 1.7 Mantis 1892) Signed-off-by: Robert Phelps Reviewed-by: Zhiguang Liu --- MdePkg/Include/Pi/PiDxeCis.h | 4 ++-- MdePkg/Include/Pi/PiPeiCis.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MdePkg/Include/Pi/PiDxeCis.h b/MdePkg/Include/Pi/PiDxeCis.h index e44744654f..1682211d92 100644 --- a/MdePkg/Include/Pi/PiDxeCis.h +++ b/MdePkg/Include/Pi/PiDxeCis.h @@ -5,7 +5,7 @@ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent @par Revision Reference: - PI Version 1.6 + PI Version 1.7 **/ @@ -690,7 +690,7 @@ EFI_STATUS // #define DXE_SERVICES_SIGNATURE0x565245535f455844ULL #define DXE_SPECIFICATION_MAJOR_REVISION 1 -#define DXE_SPECIFICATION_MINOR_REVISION 60 +#define DXE_SPECIFICATION_MINOR_REVISION 70 #define DXE_SERVICES_REVISION ((DXE_SPECIFICATION_MAJOR_REVISION<<16) | (DXE_SPECIFICATION_MINOR_REVISION)) typedef struct { diff --git a/MdePkg/Include/Pi/PiPeiCis.h b/MdePkg/Include/Pi/PiPeiCis.h index d9d4ed7d41..ebfe598172 100644 --- a/MdePkg/Include/Pi/PiPeiCis.h +++ b/MdePkg/Include/Pi/PiPeiCis.h @@ -5,7 +5,7 @@ Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent @par Revision Reference: - PI Version 1.6. + PI Version 1.7. **/ @@ -850,7 +850,7 @@ EFI_STATUS // PEI Specification Revision information // #define PEI_SPECIFICATION_MAJOR_REVISION 1 -#define PEI_SPECIFICATION_MINOR_REVISION 60 +#define PEI_SPECIFICATION_MINOR_REVISION 70 /// /// Specification inconsistency here: /// In the PI1.0 spec, PEI_SERVICES_SIGNATURE is defined as 0x5652455320494550. But -- 2.24.1.windows.2 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59192): https://edk2.groups.io/g/devel/message/59192 Mute This Topic: https://groups.io/mt/74145021/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v5 5/7] MdePkg: Bootable NVDIMM namespaces
Provided a mechanism for UEFI FW to identify and hand off bootable NVDIMM namespaces to the OS by standardizing the EFI device path. EFI device path for physical NVDIMM devices changed from an ACPI _ADR device to an ACPI NVDIMM device for correctness. (UEFI 2.8 mantis 1858) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Protocol/DevicePath.h | 12 1 file changed, 12 insertions(+) diff --git a/MdePkg/Include/Protocol/DevicePath.h b/MdePkg/Include/Protocol/DevicePath.h index aaec0a6..4cf4b65 100644 --- a/MdePkg/Include/Protocol/DevicePath.h +++ b/MdePkg/Include/Protocol/DevicePath.h @@ -712,6 +712,18 @@ typedef struct { UINT8 StopBits; } UART_DEVICE_PATH; +/// +/// NVDIMM Namespace Device Path SubType. +/// +#define NVDIMM_NAMESPACE_DP 0x20 +typedef struct { + EFI_DEVICE_PATH_PROTOCOLHeader; + /// + /// Namespace unique label identifier UUID. + /// + EFI_GUID Uuid; +} NVDIMM_NAMESPACE_DEVICE_PATH; + // // Use VENDOR_DEVICE_PATH struct // -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59187): https://edk2.groups.io/g/devel/message/59187 Mute This Topic: https://groups.io/mt/74144892/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v5 2/7] BaseTools: REST style formset
In question level, a new flag EFI_IFR_FLAG_REST_STYLE is defined. (UEFI 2.8 mantis 1853) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h | 1 + 1 file changed, 1 insertion(+) diff --git a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h index b0bd7c5..b9fa8c3 100644 --- a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h +++ b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h @@ -728,6 +728,7 @@ typedef struct _EFI_IFR_QUESTION_HEADER { #define EFI_IFR_FLAG_READ_ONLY 0x01 #define EFI_IFR_FLAG_CALLBACK 0x04 #define EFI_IFR_FLAG_RESET_REQUIRED 0x10 +#define EFI_IFR_FLAG_REST_STYLE 0x20 #define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40 #define EFI_IFR_FLAG_OPTIONS_ONLY 0x80 -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59184): https://edk2.groups.io/g/devel/message/59184 Mute This Topic: https://groups.io/mt/74144885/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v5 7/7] MdePkg: UEFI JSON Capsule Support
Added Guids and structures, that defines the work flow to perform capsule update using JSON objects. (UEFI 2.8 mantis 1935) Signed-off-by: Oleksiy Yakovlev --- MdePkg/Include/Guid/CapsuleReport.h | 29 +++ MdePkg/Include/Guid/JsonCapsule.h | 97 + MdePkg/Include/Uefi/UefiSpec.h | 1 + MdePkg/MdePkg.dec | 8 ++- 4 files changed, 134 insertions(+), 1 deletion(-) create mode 100644 MdePkg/Include/Guid/JsonCapsule.h diff --git a/MdePkg/Include/Guid/CapsuleReport.h b/MdePkg/Include/Guid/CapsuleReport.h index 93d2bb7..53720e0 100644 --- a/MdePkg/Include/Guid/CapsuleReport.h +++ b/MdePkg/Include/Guid/CapsuleReport.h @@ -93,6 +93,35 @@ typedef struct { /// } EFI_CAPSULE_RESULT_VARIABLE_FMP; +typedef struct { + + /// + /// Version of this structure, currently 0x0001 + /// + UINT32Version; + + /// + /// The unique identifier of the capsule whose processing result is recorded in this variable. + /// 0x 0xEFFF Implementation Reserved + /// 0xF000 0x Specification Reserved + /// #define REDFISH_DEFINED_JSON_SCHEMA 0xF00 + /// The JSON payload shall conform to a Redfish-defined JSON schema, see DMTF-Redfish + /// Specification. + /// + UINT32 CapsuleId; + + /// + /// The length of Resp in bytes. + /// + UINT32 RespLength; + + /// + /// Variable length buffer containing the replied JSON payload to the caller who delivered JSON + /// capsule to system. The definition of the JSON schema used in the replied payload is beyond + /// the scope of this specification. + /// + UINT8 Resp[]; + } EFI_CAPSULE_RESULT_VARIABLE_JSON; extern EFI_GUID gEfiCapsuleReportGuid; diff --git a/MdePkg/Include/Guid/JsonCapsule.h b/MdePkg/Include/Guid/JsonCapsule.h new file mode 100644 index 000..0fceb8a --- /dev/null +++ b/MdePkg/Include/Guid/JsonCapsule.h @@ -0,0 +1,97 @@ +/** @file +Guid & data structure for tables defined for reporting firmware configuration data to EFI +Configuration Tables and also for processing JSON payload capsule. + + +Copyright (c) 2020, American Megatrends International LLC. All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef __JSON_CAPSULE_GUID_H__ +#define __JSON_CAPSULE_GUID_H__ + +// +// The address reported in the table entry identified by EFI_JSON_CAPSULE_DATA_TABLE_GUID will be +// referenced as physical and will not be fixed up when transition from preboot to runtime phase. The +// addresses reported in these table entries identified by EFI_JSON_CONFIG_DATA_TABLE_GUID and +// EFI_JSON_CAPSULE_RESULT_TABLE_GUID will be referenced as virtual and will be fixed up when +// transition from preboot to runtime phase. +// +#define EFI_JSON_CONFIG_DATA_TABLE_GUID \ +{0x87367f87, 0x1119, 0x41ce, \ +{0xaa, 0xec, 0x8b, 0xe0, 0x11, 0x1f, 0x55, 0x8a }} +#define EFI_JSON_CAPSULE_DATA_TABLE_GUID \ +{0x35e7a725, 0x8dd2, 0x4cac, \ +{0x80, 0x11, 0x33, 0xcd, 0xa8, 0x10, 0x90, 0x56 }} +#define EFI_JSON_CAPSULE_RESULT_TABLE_GUID \ +{0xdbc461c3, 0xb3de, 0x422a,\ +{0xb9, 0xb4, 0x98, 0x86, 0xfd, 0x49, 0xa1, 0xe5 }} +#define EFI_JSON_CAPSULE_ID_GUID \ +{0x67d6f4cd, 0xd6b8, 0x4573, \ +{0xbf, 0x4a, 0xde, 0x5e, 0x25, 0x2d, 0x61, 0xae }} + + +#pragma pack(1) + +typedef struct { + /// + /// Version of the structure, initially 0x0001. + /// + UINT32 Version; + + /// + /// The unique identifier of this capsule. + /// + UINT32 CapsuleId; + + /// + /// The length of the JSON payload immediately following this header, in bytes. + /// + UINT32 PayloadLength; + + /// + /// Variable length buffer containing the JSON payload that should be parsed and applied to the system. The + /// definition of the JSON schema used in the payload is beyond the scope of this specification. + UINT8 Payload[]; +} EFI_JSON_CAPSULE_HEADER; + +typedef struct { + /// + /// The length of the following ConfigData, in bytes. + /// + UINT32 ConfigDataLength; + + /// + /// Variable length buffer containing the JSON payload that describes one group of configuration data within + /// current system. The definition of the JSON schema used in this payload is beyond the scope of this specification. + /// + UINT8 ConfigData[]; +} EFI_JSON_CONFIG_DATA_ITEM; + +typedef struct { + /// + /// Version of the structure, initially 0x0001. + /// + UINT32 Version; + + /// + The total length of EFI_JSON_CAPSULE_CONFIG_DATA, in bytes. + /// + UINT32 TotalLength; + + /// + /// Array of configuration data groups. + /// + EFI_JSON_CONFIG_DATA_ITEM ConfigDataList[]; +} EFI_JSON_CAPSULE_CONFIG_DATA; + +#pragma pack() + +extern EFI_GUID gEfiJsonConfigDataTableGuid; +extern EFI_GUID gEfiJsonCapsuleDataTableGuid; +extern EFI_GUID gEfiJsonCapsuleResultTableGuid; +extern EFI_GUID gEfiJsonCapsuleIdGuid; + + +#endif diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h index b9282cc..3547345 100644 -
[edk2-devel] [PATCH v5 3/7] MdePkg: REST style formset
New ClassGuid EFI_HII_REST_STYLE_FORMSET_GUID is defined. In question level, a new flag EFI_IFR_FLAG_REST_STYLE is defined. (UEFI 2.8 mantis 1853) Signed-off-by: Oleksiy Yakovlev --- MdePkg/Include/Guid/HiiPlatformSetupFormset.h| 4 MdePkg/Include/Uefi/UefiInternalFormRepresentation.h | 1 + MdePkg/MdePkg.dec| 5 + 3 files changed, 10 insertions(+) diff --git a/MdePkg/Include/Guid/HiiPlatformSetupFormset.h b/MdePkg/Include/Guid/HiiPlatformSetupFormset.h index 540483d..db7b80b 100644 --- a/MdePkg/Include/Guid/HiiPlatformSetupFormset.h +++ b/MdePkg/Include/Guid/HiiPlatformSetupFormset.h @@ -22,8 +22,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define EFI_HII_USER_CREDENTIAL_FORMSET_GUID \ { 0x337f4407, 0x5aee, 0x4b83, { 0xb2, 0xa7, 0x4e, 0xad, 0xca, 0x30, 0x88, 0xcd } } +#define EFI_HII_REST_STYLE_FORMSET_GUID \ + { 0x790217bd, 0xbecf, 0x485b, { 0x91, 0x70, 0x5f, 0xf7, 0x11, 0x31, 0x8b, 0x27 } } + extern EFI_GUID gEfiHiiPlatformSetupFormsetGuid; extern EFI_GUID gEfiHiiDriverHealthFormsetGuid; extern EFI_GUID gEfiHiiUserCredentialFormsetGuid; +extern EFI_GUID gEfiHiiRestStyleFormsetGuid; #endif diff --git a/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h b/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h index 4a1346a..40fcdb7 100644 --- a/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h +++ b/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h @@ -825,6 +825,7 @@ typedef struct _EFI_IFR_QUESTION_HEADER { #define EFI_IFR_FLAG_READ_ONLY 0x01 #define EFI_IFR_FLAG_CALLBACK 0x04 #define EFI_IFR_FLAG_RESET_REQUIRED 0x10 +#define EFI_IFR_FLAG_REST_STYLE 0x20 #define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40 #define EFI_IFR_FLAG_OPTIONS_ONLY 0x80 diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index 0b9c4bc..ce40b6f 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -645,6 +645,11 @@ ## Include/Guid/Btt.h gEfiBttAbstractionGuid = { 0x18633bfc, 0x1735, 0x4217, { 0x8a, 0xc9, 0x17, 0x23, 0x92, 0x82, 0xd3, 0xf8 }} + # GUIDs defined in UEFI2.8 + # + ## Include\Guid\HiiPlatformSetupFormset.h + gEfiHiiResetStyleFormsetGuid = { 0x790217bd, 0xbecf, 0x485b, { 0x91, 0x70, 0x5f, 0xf7, 0x11, 0x31, 0x8b, 0x27 }} + # # GUID defined in PI1.0 # -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59185): https://edk2.groups.io/g/devel/message/59185 Mute This Topic: https://groups.io/mt/74144887/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v5 0/7] Add definitions introduced in UEFI 2.8
Following patches add/update structures/definitions, that was introduced/modified by UEFI Spec v.2.8. Oleksiy Yakovlev (7): MdePkg: Extend SERIAL_IO with DeviceTypeGuid BaseTools: REST style formset MdePkg: REST style formset BaseTools: Bootable NVDIMM namespaces MdePkg: Bootable NVDIMM namespaces MdePkg: Add UEFI Spec Revision 2.8 MdePkg: UEFI JSON Capsule Support .../Common/UefiInternalFormRepresentation.h| 1 + BaseTools/Source/C/Include/Protocol/DevicePath.h | 12 +++ MdePkg/Include/Guid/CapsuleReport.h| 29 +++ MdePkg/Include/Guid/HiiPlatformSetupFormset.h | 4 + MdePkg/Include/Guid/JsonCapsule.h | 97 ++ MdePkg/Include/Protocol/DevicePath.h | 12 +++ MdePkg/Include/Protocol/SerialIo.h | 3 +- .../Include/Uefi/UefiInternalFormRepresentation.h | 1 + MdePkg/Include/Uefi/UefiSpec.h | 2 + MdePkg/MdePkg.dec | 13 ++- 10 files changed, 172 insertions(+), 2 deletions(-) create mode 100644 MdePkg/Include/Guid/JsonCapsule.h -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59182): https://edk2.groups.io/g/devel/message/59182 Mute This Topic: https://groups.io/mt/74144883/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v5 6/7] MdePkg: Add UEFI Spec Revision 2.8
Added entrie in the EFI_SYSTEM_TABLE related definitions section, to signify UEFI 2.8 spec revision. (UEFI 2.8 mantis 1926) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Uefi/UefiSpec.h | 1 + 1 file changed, 1 insertion(+) diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h index 8ffaf97..b9282cc 100644 --- a/MdePkg/Include/Uefi/UefiSpec.h +++ b/MdePkg/Include/Uefi/UefiSpec.h @@ -1788,6 +1788,7 @@ EFI_STATUS // EFI Runtime Services Table // #define EFI_SYSTEM_TABLE_SIGNATURE SIGNATURE_64 ('I','B','I',' ','S','Y','S','T') +#define EFI_2_80_SYSTEM_TABLE_REVISION ((2 << 16) | (80)) #define EFI_2_70_SYSTEM_TABLE_REVISION ((2 << 16) | (70)) #define EFI_2_60_SYSTEM_TABLE_REVISION ((2 << 16) | (60)) #define EFI_2_50_SYSTEM_TABLE_REVISION ((2 << 16) | (50)) -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59188): https://edk2.groups.io/g/devel/message/59188 Mute This Topic: https://groups.io/mt/74144896/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v5 4/7] BaseTools: Bootable NVDIMM namespaces
Provided a mechanism for UEFI FW to identify and hand off bootable NVDIMM namespaces to the OS by standardizing the EFI device path. EFI device path for physical NVDIMM devices changed from an ACPI _ADR device to an ACPI NVDIMM device for correctness. (UEFI 2.8 mantis 1858) Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- BaseTools/Source/C/Include/Protocol/DevicePath.h | 12 1 file changed, 12 insertions(+) diff --git a/BaseTools/Source/C/Include/Protocol/DevicePath.h b/BaseTools/Source/C/Include/Protocol/DevicePath.h index e3571ef..27f8135 100644 --- a/BaseTools/Source/C/Include/Protocol/DevicePath.h +++ b/BaseTools/Source/C/Include/Protocol/DevicePath.h @@ -719,6 +719,18 @@ typedef struct { UINT8 StopBits; } UART_DEVICE_PATH; +/// +/// NVDIMM Namespace Device Path SubType. +/// +#define NVDIMM_NAMESPACE_DP 0x20 +typedef struct { + EFI_DEVICE_PATH_PROTOCOLHeader; + /// + /// Namespace unique label identifier UUID. + /// + EFI_GUID Uuid; +} NVDIMM_NAMESPACE_DEVICE_PATH; + // // Use VENDOR_DEVICE_PATH struct // -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59186): https://edk2.groups.io/g/devel/message/59186 Mute This Topic: https://groups.io/mt/74144891/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v5 1/7] MdePkg: Extend SERIAL_IO with DeviceTypeGuid
EFI_SERIAL_IO_PROTOCOL_REVISION incremented to 0x00010001. CONST EFI_GUID *DeviceTypeGuid field added to the protocol structure. UEFI 2.8 mantis 1832. Signed-off-by: Oleksiy Yakovlev Reviewed-by: Liming Gao --- MdePkg/Include/Protocol/SerialIo.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/Protocol/SerialIo.h b/MdePkg/Include/Protocol/SerialIo.h index 51eaa53..b2398c2 100644 --- a/MdePkg/Include/Protocol/SerialIo.h +++ b/MdePkg/Include/Protocol/SerialIo.h @@ -262,7 +262,7 @@ typedef struct { UINT32 StopBits; } EFI_SERIAL_IO_MODE; -#define EFI_SERIAL_IO_PROTOCOL_REVISION0x0001 +#define EFI_SERIAL_IO_PROTOCOL_REVISION0x00010001 #define SERIAL_IO_INTERFACE_REVISION EFI_SERIAL_IO_PROTOCOL_REVISION /// @@ -287,6 +287,7 @@ struct _EFI_SERIAL_IO_PROTOCOL { /// Pointer to SERIAL_IO_MODE data. /// EFI_SERIAL_IO_MODE *Mode; + CONST EFI_GUID *DeviceTypeGuid; // Revision 1.1 }; extern EFI_GUID gEfiSerialIoProtocolGuid; -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#59183): https://edk2.groups.io/g/devel/message/59183 Mute This Topic: https://groups.io/mt/74144884/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v4 7/7] MdePkg: UEFI JSON Capsule Support
Hi Liming. Taking to account, that both 3 and 7 patch affects MdePkg.dec, should patch 7 be based on MdePkg already updated by patch 3, or original? Regards, Oleksiy. -Original Message- From: Gao, Liming [mailto:liming@intel.com] Sent: Monday, May 11, 2020 10:49 AM To: devel@edk2.groups.io; Gao, Liming; Liu, Zhiguang; Oleksiy Yakovlev Cc: Feng, Bob C; Kinney, Michael D; Felix Polyudov Subject: RE: [edk2-devel] [PATCH v4 7/7] MdePkg: UEFI JSON Capsule Support Oleksiy: I review the full patch set. This change should be in patch 3/7. Please update it. With this change, you can add my RB Reviewed-by: Liming Gao . Thanks Liming > -Original Message- > From: devel@edk2.groups.io On Behalf Of Liming Gao > Sent: Monday, May 11, 2020 10:14 PM > To: Liu, Zhiguang ; devel@edk2.groups.io; > oleks...@ami.com > Cc: Feng, Bob C ; Kinney, Michael D > ; fel...@ami.com > Subject: Re: [edk2-devel] [PATCH v4 7/7] MdePkg: UEFI JSON Capsule Support > > Oleksiy: > I don't find this GUID C macro definition. Is it introduced by UEFI JSON? > > > + ## Include\Guid\HiiPlatformSetupFormset.h > > + gEfiHiiResetStyleFormsetGuid = { 0x790217bd, 0xbecf, 0x485b, { 0x91, > > 0x70, 0x5f, 0xf7, 0x11, 0x31, 0x8b, 0x27 }} > > Thanks > Liming > > -Original Message- > > From: Liu, Zhiguang > > Sent: Saturday, May 9, 2020 10:34 AM > > To: devel@edk2.groups.io; oleks...@ami.com > > Cc: Feng, Bob C ; Gao, Liming ; > > Kinney, Michael D ; > > fel...@ami.com > > Subject: RE: [edk2-devel] [PATCH v4 7/7] MdePkg: UEFI JSON Capsule Support > > > > Hi Oleksiy. > > > > I think we all agree to remove the comment marker before the final > > parameter in struct. > > Please see this mail https://edk2.groups.io/g/devel/message/57895 > > Let me know if you have any concern. > > > > And one little suggestion. > > If you send a newer version but don't change anything, you can take the > > Reviewed-by in your commit message if you get one. > > So, the reviewer doesn't have to review the same patch again 😊 > > > > Thanks > > Zhiguang > > > > > -Original Message- > > > From: devel@edk2.groups.io On Behalf Of Oleksiy > > > Yakovlev > > > Sent: Saturday, May 9, 2020 5:46 AM > > > To: devel@edk2.groups.io > > > Cc: Feng, Bob C ; Gao, Liming > > > ; Kinney, Michael D ; > > > fel...@ami.com; oleks...@ami.com > > > Subject: [edk2-devel] [PATCH v4 7/7] MdePkg: UEFI JSON Capsule Support > > > > > > Added Guids and structures, that defines the work flow to perform capsule > > > update using JSON objects. > > > (UEFI 2.8 mantis 1935) > > > > > > Signed-off-by: Oleksiy Yakovlev > > > --- > > > MdePkg/Include/Guid/CapsuleReport.h | 29 +++ > > > MdePkg/Include/Guid/JsonCapsule.h | 97 > > > + > > > MdePkg/Include/Uefi/UefiSpec.h | 1 + > > > MdePkg/MdePkg.dec | 11 + > > > 4 files changed, 138 insertions(+) > > > create mode 100644 MdePkg/Include/Guid/JsonCapsule.h > > > > > > diff --git a/MdePkg/Include/Guid/CapsuleReport.h > > > b/MdePkg/Include/Guid/CapsuleReport.h > > > index 93d2bb7..ab0f552 100644 > > > --- a/MdePkg/Include/Guid/CapsuleReport.h > > > +++ b/MdePkg/Include/Guid/CapsuleReport.h > > > @@ -93,6 +93,35 @@ typedef struct { > > >/// > > > } EFI_CAPSULE_RESULT_VARIABLE_FMP; > > > > > > +typedef struct { > > > + > > > + /// > > > + /// Version of this structure, currently 0x0001 /// > > > + UINT32Version; > > > + > > > + /// > > > + /// The unique identifier of the capsule whose processing result is > > > recorded in this variable. > > > + /// 0x b 0xEFFF b Implementation Reserved /// > > > + 0xF000 b 0x b Specification Reserved /// #define > > > + REDFISH_DEFINED_JSON_SCHEMA 0xF00 /// The JSON payload shall > > > + conform to a Redfish-defined JSON schema, see DMTF-Redfish /// > > > + Specification. > > > + /// > > > + UINT32 CapsuleId; > > > + > > > + /// > > > + /// The length of Resp in bytes. > > > + /// > > > + UINT32 RespLength; > > > + > > > + /// > > > + /// Variable length buffer containing the replied JSON payload to the > > > + caller who delivered JSON /// capsule to system. The definition of > > > + the JSON
[edk2-devel] [PATCH v4 5/7] MdePkg: Bootable NVDIMM namespaces
Provided a mechanism for UEFI FW to identify and hand off bootable NVDIMM namespaces to the OS by standardizing the EFI device path. EFI device path for physical NVDIMM devices changed from an ACPI _ADR device to an ACPI NVDIMM device for correctness. (UEFI 2.8 mantis 1858) Signed-off-by: Oleksiy Yakovlev --- MdePkg/Include/Protocol/DevicePath.h | 12 1 file changed, 12 insertions(+) diff --git a/MdePkg/Include/Protocol/DevicePath.h b/MdePkg/Include/Protocol/DevicePath.h index aaec0a6..4cf4b65 100644 --- a/MdePkg/Include/Protocol/DevicePath.h +++ b/MdePkg/Include/Protocol/DevicePath.h @@ -712,6 +712,18 @@ typedef struct { UINT8 StopBits; } UART_DEVICE_PATH; +/// +/// NVDIMM Namespace Device Path SubType. +/// +#define NVDIMM_NAMESPACE_DP 0x20 +typedef struct { + EFI_DEVICE_PATH_PROTOCOLHeader; + /// + /// Namespace unique label identifier UUID. + /// + EFI_GUID Uuid; +} NVDIMM_NAMESPACE_DEVICE_PATH; + // // Use VENDOR_DEVICE_PATH struct // -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#58915): https://edk2.groups.io/g/devel/message/58915 Mute This Topic: https://groups.io/mt/74083837/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v4 4/7] BaseTools: Bootable NVDIMM namespaces
Provided a mechanism for UEFI FW to identify and hand off bootable NVDIMM namespaces to the OS by standardizing the EFI device path. EFI device path for physical NVDIMM devices changed from an ACPI _ADR device to an ACPI NVDIMM device for correctness. (UEFI 2.8 mantis 1858) Signed-off-by: Oleksiy Yakovlev --- BaseTools/Source/C/Include/Protocol/DevicePath.h | 12 1 file changed, 12 insertions(+) diff --git a/BaseTools/Source/C/Include/Protocol/DevicePath.h b/BaseTools/Source/C/Include/Protocol/DevicePath.h index e3571ef..27f8135 100644 --- a/BaseTools/Source/C/Include/Protocol/DevicePath.h +++ b/BaseTools/Source/C/Include/Protocol/DevicePath.h @@ -719,6 +719,18 @@ typedef struct { UINT8 StopBits; } UART_DEVICE_PATH; +/// +/// NVDIMM Namespace Device Path SubType. +/// +#define NVDIMM_NAMESPACE_DP 0x20 +typedef struct { + EFI_DEVICE_PATH_PROTOCOLHeader; + /// + /// Namespace unique label identifier UUID. + /// + EFI_GUID Uuid; +} NVDIMM_NAMESPACE_DEVICE_PATH; + // // Use VENDOR_DEVICE_PATH struct // -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#58914): https://edk2.groups.io/g/devel/message/58914 Mute This Topic: https://groups.io/mt/74083836/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v4 0/7] Add definitions introduced in UEFI 2.8
Following patches add/update structures/definitions, that was introduced/modified by UEFI Spec v.2.8. Oleksiy Yakovlev (7): MdePkg: Extend SERIAL_IO with DeviceTypeGuid BaseTools: REST style formset MdePkg: REST style formset BaseTools: Bootable NVDIMM namespaces MdePkg: Bootable NVDIMM namespaces MdePkg: Add UEFI Spec Revision 2.8 MdePkg: UEFI JSON Capsule Support .../Common/UefiInternalFormRepresentation.h| 1 + BaseTools/Source/C/Include/Protocol/DevicePath.h | 12 +++ MdePkg/Include/Guid/CapsuleReport.h| 29 +++ MdePkg/Include/Guid/HiiPlatformSetupFormset.h | 4 + MdePkg/Include/Guid/JsonCapsule.h | 97 ++ MdePkg/Include/Protocol/DevicePath.h | 12 +++ MdePkg/Include/Protocol/SerialIo.h | 3 +- .../Include/Uefi/UefiInternalFormRepresentation.h | 1 + MdePkg/Include/Uefi/UefiSpec.h | 2 + MdePkg/MdePkg.dec | 11 +++ 10 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 MdePkg/Include/Guid/JsonCapsule.h -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#58910): https://edk2.groups.io/g/devel/message/58910 Mute This Topic: https://groups.io/mt/74083832/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v4 2/7] BaseTools: REST style formset
In question level, a new flag EFI_IFR_FLAG_REST_STYLE is defined. (UEFI 2.8 mantis 1853) Signed-off-by: Oleksiy Yakovlev --- BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h | 1 + 1 file changed, 1 insertion(+) diff --git a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h index b0bd7c5..b9fa8c3 100644 --- a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h +++ b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h @@ -728,6 +728,7 @@ typedef struct _EFI_IFR_QUESTION_HEADER { #define EFI_IFR_FLAG_READ_ONLY 0x01 #define EFI_IFR_FLAG_CALLBACK 0x04 #define EFI_IFR_FLAG_RESET_REQUIRED 0x10 +#define EFI_IFR_FLAG_REST_STYLE 0x20 #define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40 #define EFI_IFR_FLAG_OPTIONS_ONLY 0x80 -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#58912): https://edk2.groups.io/g/devel/message/58912 Mute This Topic: https://groups.io/mt/74083834/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v4 1/7] MdePkg: Extend SERIAL_IO with DeviceTypeGuid
EFI_SERIAL_IO_PROTOCOL_REVISION incremented to 0x00010001. CONST EFI_GUID *DeviceTypeGuid field added to the protocol structure. UEFI 2.8 mantis 1832. Signed-off-by: Oleksiy Yakovlev --- MdePkg/Include/Protocol/SerialIo.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/Protocol/SerialIo.h b/MdePkg/Include/Protocol/SerialIo.h index 51eaa53..b2398c2 100644 --- a/MdePkg/Include/Protocol/SerialIo.h +++ b/MdePkg/Include/Protocol/SerialIo.h @@ -262,7 +262,7 @@ typedef struct { UINT32 StopBits; } EFI_SERIAL_IO_MODE; -#define EFI_SERIAL_IO_PROTOCOL_REVISION0x0001 +#define EFI_SERIAL_IO_PROTOCOL_REVISION0x00010001 #define SERIAL_IO_INTERFACE_REVISION EFI_SERIAL_IO_PROTOCOL_REVISION /// @@ -287,6 +287,7 @@ struct _EFI_SERIAL_IO_PROTOCOL { /// Pointer to SERIAL_IO_MODE data. /// EFI_SERIAL_IO_MODE *Mode; + CONST EFI_GUID *DeviceTypeGuid; // Revision 1.1 }; extern EFI_GUID gEfiSerialIoProtocolGuid; -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#58911): https://edk2.groups.io/g/devel/message/58911 Mute This Topic: https://groups.io/mt/74083833/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v4 6/7] MdePkg: Add UEFI Spec Revision 2.8
Added entrie in the EFI_SYSTEM_TABLE related definitions section, to signify UEFI 2.8 spec revision. (UEFI 2.8 mantis 1926) Signed-off-by: Oleksiy Yakovlev --- MdePkg/Include/Uefi/UefiSpec.h | 1 + 1 file changed, 1 insertion(+) diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h index 8ffaf97..b9282cc 100644 --- a/MdePkg/Include/Uefi/UefiSpec.h +++ b/MdePkg/Include/Uefi/UefiSpec.h @@ -1788,6 +1788,7 @@ EFI_STATUS // EFI Runtime Services Table // #define EFI_SYSTEM_TABLE_SIGNATURE SIGNATURE_64 ('I','B','I',' ','S','Y','S','T') +#define EFI_2_80_SYSTEM_TABLE_REVISION ((2 << 16) | (80)) #define EFI_2_70_SYSTEM_TABLE_REVISION ((2 << 16) | (70)) #define EFI_2_60_SYSTEM_TABLE_REVISION ((2 << 16) | (60)) #define EFI_2_50_SYSTEM_TABLE_REVISION ((2 << 16) | (50)) -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#58916): https://edk2.groups.io/g/devel/message/58916 Mute This Topic: https://groups.io/mt/74083838/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH v4 7/7] MdePkg: UEFI JSON Capsule Support
Added Guids and structures, that defines the work flow to perform capsule update using JSON objects. (UEFI 2.8 mantis 1935) Signed-off-by: Oleksiy Yakovlev --- MdePkg/Include/Guid/CapsuleReport.h | 29 +++ MdePkg/Include/Guid/JsonCapsule.h | 97 + MdePkg/Include/Uefi/UefiSpec.h | 1 + MdePkg/MdePkg.dec | 11 + 4 files changed, 138 insertions(+) create mode 100644 MdePkg/Include/Guid/JsonCapsule.h diff --git a/MdePkg/Include/Guid/CapsuleReport.h b/MdePkg/Include/Guid/CapsuleReport.h index 93d2bb7..ab0f552 100644 --- a/MdePkg/Include/Guid/CapsuleReport.h +++ b/MdePkg/Include/Guid/CapsuleReport.h @@ -93,6 +93,35 @@ typedef struct { /// } EFI_CAPSULE_RESULT_VARIABLE_FMP; +typedef struct { + + /// + /// Version of this structure, currently 0x0001 + /// + UINT32Version; + + /// + /// The unique identifier of the capsule whose processing result is recorded in this variable. + /// 0x b 0xEFFF b Implementation Reserved + /// 0xF000 b 0x b Specification Reserved + /// #define REDFISH_DEFINED_JSON_SCHEMA 0xF00 + /// The JSON payload shall conform to a Redfish-defined JSON schema, see DMTF-Redfish + /// Specification. + /// + UINT32 CapsuleId; + + /// + /// The length of Resp in bytes. + /// + UINT32 RespLength; + + /// + /// Variable length buffer containing the replied JSON payload to the caller who delivered JSON + /// capsule to system. The definition of the JSON schema used in the replied payload is beyond + /// the scope of this specification. + /// + /// UINT8 Resp[]; + } EFI_CAPSULE_RESULT_VARIABLE_JSON; extern EFI_GUID gEfiCapsuleReportGuid; diff --git a/MdePkg/Include/Guid/JsonCapsule.h b/MdePkg/Include/Guid/JsonCapsule.h new file mode 100644 index 000..721636f --- /dev/null +++ b/MdePkg/Include/Guid/JsonCapsule.h @@ -0,0 +1,97 @@ +/** @file +Guid & data structure for tables defined for reporting firmware configuration data to EFI +Configuration Tables and also for processing JSON payload capsule. + + +Copyright (c) 2020, American Megatrends International LLC. All rights reserved. +SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef _JSON_CAPSULE_GUID_H__ +#define _JSON_CAPSULE_GUID_H__ + +// +// The address reported in the table entry identified by EFI_JSON_CAPSULE_DATA_TABLE_GUID will be +// referenced as physical and will not be fixed up when transition from preboot to runtime phase. The +// addresses reported in these table entries identified by EFI_JSON_CONFIG_DATA_TABLE_GUID and +// EFI_JSON_CAPSULE_RESULT_TABLE_GUID will be referenced as virtual and will be fixed up when +// transition from preboot to runtime phase. +// +#define EFI_JSON_CONFIG_DATA_TABLE_GUID \ +{0x87367f87, 0x1119, 0x41ce, \ +{0xaa, 0xec, 0x8b, 0xe0, 0x11, 0x1f, 0x55, 0x8a }} +#define EFI_JSON_CAPSULE_DATA_TABLE_GUID \ +{0x35e7a725, 0x8dd2, 0x4cac, \ +{0x80, 0x11, 0x33, 0xcd, 0xa8, 0x10, 0x90, 0x56 }} +#define EFI_JSON_CAPSULE_RESULT_TABLE_GUID \ +{0xdbc461c3, 0xb3de, 0x422a,\ +{0xb9, 0xb4, 0x98, 0x86, 0xfd, 0x49, 0xa1, 0xe5 }} +#define EFI_JSON_CAPSULE_ID_GUID \ +{0x67d6f4cd, 0xd6b8, 0x4573, \ +{0xbf, 0x4a, 0xde, 0x5e, 0x25, 0x2d, 0x61, 0xae }} + + +#pragma pack(1) + +typedef struct { + /// + /// Version of the structure, initially 0x0001. + /// + UINT32 Version; + + /// + /// The unique identifier of this capsule. + /// + UINT32 CapsuleId; + + /// + /// The length of the JSON payload immediately following this header, in bytes. + /// + UINT32 PayloadLength; + + /// + /// Variable length buffer containing the JSON payload that should be parsed and applied to the system. The + /// definition of the JSON schema used in the payload is beyond the scope of this specification. + /// UINT8 Payload[]; +} EFI_JSON_CAPSULE_HEADER; + +typedef struct { + /// + /// The length of the following ConfigData, in bytes. + /// + UINT32 ConfigDataLength; + + /// + /// Variable length buffer containing the JSON payload that describes one group of configuration data within + /// current system. The definition of the JSON schema used in this payload is beyond the scope of this specification. + /// + ///UINT8 ConfigData[ConfigDataLength]; +} EFI_JSON_CONFIG_DATA_ITEM; + +typedef struct { + /// + /// Version of the structure, initially 0x0001. + /// + UINT32 Version; + + /// + The total length of EFI_JSON_CAPSULE_CONFIG_DATA, in bytes. + /// + UINT32 TotalLength; + + /// + /// Array of configuration data groups. + /// + /// EFI_JSON_CONFIG_DATA_ITEM ConfigDataList[]; +} EFI_JSON_CAPSULE_CONFIG_DATA; + +#pragma pack() + +extern EFI_GUID gEfiJsonConfigDataTableGuid; +extern EFI_GUID gEfiJsonCapsuleDataTableGuid; +extern EFI_GUID gEfiJsonCapsuleResultTableGuid; +extern EFI_GUID gEfiJsonCapsuleIdGuid; + + +#endif diff --git a/MdePkg/Include/Uefi/UefiSpec.h b/MdePkg/Include/Uefi/UefiSpec.h i
[edk2-devel] [PATCH v4 3/7] MdePkg: REST style formset
New ClassGuid EFI_HII_REST_STYLE_FORMSET_GUID is defined. In question level, a new flag EFI_IFR_FLAG_REST_STYLE is defined. (UEFI 2.8 mantis 1853) Signed-off-by: Oleksiy Yakovlev --- MdePkg/Include/Guid/HiiPlatformSetupFormset.h| 4 MdePkg/Include/Uefi/UefiInternalFormRepresentation.h | 1 + 2 files changed, 5 insertions(+) diff --git a/MdePkg/Include/Guid/HiiPlatformSetupFormset.h b/MdePkg/Include/Guid/HiiPlatformSetupFormset.h index 540483d..db7b80b 100644 --- a/MdePkg/Include/Guid/HiiPlatformSetupFormset.h +++ b/MdePkg/Include/Guid/HiiPlatformSetupFormset.h @@ -22,8 +22,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #define EFI_HII_USER_CREDENTIAL_FORMSET_GUID \ { 0x337f4407, 0x5aee, 0x4b83, { 0xb2, 0xa7, 0x4e, 0xad, 0xca, 0x30, 0x88, 0xcd } } +#define EFI_HII_REST_STYLE_FORMSET_GUID \ + { 0x790217bd, 0xbecf, 0x485b, { 0x91, 0x70, 0x5f, 0xf7, 0x11, 0x31, 0x8b, 0x27 } } + extern EFI_GUID gEfiHiiPlatformSetupFormsetGuid; extern EFI_GUID gEfiHiiDriverHealthFormsetGuid; extern EFI_GUID gEfiHiiUserCredentialFormsetGuid; +extern EFI_GUID gEfiHiiRestStyleFormsetGuid; #endif diff --git a/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h b/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h index 4a1346a..40fcdb7 100644 --- a/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h +++ b/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h @@ -825,6 +825,7 @@ typedef struct _EFI_IFR_QUESTION_HEADER { #define EFI_IFR_FLAG_READ_ONLY 0x01 #define EFI_IFR_FLAG_CALLBACK 0x04 #define EFI_IFR_FLAG_RESET_REQUIRED 0x10 +#define EFI_IFR_FLAG_REST_STYLE 0x20 #define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40 #define EFI_IFR_FLAG_OPTIONS_ONLY 0x80 -- 2.9.0.windows.1 Please consider the environment before printing this email. The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#58913): https://edk2.groups.io/g/devel/message/58913 Mute This Topic: https://groups.io/mt/74083835/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v2 3/4] MdePkg: Add EFI_PROPERTIES_TABLE
Hi Zhiguang. Is this about MdePkg.dec or about new added file RtPropertiesTable.h? Regards, Oleksiy. -Original Message- From: Liu, Zhiguang [mailto:zhiguang@intel.com] Sent: Friday, May 08, 2020 2:08 AM To: devel@edk2.groups.io; Oleksiy Yakovlev Cc: Gao, Liming; Kinney, Michael D; Felix Polyudov Subject: RE: [edk2-devel] [PATCH v2 3/4] MdePkg: Add EFI_PROPERTIES_TABLE Hi Oleksiy, This patch is not correct and can't be applied to master branch. Can you confirm? The line number seems not consistent. Thanks Zhiguang > -Original Message- > From: devel@edk2.groups.io On Behalf Of Oleksiy > Yakovlev > Sent: Friday, May 8, 2020 3:35 AM > To: devel@edk2.groups.io > Cc: Gao, Liming ; Kinney, Michael D > ; fel...@ami.com; oleks...@ami.com > Subject: [edk2-devel] [PATCH v2 3/4] MdePkg: Add EFI_PROPERTIES_TABLE > > Define Guid & data structure for EFI_RT_PROPERTIES_TABLE, designed to be > published by a > platform if it no longer supports all EFI runtime services once > ExitBootServices() > has been called by the OS. > (UEFI 2.8 errata a, mantis 2049) > > Signed-off-by: Oleksiy Yakovlev > --- > MdePkg/Include/Guid/RtPropertiesTable.h | 68 > +++ > MdePkg/MdePkg.dec | 6 +++ > 2 files changed, 74 insertions(+) > create mode 100644 MdePkg/Include/Guid/RtPropertiesTable.h > > diff --git a/MdePkg/Include/Guid/RtPropertiesTable.h > b/MdePkg/Include/Guid/RtPropertiesTable.h > new file mode 100644 > index 000..a5b6c14 > --- /dev/null > +++ b/MdePkg/Include/Guid/RtPropertiesTable.h > @@ -0,0 +1,71 @@ > +/** @file > +Guid & data structure for EFI_RT_PROPERTIES_TABLE, designed to be > published by a > +platform if it no longer supports all EFI runtime services once > ExitBootServices() > +has been called by the OS. > + > + > +Copyright (c) 2020, American Megatrends International LLC. All rights > reserved. > +SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > + > +#ifndef _RT_PROPERTIES_TABLE_GUID_H__ > +#define _RT_PROPERTIES_TABLE_GUID_H__ > + > +// > +// Table, defined here, should be published by a platform if it no longer > supports all EFI runtime > +// services once ExitBootServices() has been called by the OS. Note that this > is merely a hint > +// to the OS, which it is free to ignore, and so the platform is still > required to > provide callable > +// implementations of unsupported runtime services that simply return > EFI_UNSUPPORTED. > +// > +#define EFI_RT_PROPERTIES_TABLE_GUID \ > +{ 0xeb66918a, 0x7eef, 0x402a, \ > +{ 0x84, 0x2e, 0x93, 0x1d, 0x21, 0xc3, 0x8a, 0xe9 }} > + > + > + > +#pragma pack(1) > + > +typedef struct { > + /// > + /// Version of the structure, must be 0x1. > + /// > + UINT16 Version; > + > + /// > + /// Size in bytes of the entire EFI_RT_PROPERTIES_TABLE, must be 8. > + /// > + UINT16 Length; > + > + /// > + /// Bitmask of which calls are or are not supported, where a bit set to 1 > indicates > + /// that the call is supported, and 0 indicates that it is not. > + /// > + UINT32 RuntimeServicesSupported; > +} EFI_RT_PROPERTIES_TABLE; > + > +#pragma pack() > + > +#define EFI_RT_PROPERTIES_TABLE_VERSION 0x1 > + > +#define EFI_RT_SUPPORTED_GET_TIME 0x0001 > +#define EFI_RT_SUPPORTED_SET_TIME 0x0002 > +#define EFI_RT_SUPPORTED_GET_WAKEUP_TIME0x0004 > +#define EFI_RT_SUPPORTED_SET_WAKEUP_TIME0x0008 > +#define EFI_RT_SUPPORTED_GET_VARIABLE 0x0010 > +#define EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME 0x0020 > +#define EFI_RT_SUPPORTED_SET_VARIABLE 0x0040 > +#define EFI_RT_SUPPORTED_SET_VIRTUAL_ADDRESS_MAP0x0080 > +#define EFI_RT_SUPPORTED_CONVERT_POINTER0x0100 > +#define EFI_RT_SUPPORTED_GET_NEXT_HIGH_MONOTONIC_COUNT > 0x0200 > +#define EFI_RT_SUPPORTED_RESET_SYSTEM 0x0400 > +#define EFI_RT_SUPPORTED_UPDATE_CAPSULE 0x0800 > +#define EFI_RT_SUPPORTED_QUERY_CAPSULE_CAPABILITIES 0x1000 > +#define EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO0x2000 > + > +extern EFI_GUID gEfiRtPropertiesTableGuid; > + > +#endif > diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec > index 99e75f7..d5340c5 100644 > --- a/MdePkg/MdePkg.dec > +++ b/MdePkg/MdePkg.dec > @@ -655,6 +655,12 @@ >gEfiBttAbstractionGuid = { 0x18633bfc, 0x1735, 0x4217, { 0x8a, > 0xc9, > 0x17, 0x23, 0x92, 0x82, 0xd3, 0xf8 }} > ># > + # GUIDs defined in UEFI2.8a > + # > + ## Include/Guid/RtPropertiesTable.h > + gEfiRtPropertiesTableGuid = { 0xeb66918a, 0x