[edk2] [PATCH 3/3] OvmfPkg/QemuVideoDxe: Frame buffer config size may change in new mode
https://bugzilla.tianocore.org/show_bug.cgi?id=339 The patch removes the assumption in QemuVideoDxe driver that it wrongly assumes the frame buffer configure size is the same in different video modes. The assumption is true in old FrameBufferBltLib but is false in new implementation. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu NiCc: Jordan Justen Cc: Laszlo Ersek --- OvmfPkg/QemuVideoDxe/Gop.c | 47 +- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/OvmfPkg/QemuVideoDxe/Gop.c b/OvmfPkg/QemuVideoDxe/Gop.c index 5485ba3..359e921 100644 --- a/OvmfPkg/QemuVideoDxe/Gop.c +++ b/OvmfPkg/QemuVideoDxe/Gop.c @@ -1,7 +1,7 @@ /** @file Graphics Output Protocol functions for the QEMU video controller. - Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved. + Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -189,30 +189,35 @@ Routine Description: QemuVideoCompleteModeData (Private, This->Mode); // - // Allocate when using first time. + // Re-initialize the frame buffer configure when mode changes. // - if (Private->FrameBufferBltConfigure == NULL) { -Status = FrameBufferBltConfigure ( - (VOID*) (UINTN) This->Mode->FrameBufferBase, - This->Mode->Info, - Private->FrameBufferBltConfigure, - >FrameBufferBltConfigureSize - ); -ASSERT (Status == RETURN_BUFFER_TOO_SMALL); + Status = FrameBufferBltConfigure ( + (VOID*) (UINTN) This->Mode->FrameBufferBase, + This->Mode->Info, + Private->FrameBufferBltConfigure, + >FrameBufferBltConfigureSize + ); + if (Status == RETURN_BUFFER_TOO_SMALL) { +// +// Frame buffer configure may be larger in new mode. +// +if (Private->FrameBufferBltConfigure != NULL) { + FreePool (Private->FrameBufferBltConfigure); +} Private->FrameBufferBltConfigure = AllocatePool (Private->FrameBufferBltConfigureSize); - } +ASSERT (Private->FrameBufferBltConfigure != NULL); - // - // Create the configuration for FrameBufferBltLib - // - ASSERT (Private->FrameBufferBltConfigure != NULL); - Status = FrameBufferBltConfigure ( - (VOID*) (UINTN) This->Mode->FrameBufferBase, - This->Mode->Info, - Private->FrameBufferBltConfigure, - >FrameBufferBltConfigureSize - ); +// +// Create the configuration for FrameBufferBltLib +// +Status = FrameBufferBltConfigure ( +(VOID*) (UINTN) This->Mode->FrameBufferBase, +This->Mode->Info, +Private->FrameBufferBltConfigure, +>FrameBufferBltConfigureSize +); + } ASSERT (Status == RETURN_SUCCESS); return EFI_SUCCESS; -- 2.9.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH 0/3] MdeModulePkg/FrameBufferBltLib: Use dynamic allocated line buffer
The patches optimized the FrameBufferBltLib to use less memory than old implementation. QemuVideoDxe driver needs to be updated to avoid hang due to wrong assumption. Ruiyu Ni (3): MdeModulePkg/FrameBufferBltLib: Refine ConfigurePixelBitMaskFormat MdeModulePkg/FrameBufferBltLib: Use dynamic allocated line buffer OvmfPkg/QemuVideoDxe: Frame buffer config size may change in new mode .../Library/FrameBufferBltLib/FrameBufferBltLib.c | 95 +- OvmfPkg/QemuVideoDxe/Gop.c | 47 ++- 2 files changed, 81 insertions(+), 61 deletions(-) -- 2.9.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH 1/3] MdeModulePkg/FrameBufferBltLib: Refine ConfigurePixelBitMaskFormat
https://bugzilla.tianocore.org/show_bug.cgi?id=339 The patch refines ConfigurePixelBitMaskFormat() to prepare the enhancement in next commit: Enhance this library to use dynamic allocated line buffer to reduce memory usage of frame buffer configure. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu NiCc: Feng Tian --- .../Library/FrameBufferBltLib/FrameBufferBltLib.c | 71 +- 1 file changed, 43 insertions(+), 28 deletions(-) diff --git a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c index c9bb206..5f6eddc 100644 --- a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c +++ b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c @@ -1,7 +1,7 @@ /** @file FrameBufferBltLib - Library to perform blt operations on a frame buffer. - Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved. + Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -30,8 +30,8 @@ struct FRAME_BUFFER_CONFIGURE { UINT8 *FrameBuffer; EFI_GRAPHICS_PIXEL_FORMAT PixelFormat; EFI_PIXEL_BITMASK PixelMasks; - INTNPixelShl[4]; // R-G-B-Rsvd - INTNPixelShr[4]; // R-G-B-Rsvd + INT8PixelShl[4]; // R-G-B-Rsvd + INT8PixelShr[4]; // R-G-B-Rsvd }; CONST EFI_PIXEL_BITMASK mRgbPixelMasks = { @@ -45,43 +45,47 @@ CONST EFI_PIXEL_BITMASK mBgrPixelMasks = { /** Initialize the bit mask in frame buffer configure. - @param Configure The frame buffer configure. - @param BitMaskThe bit mask of pixel. + @param BitMask The bit mask of pixel. + @param BytesPerPixel Size in bytes of pixel. + @param PixelShl Left shift array. + @param PixelShr Right shift array. **/ VOID -ConfigurePixelBitMaskFormat ( - IN FRAME_BUFFER_CONFIGURE *Configure, - IN CONST EFI_PIXEL_BITMASK*BitMask +FrameBufferBltLibConfigurePixelFormat ( + IN CONST EFI_PIXEL_BITMASK*BitMask, + OUT UINTN *BytesPerPixel, + OUT INT8 *PixelShl, + OUT INT8 *PixelShr ) { - UINTN Loop; + UINT8 Index; UINT32 *Masks; UINT32 MergedMasks; + ASSERT (BytesPerPixel != NULL); + MergedMasks = 0; Masks = (UINT32*) BitMask; - for (Loop = 0; Loop < 3; Loop++) { -ASSERT ((Loop == 3) || (Masks[Loop] != 0)); -ASSERT ((MergedMasks & Masks[Loop]) == 0); -Configure->PixelShl[Loop] = HighBitSet32 (Masks[Loop]) - 23 + (Loop * 8); -if (Configure->PixelShl[Loop] < 0) { - Configure->PixelShr[Loop] = -Configure->PixelShl[Loop]; - Configure->PixelShl[Loop] = 0; + for (Index = 0; Index < 3; Index++) { +ASSERT ((MergedMasks & Masks[Index]) == 0); + +PixelShl[Index] = (INT8) HighBitSet32 (Masks[Index]) - 23 + (Index * 8); +if (PixelShl[Index] < 0) { + PixelShr[Index] = -PixelShl[Index]; + PixelShl[Index] = 0; } else { - Configure->PixelShr[Loop] = 0; + PixelShr[Index] = 0; } -MergedMasks = (UINT32) (MergedMasks | Masks[Loop]); -DEBUG ((EFI_D_VERBOSE, "%d: shl:%d shr:%d mask:%x\n", Loop, -Configure->PixelShl[Loop], Configure->PixelShr[Loop], Masks[Loop])); +DEBUG ((DEBUG_INFO, "%d: shl:%d shr:%d mask:%x\n", Index, +PixelShl[Index], PixelShr[Index], Masks[Index])); + +MergedMasks = (UINT32) (MergedMasks | Masks[Index]); } MergedMasks = (UINT32) (MergedMasks | Masks[3]); ASSERT (MergedMasks != 0); - Configure->BytesPerPixel = (UINTN) ((HighBitSet32 (MergedMasks) + 7) / 8); - - DEBUG ((EFI_D_VERBOSE, "Bytes per pixel: %d\n", Configure->BytesPerPixel)); - - CopyMem (>PixelMasks, BitMask, sizeof (*BitMask)); + *BytesPerPixel = (UINTN) ((HighBitSet32 (MergedMasks) + 7) / 8); + DEBUG ((DEBUG_INFO, "Bytes per pixel: %d\n", *BytesPerPixel)); } /** @@ -110,6 +114,11 @@ FrameBufferBltConfigure ( IN OUT UINTN *ConfigureSize ) { + CONST EFI_PIXEL_BITMASK *BitMask; + UINTNBytesPerPixel; + INT8 PixelShl[4]; + INT8 PixelShr[4]; + if (ConfigureSize == NULL) { return RETURN_INVALID_PARAMETER; } @@ -125,15 +134,15 @@ FrameBufferBltConfigure ( switch (FrameBufferInfo->PixelFormat) { case PixelRedGreenBlueReserved8BitPerColor: -ConfigurePixelBitMaskFormat (Configure, ); +BitMask = break; case PixelBlueGreenRedReserved8BitPerColor: -ConfigurePixelBitMaskFormat
[edk2] [PATCH 2/3] MdeModulePkg/FrameBufferBltLib: Use dynamic allocated line buffer
https://bugzilla.tianocore.org/show_bug.cgi?id=339 The patch uses dynamic allocated line buffer to reduce memory usage of frame buffer configure. (Original implementation uses 0x4000 bytes for line buffer.) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu NiCc: Feng Tian --- .../Library/FrameBufferBltLib/FrameBufferBltLib.c | 24 +++--- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c index 5f6eddc..011d9c5 100644 --- a/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c +++ b/MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.c @@ -26,12 +26,12 @@ struct FRAME_BUFFER_CONFIGURE { UINTN BytesPerPixel; UINTN WidthInPixels; UINTN Height; - UINT8 LineBuffer[SIZE_4KB * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL)]; UINT8 *FrameBuffer; EFI_GRAPHICS_PIXEL_FORMAT PixelFormat; EFI_PIXEL_BITMASK PixelMasks; INT8PixelShl[4]; // R-G-B-Rsvd INT8PixelShr[4]; // R-G-B-Rsvd + UINT8 LineBuffer[0]; }; CONST EFI_PIXEL_BITMASK mRgbPixelMasks = { @@ -123,15 +123,6 @@ FrameBufferBltConfigure ( return RETURN_INVALID_PARAMETER; } - if (*ConfigureSize < sizeof (FRAME_BUFFER_CONFIGURE)) { -*ConfigureSize = sizeof (FRAME_BUFFER_CONFIGURE); -return RETURN_BUFFER_TOO_SMALL; - } - - if (Configure == NULL) { -return RETURN_INVALID_PARAMETER; - } - switch (FrameBufferInfo->PixelFormat) { case PixelRedGreenBlueReserved8BitPerColor: BitMask = @@ -156,6 +147,17 @@ FrameBufferBltConfigure ( FrameBufferBltLibConfigurePixelFormat (BitMask, , PixelShl, PixelShr); + if (*ConfigureSize < sizeof (FRAME_BUFFER_CONFIGURE) + + FrameBufferInfo->HorizontalResolution * BytesPerPixel) { +*ConfigureSize = sizeof (FRAME_BUFFER_CONFIGURE) + + FrameBufferInfo->HorizontalResolution * BytesPerPixel; +return RETURN_BUFFER_TOO_SMALL; + } + + if (Configure == NULL) { +return RETURN_INVALID_PARAMETER; + } + CopyMem (>PixelMasks, BitMask, sizeof (*BitMask)); CopyMem (Configure->PixelShl,PixelShl, sizeof (PixelShl)); CopyMem (Configure->PixelShr,PixelShr, sizeof (PixelShr)); @@ -166,8 +168,6 @@ FrameBufferBltConfigure ( Configure->Height= (UINTN) FrameBufferInfo->VerticalResolution; Configure->WidthInBytes = Configure->WidthInPixels * Configure->BytesPerPixel; - ASSERT (Configure->WidthInBytes < sizeof (Configure->LineBuffer)); - return RETURN_SUCCESS; } -- 2.9.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v3 0/3] Enable the HTTP connections switch
> Subject: [PATCH v3 0/3] Enable the HTTP connections switch > > v3: > * Append patch for OVMF. > > Cc: Laszlo Ersek> Cc: Justen Jordan L > Cc: Gary Lin > Cc: Ye Ting > Cc: Fu Siyuan > Cc: Kinney Michael D > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Wu Jiaxin > > Jiaxin Wu (3): > NetworkPkg: Add PCD to enable the HTTP connections switch Commit: https://github.com/tianocore/edk2/commit/221463c2b337072532ed4ab8ffe3b566574724d8 > Nt32Pkg.dsc: Add flag to control HTTP connections Commit: https://github.com/tianocore/edk2/commit/7c3c53e5e8ee066904e56d9e6dd85dad4933f29e > OvmfPkg: Allow HTTP connections if HTTP Boot enabled Commit: https://github.com/tianocore/edk2/commit/4b2fb7986d571827a6e4885377e531002d806681 Thank you! Jiaxin > > NetworkPkg/HttpBootDxe/HttpBootClient.c | 20 +++- > NetworkPkg/HttpBootDxe/HttpBootConfig.c | 81 -- > -- > NetworkPkg/HttpBootDxe/HttpBootDxe.inf | 5 +- > NetworkPkg/HttpBootDxe/HttpBootSupport.c | 53 - > NetworkPkg/HttpBootDxe/HttpBootSupport.h | 17 ++- > NetworkPkg/HttpDxe/HttpDxe.inf | 5 +- > NetworkPkg/HttpDxe/HttpImpl.c| 12 - > NetworkPkg/NetworkPkg.dec| 8 +++- > Nt32Pkg/Nt32Pkg.dsc | 18 ++- > OvmfPkg/OvmfPkgIa32.dsc | 6 ++- > OvmfPkg/OvmfPkgIa32X64.dsc | 6 ++- > OvmfPkg/OvmfPkgX64.dsc | 6 ++- > 12 files changed, 195 insertions(+), 42 deletions(-) > > -- > 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] NetworkPkg: Remove superfluous return statement.
Commit: https://github.com/tianocore/edk2/commit/f3fa35a00233b6f2e7653b3b8c3e2b28b8ecbe7f Thanks, Jiaxin > -Original Message- > From: Wu, Jiaxin > Sent: Friday, January 20, 2017 8:39 AM > To: Thomas Huth; edk2-de...@ml01.01.org > Cc: Fu, Siyuan > Subject: RE: [edk2] [PATCH] NetworkPkg: Remove superfluous return statement. > > Reviewed-by: Wu Jiaxin > > Thanks, > Jiaxin > > > -Original Message- > > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > > Thomas Huth > > Sent: Thursday, January 19, 2017 5:38 PM > > To: edk2-de...@ml01.01.org > > Cc: Fu, Siyuan ; Wu, Jiaxin > > Subject: [edk2] [PATCH] NetworkPkg: Remove superfluous return statement. > > > > If the code eventually returns "Status" anyway, it does not make > > sense to explicitely return "Status" in case of an error, too. > > > > Contributed-under: TianoCore Contribution Agreement 1.0 > > Signed-off-by: Thomas Huth > > --- > > NetworkPkg/HttpDxe/HttpsSupport.c | 4 > > 1 file changed, 4 deletions(-) > > > > diff --git a/NetworkPkg/HttpDxe/HttpsSupport.c > > b/NetworkPkg/HttpDxe/HttpsSupport.c > > index 77e5371..f0077dd 100644 > > --- a/NetworkPkg/HttpDxe/HttpsSupport.c > > +++ b/NetworkPkg/HttpDxe/HttpsSupport.c > > @@ -1294,10 +1294,6 @@ TlsCloseSession ( > >FreePool (BufferOut); > >NetbufFree (PacketOut); > > > > - if (EFI_ERROR (Status)) { > > -return Status; > > - } > > - > >return Status; > > } > > > > -- > > 1.8.3.1 > > > > ___ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] BaseTools: Extend the Macro used in the FDF !include statement
Reviewed-by: Liming Gao>-Original Message- >From: Zhu, Yonghong >Sent: Sunday, January 22, 2017 11:28 AM >To: edk2-devel@lists.01.org >Cc: Gao, Liming >Subject: [Patch] BaseTools: Extend the Macro used in the FDF !include >statement > >Current it only support the system environment variables in the !include >statement, $(WORKSPACE), $(PACKAGES_PATH), $(EFI_SOURCE), >$(EDK_SOURCE), >$(ECP_SOURCE), this patch extend the usage to support the Global macros >and the macro which defined before the statement. > >Cc: Liming Gao >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Yonghong Zhu >--- > BaseTools/Source/Python/GenFds/FdfParser.py | 41 >+ > 1 file changed, 30 insertions(+), 11 deletions(-) > >diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py >b/BaseTools/Source/Python/GenFds/FdfParser.py >index e1295f2..27688e2 100644 >--- a/BaseTools/Source/Python/GenFds/FdfParser.py >+++ b/BaseTools/Source/Python/GenFds/FdfParser.py >@@ -618,31 +618,50 @@ class FdfParser: > # @param selfThe object pointer > # > def PreprocessIncludeFile(self): > # nested include support > Processed = False >+MacroDict = {} > while self.__GetNextToken(): > >-if self.__Token == '!include': >+if self.__Token == 'DEFINE': >+if not self.__GetNextToken(): >+raise Warning("expected Macro name", self.FileName, >self.CurrentLineNumber) >+Macro = self.__Token >+if not self.__IsToken( "="): >+raise Warning("expected '='", self.FileName, >self.CurrentLineNumber) >+Value = self.__GetExpression() >+MacroDict[Macro] = Value >+ >+elif self.__Token == '!include': > Processed = True > IncludeLine = self.CurrentLineNumber > IncludeOffset = self.CurrentOffsetWithinLine - len('!include') > if not self.__GetNextToken(): > raise Warning("expected include file name", self.FileName, >self.CurrentLineNumber) > IncFileName = self.__Token >-__IncludeMacros = {} >-for Macro in ['WORKSPACE', 'ECP_SOURCE', 'EFI_SOURCE', >'EDK_SOURCE']: >+PreIndex = 0 >+StartPos = IncFileName.find('$(', PreIndex) >+EndPos = IncFileName.find(')', StartPos+2) >+while StartPos != -1 and EndPos != -1: >+Macro = IncFileName[StartPos+2 : EndPos] > MacroVal = self.__GetMacroValue(Macro) >-if MacroVal: >-__IncludeMacros[Macro] = MacroVal >+if not MacroVal: >+if Macro in MacroDict: >+MacroVal = MacroDict[Macro] >+if MacroVal != None: >+IncFileName = IncFileName.replace('$(' + Macro + ')', >MacroVal, 1) >+if MacroVal.find('$(') != -1: >+PreIndex = StartPos >+else: >+PreIndex = StartPos + len(MacroVal) >+else: >+raise Warning("The Macro %s is not defined" %Macro, >self.FileName, self.CurrentLineNumber) >+StartPos = IncFileName.find('$(', PreIndex) >+EndPos = IncFileName.find(')', StartPos+2) > >-try: >-IncludedFile = NormPath(ReplaceMacro(IncFileName, >__IncludeMacros, RaiseError=True)) >-except: >-raise Warning("only these system environment variables are >permitted to start the path of the included file: " >- "$(WORKSPACE), $(ECP_SOURCE), $(EFI_SOURCE), >$(EDK_SOURCE)", >- self.FileName, self.CurrentLineNumber) >+IncludedFile = NormPath(IncFileName) > # > # First search the include file under the same directory as > FDF file > # > IncludedFile1 = PathClass(IncludedFile, >os.path.dirname(self.FileName)) > ErrorCode = IncludedFile1.Validate()[0] >-- >2.6.1.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v3 0/3] Enable the HTTP connections switch
Reviewed-by: Fu Siyuan-Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Jiaxin Wu Sent: 2017年1月19日 13:18 To: edk2-devel@lists.01.org Cc: Ye, Ting ; Justen, Jordan L ; Wu, Jiaxin ; Gary Lin ; Kinney, Michael D ; Fu, Siyuan ; Laszlo Ersek Subject: [edk2] [PATCH v3 0/3] Enable the HTTP connections switch v3: * Append patch for OVMF. Cc: Laszlo Ersek Cc: Justen Jordan L Cc: Gary Lin Cc: Ye Ting Cc: Fu Siyuan Cc: Kinney Michael D Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin Jiaxin Wu (3): NetworkPkg: Add PCD to enable the HTTP connections switch Nt32Pkg.dsc: Add flag to control HTTP connections OvmfPkg: Allow HTTP connections if HTTP Boot enabled NetworkPkg/HttpBootDxe/HttpBootClient.c | 20 +++- NetworkPkg/HttpBootDxe/HttpBootConfig.c | 81 NetworkPkg/HttpBootDxe/HttpBootDxe.inf | 5 +- NetworkPkg/HttpBootDxe/HttpBootSupport.c | 53 - NetworkPkg/HttpBootDxe/HttpBootSupport.h | 17 ++- NetworkPkg/HttpDxe/HttpDxe.inf | 5 +- NetworkPkg/HttpDxe/HttpImpl.c| 12 - NetworkPkg/NetworkPkg.dec| 8 +++- Nt32Pkg/Nt32Pkg.dsc | 18 ++- OvmfPkg/OvmfPkgIa32.dsc | 6 ++- OvmfPkg/OvmfPkgIa32X64.dsc | 6 ++- OvmfPkg/OvmfPkgX64.dsc | 6 ++- 12 files changed, 195 insertions(+), 42 deletions(-) -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH v3 0/3] Enable the HTTP connections switch
Series Reviewed-by: Ye Ting-Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Jiaxin Wu Sent: Thursday, January 19, 2017 1:18 PM To: edk2-devel@lists.01.org Cc: Ye, Ting ; Justen, Jordan L ; Wu, Jiaxin ; Gary Lin ; Kinney, Michael D ; Fu, Siyuan ; Laszlo Ersek Subject: [edk2] [PATCH v3 0/3] Enable the HTTP connections switch v3: * Append patch for OVMF. Cc: Laszlo Ersek Cc: Justen Jordan L Cc: Gary Lin Cc: Ye Ting Cc: Fu Siyuan Cc: Kinney Michael D Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin Jiaxin Wu (3): NetworkPkg: Add PCD to enable the HTTP connections switch Nt32Pkg.dsc: Add flag to control HTTP connections OvmfPkg: Allow HTTP connections if HTTP Boot enabled NetworkPkg/HttpBootDxe/HttpBootClient.c | 20 +++- NetworkPkg/HttpBootDxe/HttpBootConfig.c | 81 NetworkPkg/HttpBootDxe/HttpBootDxe.inf | 5 +- NetworkPkg/HttpBootDxe/HttpBootSupport.c | 53 - NetworkPkg/HttpBootDxe/HttpBootSupport.h | 17 ++- NetworkPkg/HttpDxe/HttpDxe.inf | 5 +- NetworkPkg/HttpDxe/HttpImpl.c| 12 - NetworkPkg/NetworkPkg.dec| 8 +++- Nt32Pkg/Nt32Pkg.dsc | 18 ++- OvmfPkg/OvmfPkgIa32.dsc | 6 ++- OvmfPkg/OvmfPkgIa32X64.dsc | 6 ++- OvmfPkg/OvmfPkgX64.dsc | 6 ++- 12 files changed, 195 insertions(+), 42 deletions(-) -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] BaseTools: Convert incomplete expression with dangling while()
Reviewed-by: Liming Gao>-Original Message- >From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of >Yonghong Zhu >Sent: Sunday, January 22, 2017 11:39 AM >To: edk2-devel@lists.01.org >Cc: Nikolai SAOUKH >Subject: [edk2] [Patch] BaseTools: Convert incomplete expression with >dangling while() > >From: Nikolai SAOUKH > >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Nikolai SAOUKH >Reviewed-by: Yonghong Zhu >--- > BaseTools/Source/C/VfrCompile/VfrSyntax.g | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/BaseTools/Source/C/VfrCompile/VfrSyntax.g >b/BaseTools/Source/C/VfrCompile/VfrSyntax.g >index 4b42d3c..406dbc5 100644 >--- a/BaseTools/Source/C/VfrCompile/VfrSyntax.g >+++ b/BaseTools/Source/C/VfrCompile/VfrSyntax.g >@@ -1,9 +1,9 @@ > /*++ @file > Vfr Syntax > >-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved. >+Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved. > This program and the accompanying materials > are licensed and made available under the terms and conditions of the BSD >License > which accompanies this distribution. The full text of the license may be > found >at > http://opensource.org/licenses/bsd-license.php > >@@ -31,12 +31,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY >KIND, EITHER EXPRESS OR IMPLIED. > #include "DLexerBase.h" > #include "VfrLexer.h" > #include "AToken.h" > > #define GET_LINENO(Obj) ((Obj)->getLine()) >-#define SET_LINE_INFO(Obj, L) {(Obj).SetLineNo((L)->getLine());} while (0) >-#define CRT_END_OP(Obj) {CIfrEnd EObj; if (Obj != NULL) EObj.SetLineNo >((Obj)->getLine());} while (0) >+#define SET_LINE_INFO(Obj, L) do {(Obj).SetLineNo((L)->getLine());} while >(0) >+#define CRT_END_OP(Obj) do {CIfrEnd EObj; if (Obj != NULL) >EObj.SetLineNo ((Obj)->getLine());} while (0) > > typedef ANTLRCommonToken ANTLRToken; > > class CVfrDLGLexer : public VfrLexer > { >-- >2.6.1.windows.1 > >___ >edk2-devel mailing list >edk2-devel@lists.01.org >https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.1
Reviewed-by: Ruiyu NiThanks/Ray > -Original Message- > From: Zeng, Star > Sent: Sunday, January 22, 2017 5:25 PM > To: Ni, Ruiyu ; edk2-devel@lists.01.org > Cc: Carsey, Jaben ; Zeng, Star > > Subject: RE: [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS > spec 3.1.1 > > Ray & Jaben, > > I am not so sure about the rule. > The mixed using of strings in c code and strings in uni file has been there > since it was created. > > > Thanks, > Star > -Original Message- > From: Ni, Ruiyu > Sent: Sunday, January 22, 2017 4:56 PM > To: Zeng, Star ; edk2-devel@lists.01.org > Cc: Carsey, Jaben > Subject: RE: [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS > spec 3.1.1 > > Star, > Why some strings are hardcoded in C file while some are defined in UNI file? > What's the rule? > > Thanks/Ray > > > -Original Message- > > From: Zeng, Star > > Sent: Sunday, January 22, 2017 4:18 PM > > To: edk2-devel@lists.01.org > > Cc: Zeng, Star ; Ni, Ruiyu ; > > Carsey, Jaben > > Subject: [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS spec > > 3.1.1 > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=349 > > > > Cc: Ruiyu Ni > > Cc: Jaben Carsey > > Contributed-under: TianoCore Contribution Agreement 1.0 > > Signed-off-by: Star Zeng > > --- > > .../SmbiosView/PrintInfo.c | 6 +++- > > .../SmbiosView/QueryTable.c| 37 > > ++ > > .../SmbiosView/QueryTable.h| 14 +++- > > .../SmbiosView/SmbiosViewStrings.uni | 3 +- > > 4 files changed, 57 insertions(+), 3 deletions(-) > > > > diff --git > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > > index ecb8e2492453..1d6002b92593 100644 > > --- > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > > +++ > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > > @@ -1106,7 +1106,7 @@ SmbiosPrintStructure ( > >// Management Controller Host Interface (Type 42) > >// > >case 42: > > -PRINT_STRUCT_VALUE_H (Struct, Type42, InterfaceType); > > +DisplayMCHostInterfaceType (Struct->Type42->InterfaceType, > > + Option); > > break; > > > >// > > @@ -1818,6 +1818,10 @@ DisplayProcessorFamily ( > > Print (L"AMD Opteron(TM) X3000 Series APU\n"); > > break; > > > > + case 0x6B: > > +Print (L"AMD Zen Processor Family\n"); > > +break; > > + > >case 0x70: > > ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN > > (STR_SMBIOSVIEW_PRINTINFO_HOBBIT_FAMILY), gShellDebug1HiiHandle); > > break; > > diff --git > > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > > c > > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > > c > > index 4a06c12e3b2b..282ba584c8c9 100644 > > --- > > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > > c > > +++ > > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > > +++ c > > @@ -575,6 +575,10 @@ TABLE_ITEM ProcessorUpgradeTable[] = { > >{ > > 0x37, > > L"Socket SP3" > > + }, > > + { > > +0x38, > > +L"Socket SP3r2" > >} > > }; > > > > @@ -3156,6 +3160,22 @@ TABLE_ITEM IPMIDIBMCInterfaceTypeTable[] = > { > >}, > > }; > > > > +TABLE_ITEM MCHostInterfaceTypeTable[] = { > > + { > > +0x3F00, > > +L" MCTP Host Interface " > > + }, > > + { > > +0x40, > > +L" Network Host Interface " > > + }, > > + { > > +0xF0, > > +L" OEM defined " > > + }, > > +}; > > + > > + > > TABLE_ITEM StructureTypeInfoTable[] = { > >{ > > 0, > > @@ -4525,6 +4545,23 @@ DisplayIPMIDIBMCInterfaceType ( } > > > > /** > > + Display Management Controller Host Interface (Type 42) information. > > + > > + @param[in] Key The key of the structure. > > + @param[in] Option The optional information. > > +**/ > > +VOID > > +DisplayMCHostInterfaceType ( > > + IN UINT8 Key, > > + IN UINT8 Option > > + ) > > +{ > > + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN > > +(STR_SMBIOSVIEW_QUERYTABLE_MC_HOST_INTERFACE_TYPE), > > +gShellDebug1HiiHandle); > > + PRINT_INFO_OPTION (Key, Option); > > + PRINT_TABLE_ITEM (MCHostInterfaceTypeTable, Key); } > > + > > +/** > >Display the structure type information. > > > >@param[in] Key The key of the structure. > > diff --git > > > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > > h > > > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > > h > > index 9cae7094fb19..bd9e6898d40a 100644 > > --- > > >
Re: [edk2] [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.1
Ray & Jaben, I am not so sure about the rule. The mixed using of strings in c code and strings in uni file has been there since it was created. Thanks, Star -Original Message- From: Ni, Ruiyu Sent: Sunday, January 22, 2017 4:56 PM To: Zeng, Star; edk2-devel@lists.01.org Cc: Carsey, Jaben Subject: RE: [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.1 Star, Why some strings are hardcoded in C file while some are defined in UNI file? What's the rule? Thanks/Ray > -Original Message- > From: Zeng, Star > Sent: Sunday, January 22, 2017 4:18 PM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Ni, Ruiyu ; > Carsey, Jaben > Subject: [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS spec > 3.1.1 > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=349 > > Cc: Ruiyu Ni > Cc: Jaben Carsey > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Star Zeng > --- > .../SmbiosView/PrintInfo.c | 6 +++- > .../SmbiosView/QueryTable.c| 37 > ++ > .../SmbiosView/QueryTable.h| 14 +++- > .../SmbiosView/SmbiosViewStrings.uni | 3 +- > 4 files changed, 57 insertions(+), 3 deletions(-) > > diff --git > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > index ecb8e2492453..1d6002b92593 100644 > --- > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > +++ > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > @@ -1106,7 +1106,7 @@ SmbiosPrintStructure ( >// Management Controller Host Interface (Type 42) >// >case 42: > -PRINT_STRUCT_VALUE_H (Struct, Type42, InterfaceType); > +DisplayMCHostInterfaceType (Struct->Type42->InterfaceType, > + Option); > break; > >// > @@ -1818,6 +1818,10 @@ DisplayProcessorFamily ( > Print (L"AMD Opteron(TM) X3000 Series APU\n"); > break; > > + case 0x6B: > +Print (L"AMD Zen Processor Family\n"); > +break; > + >case 0x70: > ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN > (STR_SMBIOSVIEW_PRINTINFO_HOBBIT_FAMILY), gShellDebug1HiiHandle); > break; > diff --git > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > c > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > c > index 4a06c12e3b2b..282ba584c8c9 100644 > --- > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > c > +++ > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > +++ c > @@ -575,6 +575,10 @@ TABLE_ITEM ProcessorUpgradeTable[] = { >{ > 0x37, > L"Socket SP3" > + }, > + { > +0x38, > +L"Socket SP3r2" >} > }; > > @@ -3156,6 +3160,22 @@ TABLE_ITEM IPMIDIBMCInterfaceTypeTable[] = { >}, > }; > > +TABLE_ITEM MCHostInterfaceTypeTable[] = { > + { > +0x3F00, > +L" MCTP Host Interface " > + }, > + { > +0x40, > +L" Network Host Interface " > + }, > + { > +0xF0, > +L" OEM defined " > + }, > +}; > + > + > TABLE_ITEM StructureTypeInfoTable[] = { >{ > 0, > @@ -4525,6 +4545,23 @@ DisplayIPMIDIBMCInterfaceType ( } > > /** > + Display Management Controller Host Interface (Type 42) information. > + > + @param[in] Key The key of the structure. > + @param[in] Option The optional information. > +**/ > +VOID > +DisplayMCHostInterfaceType ( > + IN UINT8 Key, > + IN UINT8 Option > + ) > +{ > + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN > +(STR_SMBIOSVIEW_QUERYTABLE_MC_HOST_INTERFACE_TYPE), > +gShellDebug1HiiHandle); > + PRINT_INFO_OPTION (Key, Option); > + PRINT_TABLE_ITEM (MCHostInterfaceTypeTable, Key); } > + > +/** >Display the structure type information. > >@param[in] Key The key of the structure. > diff --git > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > h > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > h > index 9cae7094fb19..bd9e6898d40a 100644 > --- > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > h > +++ > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > +++ h > @@ -2,7 +2,7 @@ >Build a table, each item is (key, info) pair. >and give a interface of query a string out of a table. > > - Copyright (c) 2005 - 2012, Intel Corporation. All rights > reserved. > + Copyright (c) 2005 - 2017, Intel Corporation. All rights > + reserved. >This program and the accompanying materials >are licensed and made available under the terms and conditions of > the BSD License >which accompanies this distribution. The full text of the license > may be found at @@ -779,4 +779,16 @@ DisplayIPMIDIBMCInterfaceType ( >IN UINT8
Re: [edk2] [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.1
Star, Why some strings are hardcoded in C file while some are defined in UNI file? What's the rule? Thanks/Ray > -Original Message- > From: Zeng, Star > Sent: Sunday, January 22, 2017 4:18 PM > To: edk2-devel@lists.01.org > Cc: Zeng, Star; Ni, Ruiyu ; > Carsey, Jaben > Subject: [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS spec > 3.1.1 > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=349 > > Cc: Ruiyu Ni > Cc: Jaben Carsey > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Star Zeng > --- > .../SmbiosView/PrintInfo.c | 6 +++- > .../SmbiosView/QueryTable.c| 37 > ++ > .../SmbiosView/QueryTable.h| 14 +++- > .../SmbiosView/SmbiosViewStrings.uni | 3 +- > 4 files changed, 57 insertions(+), 3 deletions(-) > > diff --git > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > index ecb8e2492453..1d6002b92593 100644 > --- > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > +++ > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c > @@ -1106,7 +1106,7 @@ SmbiosPrintStructure ( >// Management Controller Host Interface (Type 42) >// >case 42: > -PRINT_STRUCT_VALUE_H (Struct, Type42, InterfaceType); > +DisplayMCHostInterfaceType (Struct->Type42->InterfaceType, Option); > break; > >// > @@ -1818,6 +1818,10 @@ DisplayProcessorFamily ( > Print (L"AMD Opteron(TM) X3000 Series APU\n"); > break; > > + case 0x6B: > +Print (L"AMD Zen Processor Family\n"); > +break; > + >case 0x70: > ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN > (STR_SMBIOSVIEW_PRINTINFO_HOBBIT_FAMILY), gShellDebug1HiiHandle); > break; > diff --git > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > c > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > c > index 4a06c12e3b2b..282ba584c8c9 100644 > --- > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > c > +++ > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > +++ c > @@ -575,6 +575,10 @@ TABLE_ITEM ProcessorUpgradeTable[] = { >{ > 0x37, > L"Socket SP3" > + }, > + { > +0x38, > +L"Socket SP3r2" >} > }; > > @@ -3156,6 +3160,22 @@ TABLE_ITEM IPMIDIBMCInterfaceTypeTable[] = { >}, > }; > > +TABLE_ITEM MCHostInterfaceTypeTable[] = { > + { > +0x3F00, > +L" MCTP Host Interface " > + }, > + { > +0x40, > +L" Network Host Interface " > + }, > + { > +0xF0, > +L" OEM defined " > + }, > +}; > + > + > TABLE_ITEM StructureTypeInfoTable[] = { >{ > 0, > @@ -4525,6 +4545,23 @@ DisplayIPMIDIBMCInterfaceType ( } > > /** > + Display Management Controller Host Interface (Type 42) information. > + > + @param[in] Key The key of the structure. > + @param[in] Option The optional information. > +**/ > +VOID > +DisplayMCHostInterfaceType ( > + IN UINT8 Key, > + IN UINT8 Option > + ) > +{ > + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN > +(STR_SMBIOSVIEW_QUERYTABLE_MC_HOST_INTERFACE_TYPE), > +gShellDebug1HiiHandle); > + PRINT_INFO_OPTION (Key, Option); > + PRINT_TABLE_ITEM (MCHostInterfaceTypeTable, Key); } > + > +/** >Display the structure type information. > >@param[in] Key The key of the structure. > diff --git > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > h > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > h > index 9cae7094fb19..bd9e6898d40a 100644 > --- > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > h > +++ > b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable. > +++ h > @@ -2,7 +2,7 @@ >Build a table, each item is (key, info) pair. >and give a interface of query a string out of a table. > > - Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved. > + Copyright (c) 2005 - 2017, Intel Corporation. All rights > + reserved. >This program and the accompanying materials >are licensed and made available under the terms and conditions of the BSD > License >which accompanies this distribution. The full text of the license may be > found at @@ -779,4 +779,16 @@ DisplayIPMIDIBMCInterfaceType ( >IN UINT8 Option >); > > +/** > + Display Management Controller Host Interface (Type 42) information. > + > + @param[in] Key The key of the structure. > + @param[in] Option The optional information. > +**/ > +VOID > +DisplayMCHostInterfaceType ( > + IN UINT8 Key, > + IN UINT8 Option > + ); > + > #endif > diff --git > a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosView > Strings.uni >
[edk2] [PATCH 1/3] MdePkg: Add definitions for SMBIOS spec 3.1.1
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=349 This patch is to add definitions for below items. Processor Information (Type 4): - add socket SP3r2 - add AMD Zen Processor Family Management Controller Host Interface (Type 42): - include Host Interface Type and Protocol Identifier enumerations Cc: Liming GaoCc: Michael Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng --- MdePkg/Include/IndustryStandard/SmBios.h | 25 +++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/IndustryStandard/SmBios.h b/MdePkg/Include/IndustryStandard/SmBios.h index f5c29bcbd0c8..6a8fa1b39d17 100644 --- a/MdePkg/Include/IndustryStandard/SmBios.h +++ b/MdePkg/Include/IndustryStandard/SmBios.h @@ -611,6 +611,7 @@ typedef enum { ProcessorFamilyAmdOpteronX2000Series = 0x68, ProcessorFamilyAmdOpteronASeries = 0x69, ProcessorFamilyAmdOpteronX3000Series = 0x6A, + ProcessorFamilyAmdZen = 0x6B, ProcessorFamilyHobbit = 0x70, ProcessorFamilyCrusoeTM5000 = 0x78, ProcessorFamilyCrusoeTM3000 = 0x79, @@ -804,7 +805,8 @@ typedef enum { ProcessorUpgradeSocketBGA1440 = 0x34, ProcessorUpgradeSocketBGA1515 = 0x35, ProcessorUpgradeSocketLGA3647_1 = 0x36, - ProcessorUpgradeSocketSP3 = 0x37 + ProcessorUpgradeSocketSP3 = 0x37, + ProcessorUpgradeSocketSP3r2 = 0x38 } PROCESSOR_UPGRADE; /// @@ -2386,6 +2388,25 @@ typedef struct { } SMBIOS_TABLE_TYPE41; /// +/// Management Controller Host Interface - Interface Types. +/// 00h �C 3Fh: MCTP Host Interfaces +/// +typedef enum{ + MCHostInterfaceTypeNetworkHostInterface = 0x40, + MCHostInterfaceTypeOemDefined = 0xF0 +} MC_HOST_INTERFACE_TYPE; + +/// +/// Management Controller Host Interface - Protocol Types. +/// +typedef enum{ + MCHostInterfaceProtocolTypeIPMI = 0x02, + MCHostInterfaceProtocolTypeMCTP = 0x03, + MCHostInterfaceProtocolTypeRedfishOverIP = 0x04, + MCHostInterfaceProtocolTypeOemDefined = 0xF0 +} MC_HOST_INTERFACE_PROTOCOL_TYPE; + +/// /// Management Controller Host Interface (Type 42). /// /// The information in this structure defines the attributes of a Management @@ -2404,7 +2425,7 @@ typedef struct { /// typedef struct { SMBIOS_STRUCTURE Hdr; - UINT8 InterfaceType; + UINT8 InterfaceType; ///< The enumeration value from MC_HOST_INTERFACE_TYPE UINT8 MCHostInterfaceData[1]; ///< This field has a minimum of four bytes } SMBIOS_TABLE_TYPE42; -- 2.7.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH 0/3] Add SMBIOS spec 3.1.1 support
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=349 These patches are to add support for below items. Processor Information (Type 4): - add socket SP3r2 - add AMD Zen Processor Family Management Controller Host Interface (Type 42): - include Host Interface Type and Protocol Identifier enumerations Cc: Liming GaoCc: Michael Kinney Cc: Feng Tian Cc: Ruiyu Ni Cc: Jaben Carsey Star Zeng (3): MdePkg: Add definitions for SMBIOS spec 3.1.1 MdeModulePkg: Update PcdSmbiosDocRev to 0x1 for SMBIOS spec 3.1.1 ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.1 MdeModulePkg/MdeModulePkg.dec | 2 +- MdePkg/Include/IndustryStandard/SmBios.h | 25 +-- .../SmbiosView/PrintInfo.c | 6 +++- .../SmbiosView/QueryTable.c| 37 ++ .../SmbiosView/QueryTable.h| 14 +++- .../SmbiosView/SmbiosViewStrings.uni | 3 +- 6 files changed, 81 insertions(+), 6 deletions(-) -- 2.7.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH 2/3] MdeModulePkg: Update PcdSmbiosDocRev to 0x1 for SMBIOS spec 3.1.1
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=349 Cc: Feng TianCc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng --- MdeModulePkg/MdeModulePkg.dec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 7e67ddccbb85..273cd7e1716f 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -1519,7 +1519,7 @@ [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] ## SMBIOS Docrev field in SMBIOS 3.0 (64-bit) Entry Point Structure. # @Prompt SMBIOS Docrev field in SMBIOS 3.0 (64-bit) Entry Point Structure. - gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0|UINT8|0x0001006A + gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x1|UINT8|0x0001006A ## SMBIOS produce method. # BIT0 set indicates 32-bit entry point and table are produced. -- 2.7.0.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH 3/3] ShellPkg SmbiosView: Add decoding of SMBIOS spec 3.1.1
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=349 Cc: Ruiyu NiCc: Jaben Carsey Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng --- .../SmbiosView/PrintInfo.c | 6 +++- .../SmbiosView/QueryTable.c| 37 ++ .../SmbiosView/QueryTable.h| 14 +++- .../SmbiosView/SmbiosViewStrings.uni | 3 +- 4 files changed, 57 insertions(+), 3 deletions(-) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c index ecb8e2492453..1d6002b92593 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c @@ -1106,7 +1106,7 @@ SmbiosPrintStructure ( // Management Controller Host Interface (Type 42) // case 42: -PRINT_STRUCT_VALUE_H (Struct, Type42, InterfaceType); +DisplayMCHostInterfaceType (Struct->Type42->InterfaceType, Option); break; // @@ -1818,6 +1818,10 @@ DisplayProcessorFamily ( Print (L"AMD Opteron(TM) X3000 Series APU\n"); break; + case 0x6B: +Print (L"AMD Zen Processor Family\n"); +break; + case 0x70: ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_HOBBIT_FAMILY), gShellDebug1HiiHandle); break; diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c index 4a06c12e3b2b..282ba584c8c9 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c @@ -575,6 +575,10 @@ TABLE_ITEM ProcessorUpgradeTable[] = { { 0x37, L"Socket SP3" + }, + { +0x38, +L"Socket SP3r2" } }; @@ -3156,6 +3160,22 @@ TABLE_ITEM IPMIDIBMCInterfaceTypeTable[] = { }, }; +TABLE_ITEM MCHostInterfaceTypeTable[] = { + { +0x3F00, +L" MCTP Host Interface " + }, + { +0x40, +L" Network Host Interface " + }, + { +0xF0, +L" OEM defined " + }, +}; + + TABLE_ITEM StructureTypeInfoTable[] = { { 0, @@ -4525,6 +4545,23 @@ DisplayIPMIDIBMCInterfaceType ( } /** + Display Management Controller Host Interface (Type 42) information. + + @param[in] Key The key of the structure. + @param[in] Option The optional information. +**/ +VOID +DisplayMCHostInterfaceType ( + IN UINT8 Key, + IN UINT8 Option + ) +{ + ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_QUERYTABLE_MC_HOST_INTERFACE_TYPE), gShellDebug1HiiHandle); + PRINT_INFO_OPTION (Key, Option); + PRINT_TABLE_ITEM (MCHostInterfaceTypeTable, Key); +} + +/** Display the structure type information. @param[in] Key The key of the structure. diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.h b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.h index 9cae7094fb19..bd9e6898d40a 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.h +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.h @@ -2,7 +2,7 @@ Build a table, each item is (key, info) pair. and give a interface of query a string out of a table. - Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved. + Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -779,4 +779,16 @@ DisplayIPMIDIBMCInterfaceType ( IN UINT8 Option ); +/** + Display Management Controller Host Interface (Type 42) information. + + @param[in] Key The key of the structure. + @param[in] Option The optional information. +**/ +VOID +DisplayMCHostInterfaceType ( + IN UINT8 Key, + IN UINT8 Option + ); + #endif diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni index b9032df076d2..7d694536dbcd 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni @@ -1,6 +1,6 @@ // /** // -// Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved. +// Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved. // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. // (C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP // This program and the accompanying materials @@ -444,6 +444,7 @@ #string STR_SMBIOSVIEW_QUERYTABLE_MANAGEMENT_DEV_ADDR_TYPE #language en-US "Management Device - Address