[edk2-devel] [PATCH] MdeModulePkg: Enable/Disable S3BootScript dynamically.

2019-09-23 Thread Chiu, Chasel
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2212

Current S3BootScriptLib can only support build time opt-out
but in binary model the same binary should support both
enabling and disabling scenarios.

To support this below PCD is expected to be used as
DynamicPCD (or DynamicEx) to skip S3BootScript functions
when PCD set to FALSE:
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable

Test: Verified on internal platform and S3BootScript
  functions can be skipped by PCD during boot time.

Cc: Hao A Wu 
Cc: Eric Dong 
Cc: Nate DeSimone 
Cc: Liming Gao 
Signed-off-by: Chasel Chiu 
---
 MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c   | 13 
-
 MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf |  4 +++-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c 
b/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c
index c116727531..c5353119f7 100644
--- a/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c
+++ b/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c
@@ -1,7 +1,7 @@
 /** @file
   Save the S3 data to S3 boot script.
 
-  Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -124,6 +124,7 @@ VOID 
*mRegistrationSmmReadyToLock = NULL;
 BOOLEAN  mS3BootScriptTableAllocated = FALSE;
 BOOLEAN  mS3BootScriptTableSmmAllocated = FALSE;
 EFI_SMM_SYSTEM_TABLE2*mBootScriptSmst = NULL;
+BOOLEAN  mAcpiS3Enable = TRUE;
 
 /**
   This is an internal function to add a terminate node the entry, recalculate 
the table
@@ -436,6 +437,11 @@ S3BootScriptLibInitialize (
   BOOLEANInSmm;
   EFI_PHYSICAL_ADDRESS   Buffer;
 
+  if (!PcdGetBool (PcdAcpiS3Enable)) {
+mAcpiS3Enable = FALSE;
+return RETURN_SUCCESS;
+  }
+
   S3TablePtr = 
(SCRIPT_TABLE_PRIVATE_DATA*)(UINTN)PcdGet64(PcdS3BootScriptTablePrivateDataPtr);
   //
   // The Boot script private data is not be initialized. create it
@@ -810,6 +816,11 @@ S3BootScriptGetEntryAddAddress (
 {
   UINT8* NewEntryPtr;
 
+  if (!mAcpiS3Enable) {
+DEBUG ((DEBUG_INFO, "Skip S3BootScript because ACPI S3 disabled.\n"));
+return NULL;
+  }
+
   if (mS3BootScriptTablePtr->SmmLocked) {
 //
 // We need check InSmm, because after SmmReadyToLock, only SMM driver is 
allowed to write boot script.
diff --git a/MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf 
b/MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
index 517ea69568..fa139b03ff 100644
--- a/MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
+++ b/MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
@@ -1,7 +1,7 @@
 ## @file
 # DXE S3 boot script Library.
 #
-# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -65,4 +65,6 @@
   ## SOMETIMES_PRODUCES
   gEfiMdeModulePkgTokenSpaceGuid.PcdS3BootScriptTablePrivateSmmDataPtr
   gEfiMdeModulePkgTokenSpaceGuid.PcdS3BootScriptRuntimeTableReservePageNumber  
 ## CONSUMES
+  gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable   
 ## CONSUMES
+
 
-- 
2.13.3.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47908): https://edk2.groups.io/g/devel/message/47908
Mute This Topic: https://groups.io/mt/34273353/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-test][Patch] uefi-sct/SctPkg: Add MediaPresentSupported check

2019-09-23 Thread Eric Jin
Xianhui,

The content is clear to me.
Two comments:
1. The copyright year is not updated. I will help to update when I commit, but 
hold one day to wait for possible comments.
Reviewed-by: Eric Jin 

2. Could you please provide the patch on the IHV part? Thanks.

Best Regards
Eric
-Original Message-
From: devel@edk2.groups.io  On Behalf Of xianhui liu
Sent: Monday, September 23, 2019 9:42 AM
To: devel@edk2.groups.io
Cc: Heinrich Schuchardt ; Supreeth Venkatesh 
; Jin, Eric 
Subject: [edk2-devel] [edk2-test][Patch] uefi-sct/SctPkg: Add 
MediaPresentSupported check

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2061
check MediaPresent while MediaPresentSupported is TRUE

Cc: Heinrich Schuchardt 
Cc: Supreeth Venkatesh 
Cc: Eric Jin 

Signed-off-by: xianhui liu 
---
 .../BlackBoxTest/SimpleNetworkBBTestFunction.c | 64 +++---
 1 file changed, 33 insertions(+), 31 deletions(-)

diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/SimpleNetworkBBTestFunction.c
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/SimpleNetworkBBTestFunction.c
index 133ef8a9..563e5361 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/SimpleNetworkBBTestFunction.c
+++ 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Protocol/SimpleNetwork/BlackBoxTest/SimpleNetworkBBTestFunction.c
@@ -1888,38 +1888,40 @@ BBTestGetStatusFunctionTest (
   Status = SnpInterface->GetStatus (SnpInterface, , );
   Status1 = SnpInterface->GetStatus (SnpInterface, , );
 
-  if (SnpInterface->Mode->MediaPresent == FALSE) {
-if ((Status1 == EFI_SUCCESS) && (Status == EFI_SUCCESS) && 
(InterruptStatus == 0)) {
-  AssertionType = EFI_TEST_ASSERTION_PASSED;
-} else {
-  AssertionType = EFI_TEST_ASSERTION_FAILED;
-}
-  } else {
-if ((Status1 == EFI_SUCCESS) && (Status == EFI_SUCCESS)) {
-  AssertionType = EFI_TEST_ASSERTION_PASSED;
-  if (InterruptStatus &
- ~( EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT |
-EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT |
-EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT |
-EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT)) {
-AssertionType = EFI_TEST_ASSERTION_FAILED;
-  }
-} else {
-  AssertionType = EFI_TEST_ASSERTION_FAILED;
-}
+  if (SnpInterface->Mode-> MediaPresentSupported == TRUE) {
+ if (SnpInterface->Mode->MediaPresent == FALSE) {
+   if ((Status1 == EFI_SUCCESS) && (Status == EFI_SUCCESS) && 
(InterruptStatus == 0)) {
+ AssertionType = EFI_TEST_ASSERTION_PASSED;
+   } else {
+ AssertionType = EFI_TEST_ASSERTION_FAILED;
+   }
+ } else {
+   if ((Status1 == EFI_SUCCESS) && (Status == EFI_SUCCESS)) {
+ AssertionType = EFI_TEST_ASSERTION_PASSED;
+ if (InterruptStatus &
+~( EFI_SIMPLE_NETWORK_RECEIVE_INTERRUPT |
+   EFI_SIMPLE_NETWORK_TRANSMIT_INTERRUPT |
+   EFI_SIMPLE_NETWORK_COMMAND_INTERRUPT |
+   EFI_SIMPLE_NETWORK_SOFTWARE_INTERRUPT)) {
+   AssertionType = EFI_TEST_ASSERTION_FAILED;
+ }
+   } else {
+ AssertionType = EFI_TEST_ASSERTION_FAILED;
+   }
+ }
+ StandardLib->RecordAssertion (
+StandardLib,
+AssertionType,
+gSimpleNetworkBBTestFunctionAssertionGuid022,
+L"EFI_SIMPLE_NETWORK_PROTOCOL.GetStatus - Invoke 
GetStatus() and verify interface correctness within test case",
+L"%a:%d:Status - %r, Status1 - %r, InterruptStatus - %d",
+__FILE__,
+(UINTN)__LINE__,
+Status,
+Status1,
+InterruptStatus
+);
   }
-  StandardLib->RecordAssertion (
- StandardLib,
- AssertionType,
- gSimpleNetworkBBTestFunctionAssertionGuid022,
- L"EFI_SIMPLE_NETWORK_PROTOCOL.GetStatus - Invoke GetStatus() 
and verify interface correctness within test case",
- L"%a:%d:Status - %r, Status1 - %r, InterruptStatus - %d",
- __FILE__,
- (UINTN)__LINE__,
- Status,
- Status1,
- InterruptStatus
- );
 
   //
   // Restore SNP State
-- 
2.14.1.windows.1





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47907): https://edk2.groups.io/g/devel/message/47907
Mute This Topic: https://groups.io/mt/34258689/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-test] [PATCH 1/1] uefi-sct/SctPkg: use EFI_UNICODE_COLLATION_PROTOCOL2_GUID

2019-09-23 Thread Eric Jin
Reviewed-by: Eric Jin 

-Original Message-
From: Heinrich Schuchardt  
Sent: Friday, September 20, 2019 7:07 PM
To: EDK II Development 
Cc: Jin, Eric ; Supreeth Venkatesh 
; Stephano Cetola 
; Heinrich Schuchardt 
Subject: [edk2-test] [PATCH 1/1] uefi-sct/SctPkg: use 
EFI_UNICODE_COLLATION_PROTOCOL2_GUID

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1802

The protocol identified by EFI_UNICODE_COLLATION_PROTOCOL_GUID is deprecated. 
Use the protocol identified by EFI_UNICODE_COLLATION_PROTOCOL2_GUID instead. 
Both protocols only differ in the values for the SupportedLanguages field.

Signed-off-by: Heinrich Schuchardt 
---
 uefi-sct/SctPkg/Library/SctGuidLib/SctGuidLib.c | 2 +-
 uefi-sct/SctPkg/Library/SctLib/Guid.c   | 2 +-
 uefi-sct/SctPkg/Library/SctLib/Init.c   | 6 +++---
 uefi-sct/SctPkg/Library/SctLib/SctLib.inf   | 2 +-
 .../BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c  | 4 ++--
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/uefi-sct/SctPkg/Library/SctGuidLib/SctGuidLib.c 
b/uefi-sct/SctPkg/Library/SctGuidLib/SctGuidLib.c
index cb5a7c97..3265ac82 100644
--- a/uefi-sct/SctPkg/Library/SctGuidLib/SctGuidLib.c
+++ b/uefi-sct/SctPkg/Library/SctGuidLib/SctGuidLib.c
@@ -38,7 +38,7 @@ EFI_GUID gEfiLoadFileProtocolGuid = { 0x56EC3091, 0x954C, 
0x11D2, { 0x8E, 0x3F,  EFI_GUID gEfiDeviceIoProtocolGuid = { 0xAF6AC311, 
0x84C3, 0x11D2, { 0x8E, 0x3C, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B }}; EFI_GUID 
gEfiFileInfoGuid = { 0x09576E92, 0x6D3F, 0x11D2, { 0x8E, 0x39, 0x00, 0xA0, 
0xC9, 0x69, 0x72, 0x3B }}; EFI_GUID gEfiFileSystemInfoGuid = { 0x09576E93, 
0x6D3F, 0x11D2, { 0x8E, 0x39, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B }};-EFI_GUID 
gEfiUnicodeCollationProtocolGuid = { 0x1D85CD7F, 0xF43D, 0x11D2, { 0x9A, 0x0C, 
0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D }};+EFI_GUID 
gEfiUnicodeCollation2ProtocolGuid = {0xa4c751fc, 0x23ae, 0x4c3e, { 0x92, 0xe9, 
0x49, 0x64, 0xcf, 0x63, 0xf3, 0x49 }}; EFI_GUID gEfiSerialIoProtocolGuid = { 
0xBB25CF6F, 0xF1D4, 0x11D2, { 0x9A, 0x0C, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0xFD 
}}; EFI_GUID gEfiSimpleNetworkProtocolGuid = { 0xA19832B9, 0xAC25, 0x11D3, { 
0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D }}; EFI_GUID 
gEfiNetworkInterfaceIdentifierProtocolGuid = { 0xE18541CD, 0xF755, 0x4F73, { 
0x92, 0x8D, 0x64, 0x3C, 0x8A, 0x79, 0xB2, 0x29 }};diff --git 
a/uefi-sct/SctPkg/Library/SctLib/Guid.c b/uefi-sct/SctPkg/Library/SctLib/Guid.c
index d0391060..f318725b 100644
--- a/uefi-sct/SctPkg/Library/SctLib/Guid.c
+++ b/uefi-sct/SctPkg/Library/SctLib/Guid.c
@@ -117,7 +117,7 @@ struct {
   { ,   L"GenFileInfo" },   { 
,L"FileSysInfo" }, -  { 
,  L"UnicodeCollation" },+  { 
, L"UnicodeCollation2" },   { 
,  L"serialio" },   { 
, L"net" },   { 
,L"nii" },diff --git 
a/uefi-sct/SctPkg/Library/SctLib/Init.c b/uefi-sct/SctPkg/Library/SctLib/Init.c
index 7e7618eb..704636e3 100644
--- a/uefi-sct/SctPkg/Library/SctLib/Init.c
+++ b/uefi-sct/SctPkg/Library/SctLib/Init.c
@@ -81,7 +81,7 @@ InitializeUnicodeSupport (
   // If we don't know it, lookup the current language code   // -  
SctLocateHandle (ByProtocol, , NULL, 
, );+  SctLocateHandle (ByProtocol, 
, NULL, , );   if 
(!LangCode || !NoHandles) { goto Done;   }@@ -91,7 +91,7 @@ 
InitializeUnicodeSupport (
   //for (Index=0; Index < NoHandles; Index++) {-Status = 
tBS->HandleProtocol (Handles[Index], , 
(VOID**));+Status = tBS->HandleProtocol (Handles[Index], 
, (VOID**)); if (EFI_ERROR(Status)) {  
 continue; }@@ -180,7 +180,7 @@ SctInitializeLib (
 // // LangCode = LibGetVariable (VarLanguage, ); 
// InitializeUnicodeSupport (LangCode);-InitializeUnicodeSupport ("eng");+  
  InitializeUnicodeSupport ("en"); if (LangCode) {   SctFreePool 
(LangCode); }diff --git a/uefi-sct/SctPkg/Library/SctLib/SctLib.inf 
b/uefi-sct/SctPkg/Library/SctLib/SctLib.inf
index ff6ce579..cd354ffe 100644
--- a/uefi-sct/SctPkg/Library/SctLib/SctLib.inf
+++ b/uefi-sct/SctPkg/Library/SctLib/SctLib.inf
@@ -108,7 +108,7 @@
   gEfiSimpleNetworkProtocolGuid   gEfiSimpleTextInProtocolGuid   
gEfiSimpleTextOutProtocolGuid-  gEfiUnicodeCollationProtocolGuid+  
gEfiUnicodeCollation2ProtocolGuid   gEfiDriverBindingProtocolGuid   
gEfiDriverConfigurationProtocolGuid   gEfiDriverDiagnosticsProtocolGuiddiff 
--git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
index b3f1b8c5..09d89772 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTest/EfiCompliantBBTestPlatform_uefi.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/EfiCompliant/BlackBoxTes
+++ t/EfiCompliantBBTestPlatform_uefi.c
@@ -1180,7 +1180,7 @@ CheckBootFromDiskProtocols (
   // Check the UNICODE_COLLATION protocol   //   Status = gtBS->LocateProtocol 
(-

Re: [edk2-devel] [edk2-platforms] Update Packages on Bugzilla

2019-09-23 Thread Kubacki, Michael A
Mike,

I believe you were out of office when this was sent.

Can these packages please be added?

Thanks,
Michael

From: Kubacki, Michael A
Sent: Friday, September 6, 2019 6:57 PM
To: devel@edk2.groups.io
Cc: Kinney, Michael D ; Wei, David Y 
; Agyeman, Prince 
Subject: [edk2-platforms] Update Packages on Bugzilla

Hi Mike,


The following packages need to be added to the "EDK2 Platforms" product on 
Bugzilla:

  * SimicsOpenBoardPkg (edk2-platforms/Platform/Intel/ SimicsOpenBoardPkg)

  * SimicsIch10Pkg (edk2-platforms/Platform/Intel/ SimicsIch10Pkg)

  * SimicsX58Sktpkg (edk2-platforms/Platform/Intel/ SimicsX58SktPkg)



These packages need the ability to have feature requests and bugs submitted 
against the package.



Thanks,

Michael

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47905): https://edk2.groups.io/g/devel/message/47905
Mute This Topic: https://groups.io/mt/33377446/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [Patch 05/10 V8] BaseTools: Enable Multiple Process AutoGen

2019-09-23 Thread Bob Feng
Hi Dann,

Thanks for raising this issue. 

Would you provide the static_library_files.list file, so that I can have a 
check?

As this patch was pushed month ago, I'd like to ask if this build failure 
always happens since this patch was pushed?

Thanks,
Bob 
-Original Message-
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of dann 
frazier
Sent: Tuesday, September 24, 2019 9:19 AM
To: devel@edk2.groups.io; Feng, Bob C 
Cc: Gao, Liming 
Subject: Re: [edk2-devel] [Patch 05/10 V8] BaseTools: Enable Multiple Process 
AutoGen

On Wed, Aug 07, 2019 at 12:25:32PM +0800, Bob Feng wrote:
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1875
> 
> Assign the Module AutoGen tasks into multiple sub process.
> 
> Cc: Liming Gao 
> Signed-off-by: Bob Feng 
> ---
>  .../Source/Python/AutoGen/AutoGenWorker.py| 191 ++
>  BaseTools/Source/Python/AutoGen/DataPipe.py   |  17 +-
>  BaseTools/Source/Python/AutoGen/GenC.py   |   4 +-
>  .../Source/Python/AutoGen/ModuleAutoGen.py|   2 +-
>  .../Source/Python/AutoGen/PlatformAutoGen.py  |  16 +-
>  .../Source/Python/AutoGen/WorkspaceAutoGen.py |   6 +-
>  BaseTools/Source/Python/build/build.py| 125 
>  7 files changed, 306 insertions(+), 55 deletions(-)  create mode 
> 100644 BaseTools/Source/Python/AutoGen/AutoGenWorker.py

I've bisected a regression building the ArmVirt architecture of 
ArmVirtPkg/ArmVirtQemu.dsc to this commit.

$ build -a ARM -p ArmVirtPkg/ArmVirtQemu.dsc -t GCC49 [...] 
"arm-linux-gnueabihf-gcc" -o 
/home/dannf/git/edk2.debug/Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdeModulePkg/Logo/LogoDxe/DEBUG/LogoDxe.dll
 -Wl,--emit-relocs -nostdlib -Wl,--gc-sections -u _ModuleEntryPoint 
-Wl,-e,_ModuleEntryPoint,-Map,/home/dannf/git/edk2.debug/Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdeModulePkg/Logo/LogoDxe/DEBUG/LogoDxe.map
 -z common-page-size=0x20 -Wl,--pic-veneer -Wl,--oformat=elf32-littlearm -z 
common-page-size=0x1000 
-Wl,--start-group,@/home/dannf/git/edk2.debug/Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdeModulePkg/Logo/LogoDxe/OUTPUT/static_library_files.lst,--end-group
 -mthumb -march=armv7-a -g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing 
-Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common -mlittle-endian 
-mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections 
-fdata-sections -fomit-frame-pointer -Wno-address -mthumb -mfloat-abi=soft 
-fno-pic -fno-pie -fstack-protector -mword-relocations -O0 
-DDISABLE_NEW_DEPRECATED_INTERFACES 
-Wl,--script=/home/dannf/git/edk2.debug/BaseTools/Scripts/GccBase.lds 
-Wl,--defsym=PECOFF_HEADER_SIZE=0x220
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld:
 error: source object 
/home/dannf/git/edk2.debug/Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint/OUTPUT/UefiDriverEntryPoint.lib(DriverEntryPoint.obj)
 has EABI version 5, but target 
/home/dannf/git/edk2.debug/Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdeModulePkg/Logo/LogoDxe/DEBUG/LogoDxe.dll
 has EABI version 0
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld:
 failed to merge target specific data of file 
/home/dannf/git/edk2.debug/Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint/OUTPUT/UefiDriverEntryPoint.lib(DriverEntryPoint.obj)
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld:
 error: source object 
/home/dannf/git/edk2.debug/Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdeModulePkg/Logo/LogoDxe/OUTPUT/LogoDxe.lib(AutoGen.obj)
 has EABI version 5, but target 
/home/dannf/git/edk2.debug/Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdeModulePkg/Logo/LogoDxe/DEBUG/LogoDxe.dll
 has EABI version 0 [...]

It looks like this maybe a side-effect of the ordering of the entries in 
static_library_files.list. Previous to this commit, LogoDxehii.lib would appear 
near the end of the file - now it is near the beginning.
Moving it back to the end of the file allows the linking to continue.

Also, is it expected that this does not report being an EABI5 object?
$ file 
Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdeModulePkg/Logo/LogoDxe/OUTPUT/LogoDxehii.lib
Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdeModulePkg/Logo/LogoDxe/OUTPUT/LogoDxehii.lib:
 ELF 32-bit LSB relocatable, ARM, version 1 (ARM), not stripped

 -dann




-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47904): https://edk2.groups.io/g/devel/message/47904
Mute This Topic: https://groups.io/mt/32779332/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 25/29] BaseTools/Scripts

2019-09-23 Thread Abner Chang
Add maintainers

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Abner Chang
> Sent: Monday, September 23, 2019 8:32 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner (HPS SW/FW Technologist) 
> Subject: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 25/29]
> BaseTools/Scripts
> 
> Add RISC-V specific LD scripts. ."rela(INFO)" in the latest GccBase.lds causes
> PE32 relocation error.
> This is the temporaty solution untill we find the root casue.
> 
> Signed-off-by: Abner Chang 
> ---
>  BaseTools/Scripts/GccBaseRiscV.lds | 66
> ++
>  1 file changed, 66 insertions(+)
>  create mode 100644 BaseTools/Scripts/GccBaseRiscV.lds
> 
> diff --git a/BaseTools/Scripts/GccBaseRiscV.lds
> b/BaseTools/Scripts/GccBaseRiscV.lds
> new file mode 100644
> index 000..7f9fae6
> --- /dev/null
> +++ b/BaseTools/Scripts/GccBaseRiscV.lds
> @@ -0,0 +1,66 @@
> +/** @file
> +
> +  Unified linker script for GCC based builds
> +
> +  Copyright (c) 2010 - 2015, Intel Corporation. All rights
> + reserved.  Copyright (c) 2015, Linaro Ltd. All rights
> + reserved.  Copyright (c) 2019, Hewlett Packard Enterprise
> + Development LP. All rights reserved.
> +
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +SECTIONS {
> +
> +  /*
> +   * The PE/COFF binary consists of DOS and PE/COFF headers, and a
> sequence of
> +   * section headers adding up to PECOFF_HEADER_SIZE bytes (which differs
> +   * between 32-bit and 64-bit builds). The actual start of the .text section
> +   * will be rounded up based on its actual alignment.
> +   */
> +  . = PECOFF_HEADER_SIZE;
> +
> +  .text : ALIGN(CONSTANT(COMMONPAGESIZE)) {
> +*(.text .text.* .stub .gnu.linkonce.t.*)
> +*(.rodata .rodata.* .gnu.linkonce.r.*)
> +*(.got .got.*)
> +
> +/*
> + * The contents of AutoGen.c files are constant from the POV of the
> program,
> + * but most of its contents end up in .data or .bss by default since few 
> of
> + * the variable definitions that get emitted are declared as CONST.
> + */
> +*:AutoGen.obj(.data.g*Guid)
> +  }
> +
> +  /*
> +   * The alignment of the .data section should be less than or equal to the
> +   * alignment of the .text section. This ensures that the relative offset
> +   * between these sections is the same in the ELF and the PE/COFF versions
> of
> +   * this binary.
> +   */
> +  .data ALIGN(ALIGNOF(.text)) : ALIGN(CONSTANT(COMMONPAGESIZE)) {
> +*(.data .data.* .gnu.linkonce.d.*)
> +*(.bss .bss.*)
> +  }
> +
> +  .eh_frame ALIGN(CONSTANT(COMMONPAGESIZE)) : {
> +KEEP (*(.eh_frame))
> +  }
> +
> +  .rela ALIGN(CONSTANT(COMMONPAGESIZE)) : {
> +*(.rela .rela.*)
> +  }
> +
> +  /DISCARD/ : {
> +*(.note.GNU-stack)
> +*(.gnu_debuglink)
> +*(.interp)
> +*(.dynsym)
> +*(.dynstr)
> +*(.dynamic)
> +*(.hash)
> +*(.comment)
> +*(COMMON)
> +  }
> +}
> --
> 2.7.4
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47903): https://edk2.groups.io/g/devel/message/47903
Mute This Topic: https://groups.io/mt/34272029/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 06/29] MdeModulePkg/CapsuleRuntimeDxe: Add RISCV64 arch.

2019-09-23 Thread Abner Chang
CC reviewers.

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Abner Chang
> Sent: Monday, September 23, 2019 8:32 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner (HPS SW/FW Technologist) 
> Subject: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 06/29]
> MdeModulePkg/CapsuleRuntimeDxe: Add RISCV64 arch.
> 
> Add RISC-V in INF for building CapsuleRuntimeDxe RISCV64 image.
> 
> Signed-off-by: Abner Chang 
> ---
>  MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf | 9
> +
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git
> a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
> b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
> index 9da4507..84f3688 100644
> ---
> a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
> +++
> b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
> @@ -5,6 +5,7 @@
>  #  the capsule runtime services are ready.
>  #
>  #  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
> +#  Copyright (c) 2016, Hewlett Packard Enterprise Development LP. All
> +rights reserved.
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent  #  ## @@ -21,20 +22,20
> @@  #  # The following information is for reference only and not required by
> the build tools.
>  #
> -#  VALID_ARCHITECTURES   = IA32 X64 EBC ARM AARCH64
> +#  VALID_ARCHITECTURES   = IA32 X64 EBC ARM AARCH64 RISCV64
>  #
> 
>  [Sources]
>CapsuleService.c
>CapsuleService.h
> 
> -[Sources.Ia32, Sources.EBC, Sources.ARM, Sources.AARCH64]
> +[Sources.Ia32, Sources.EBC, Sources.ARM, Sources.AARCH64,
> +Sources.RISCV64]
>SaveLongModeContext.c
> 
> -[Sources.Ia32, Sources.X64, Sources.ARM, Sources.AARCH64]
> +[Sources.Ia32, Sources.X64, Sources.ARM, Sources.AARCH64,
> +Sources.RISCV64]
>CapsuleCache.c
> 
> -[Sources.Ia32, Sources.X64, Sources.EBC]
> +[Sources.Ia32, Sources.X64, Sources.EBC, Sources.RISCV64]
>CapsuleReset.c
> 
>  [Sources.ARM, Sources.AARCH64]
> --
> 2.7.4
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47902): https://edk2.groups.io/g/devel/message/47902
Mute This Topic: https://groups.io/mt/34272025/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 20/29] MdeModulePkg/DxeIplPeim : RISC-V platform level DxeIPL

2019-09-23 Thread Abner Chang
CC maintainer

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Abner Chang
> Sent: Monday, September 23, 2019 8:32 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner (HPS SW/FW Technologist) 
> Subject: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 20/29]
> MdeModulePkg/DxeIplPeim : RISC-V platform level DxeIPL
> 
> Implementation of RISC-V platform level DxeIPL
> 
> Signed-off-by: Abner Chang 
> ---
>  MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf| 13 +++-
>  MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c | 71
> ++
>  RiscVPkg/Include/Library/RiscVPlatformDxeIpl.h | 41 +
>  3 files changed, 124 insertions(+), 1 deletion(-)  create mode 100644
> MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c
>  create mode 100644 RiscVPkg/Include/Library/RiscVPlatformDxeIpl.h
> 
> diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
> b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
> index 98bc17f..5532323 100644
> --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
> +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
> @@ -7,6 +7,7 @@
>  #
>  #  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.  #
> Copyright (c) 2017, AMD Incorporated. All rights reserved.
> +#  Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development
> +LP. All rights reserved.
>  #
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -25,7 +26,7 @@  #  #
> The following information is for reference only and not required by the build
> tools.
>  #
> -#  VALID_ARCHITECTURES   = IA32 X64 EBC (EBC is for build only)
> AARCH64
> +#  VALID_ARCHITECTURES   = IA32 X64 EBC (EBC is for build only)
> AARCH64 RISCV64
>  #
> 
>  [Sources]
> @@ -49,6 +50,9 @@
>  [Sources.ARM, Sources.AARCH64]
>Arm/DxeLoadFunc.c
> 
> +[Sources.RISCV64]
> +  RiscV64/DxeLoadFunc.c
> +
>  [Packages]
>MdePkg/MdePkg.dec
>MdeModulePkg/MdeModulePkg.dec
> @@ -56,6 +60,9 @@
>  [Packages.ARM, Packages.AARCH64]
>ArmPkg/ArmPkg.dec
> 
> +[Packages.RISCV64]
> +  RiscVPkg/RiscVPkg.dec
> +
>  [LibraryClasses]
>PcdLib
>MemoryAllocationLib
> @@ -75,6 +82,10 @@
>  [LibraryClasses.ARM, LibraryClasses.AARCH64]
>ArmMmuLib
> 
> +[LibraryClasses.RISCV64]
> +  RiscVPlatformDxeIplLib
> +  RiscVOpensbiLib
> +
>  [Ppis]
>gEfiDxeIplPpiGuid  ## PRODUCES
>gEfiPeiDecompressPpiGuid   ## PRODUCES
> diff --git a/MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c
> b/MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c
> new file mode 100644
> index 000..d3c7f9d
> --- /dev/null
> +++ b/MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c
> @@ -0,0 +1,71 @@
> +/** @file
> +  RISC-V specific functionality for DxeLoad.
> +
> +  Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development LP.
> + All rights reserved.
> +
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#include "DxeIpl.h"
> +#include "Library/RiscVPlatformDxeIpl.h"
> +
> +typedef
> +VOID*
> +(EFIAPI *DXEENTRYPOINT) (
> +  IN  VOID *HobStart
> +  );
> +
> +/**
> +   Transfers control to DxeCore.
> +
> +   This function performs a CPU architecture specific operations to execute
> +   the entry point of DxeCore with the parameters of HobList.
> +   It also installs EFI_END_OF_PEI_PPI to signal the end of PEI phase.
> +
> +   @param DxeCoreEntryPoint The entry point of DxeCore.
> +   @param HobList   The start of HobList passed to DxeCore.
> +
> +**/
> +VOID
> +HandOffToDxeCore (
> +  IN EFI_PHYSICAL_ADDRESS   DxeCoreEntryPoint,
> +  IN EFI_PEI_HOB_POINTERS   HobList
> +  )
> +{
> +  VOID*BaseOfStack;
> +  VOID*TopOfStack;
> +  EFI_STATUS  Status;
> +  //
> +  //
> +  // Allocate 128KB for the Stack
> +  //
> +  BaseOfStack = AllocatePages (EFI_SIZE_TO_PAGES (STACK_SIZE));
> +  ASSERT (BaseOfStack != NULL);
> +
> +  //
> +  // Compute the top of the stack we were allocated. Pre-allocate a
> + UINTN  // for safety.
> +  //
> +  TopOfStack = (VOID *) ((UINTN) BaseOfStack + EFI_SIZE_TO_PAGES
> + (STACK_SIZE) * EFI_PAGE_SIZE - CPU_STACK_ALIGNMENT);  TopOfStack =
> + ALIGN_POINTER (TopOfStack, CPU_STACK_ALIGNMENT);
> +
> +  //
> +  // End of PEI phase signal
> +  //
> +  Status = PeiServicesInstallPpi ();
> + ASSERT_EFI_ERROR (Status);
> +
> +  //
> +  // Update the contents of BSP stack HOB to reflect the real stack info
> passed to DxeCore.
> +  //
> +  UpdateStackHob ((EFI_PHYSICAL_ADDRESS)(UINTN) BaseOfStack,
> + STACK_SIZE);
> +
> +  DEBUG ((DEBUG_INFO, "DXE Core new stack at %x, stack pointer at
> + %x\n", BaseOfStack, TopOfStack));
> +
> +  //
> +  // Transfer the control to the entry point of DxeCore.
> +  //
> +  RiscVPlatformHandOffToDxeCore (BaseOfStack, TopOfStack,
> +DxeCoreEntryPoint, HobList); }
> +
> diff --git a/RiscVPkg/Include/Library/RiscVPlatformDxeIpl.h
> b/RiscVPkg/Include/Library/RiscVPlatformDxeIpl.h
> new file mode 

Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 08/29] MdePkg/BaseCacheMaintenanceLib: RISC-V cache maintenance implementation.

2019-09-23 Thread Abner Chang
CC maintainers.

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Abner Chang
> Sent: Monday, September 23, 2019 8:32 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner (HPS SW/FW Technologist) 
> Subject: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 08/29]
> MdePkg/BaseCacheMaintenanceLib: RISC-V cache maintenance
> implementation.
> 
> Implement RISC-V cache maintenance functions in
> BaseCacheMaintenanceLib.
> 
> Signed-off-by: Abner Chang 
> ---
>  .../BaseCacheMaintenanceLib.inf|   4 +
>  .../Library/BaseCacheMaintenanceLib/RiscVCache.c   | 250
> +
>  2 files changed, 254 insertions(+)
>  create mode 100644
> MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c
> 
> diff --git
> a/MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.in
> f
> b/MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.in
> f
> index ec7feec..d9bfa04 100644
> ---
> a/MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.in
> f
> +++
> b/MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.in
> f
> @@ -6,6 +6,7 @@
>  #
>  #  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.  #
> Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
> +#  Copyright (c) 2016, Hewlett Packard Enterprise Development LP. All
> +rights reserved.
>  #
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -41,6 +42,9 @@
> [Sources.AARCH64]
>ArmCache.c
> 
> +[Sources.RISCV64]
> +  RiscVCache.c
> +
>  [Packages]
>MdePkg/MdePkg.dec
> 
> diff --git a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c
> b/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c
> new file mode 100644
> index 000..d8e4665
> --- /dev/null
> +++ b/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c
> @@ -0,0 +1,250 @@
> +/** @file
> +  RISC-V specific functionality for cache.
> +
> +  Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development LP.
> + All rights reserved.
> +
> +  SPDX-License-Identifier: BSD-2-Clause-Patent **/
> +
> +#include 
> +#include 
> +#include 
> +
> +/**
> +  RISC-V invalidate instruction cache.
> +
> +**/
> +VOID
> +EFIAPI
> +RiscVInvalidateInstCacheAsm (
> +  VOID
> +  );
> +
> +/**
> +  RISC-V invalidate data cache.
> +
> +**/
> +VOID
> +EFIAPI
> +RiscVInvalidateDataCacheAsm (
> +  VOID
> +  );
> +
> +/**
> +  Invalidates the entire instruction cache in cache coherency domain of
> +the
> +  calling CPU.
> +
> +**/
> +VOID
> +EFIAPI
> +InvalidateInstructionCache (
> +  VOID
> +  )
> +{
> +  RiscVInvalidateInstCacheAsm ();
> +}
> +
> +/**
> +  Invalidates a range of instruction cache lines in the cache coherency
> +domain
> +  of the calling CPU.
> +
> +  Invalidates the instruction cache lines specified by Address and
> + Length. If  Address is not aligned on a cache line boundary, then
> + entire instruction  cache line containing Address is invalidated. If
> + Address + Length is not  aligned on a cache line boundary, then the
> + entire instruction cache line  containing Address + Length -1 is
> + invalidated. This function may choose to  invalidate the entire
> + instruction cache if that is more efficient than  invalidating the
> + specified range. If Length is 0, then no instruction cache  lines are
> invalidated. Address is returned.
> +
> +  If Length is greater than (MAX_ADDRESS - Address + 1), then ASSERT().
> +
> +  @param  Address The base address of the instruction cache lines to
> +  invalidate. If the CPU is in a physical addressing mode, 
> then
> +  Address is a physical address. If the CPU is in a virtual
> +  addressing mode, then Address is a virtual address.
> +
> +  @param  Length  The number of bytes to invalidate from the instruction
> cache.
> +
> +  @return Address.
> +
> +**/
> +VOID *
> +EFIAPI
> +InvalidateInstructionCacheRange (
> +  IN VOID *Address,
> +  IN UINTN Length
> +  )
> +{
> +  DEBUG((DEBUG_ERROR, "%a:RISC-V unsupported function.\n",
> +__FUNCTION__));
> +  return Address;
> +}
> +
> +/**
> +  Writes back and invalidates the entire data cache in cache coherency
> +domain
> +  of the calling CPU.
> +
> +  Writes back and invalidates the entire data cache in cache coherency
> + domain  of the calling CPU. This function guarantees that all dirty
> + cache lines are  written back to system memory, and also invalidates
> + all the data cache lines  in the cache coherency domain of the calling CPU.
> +
> +**/
> +VOID
> +EFIAPI
> +WriteBackInvalidateDataCache (
> +  VOID
> +  )
> +{
> +  DEBUG((DEBUG_ERROR, "%a:RISC-V unsupported function.\n",
> +__FUNCTION__)); }
> +
> +/**
> +  Writes back and invalidates a range of data cache lines in the cache
> +  coherency domain of the calling CPU.
> +
> +  Writes back and invalidates the data cache lines specified by Address
> + and  Length. If Address is not aligned on a cache line boundary, then
> + entire data  cache line containing Address is 

Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 12/29] MdePkg/BaseSynchronizationLib: RISC-V cache related code.

2019-09-23 Thread Abner Chang
CC maintainers

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Abner Chang
> Sent: Monday, September 23, 2019 8:32 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner (HPS SW/FW Technologist) 
> Subject: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 12/29]
> MdePkg/BaseSynchronizationLib: RISC-V cache related code.
> 
> Support RISC-V cache related functions.
> 
> Signed-off-by: Abner Chang 
> ---
>  .../BaseSynchronizationLib.inf |   6 +
>  .../RiscV64/Synchronization.c  | 183 
> +
>  .../RiscV64/SynchronizationAsm.S   |  78 +
>  3 files changed, 267 insertions(+)
>  create mode 100644
> MdePkg/Library/BaseSynchronizationLib/RiscV64/Synchronization.c
>  create mode 100644
> MdePkg/Library/BaseSynchronizationLib/RiscV64/SynchronizationAsm.S
> 
> diff --git
> a/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf
> b/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf
> index 446bc19..c16ef9d 100755
> --- a/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf
> +++ b/MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf
> @@ -3,6 +3,7 @@
>  #
>  #  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.  #
> Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
> +#  Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development
> +LP. All rights reserved.
>  #
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -78,6 +79,11 @@
>AArch64/Synchronization.S | GCC
>AArch64/Synchronization.asm   | MSFT
> 
> +[Sources.RISCV64]
> +  Synchronization.c
> +  RiscV64/Synchronization.c  | GCC
> +  RiscV64/SynchronizationAsm.S
> +
>  [Packages]
>MdePkg/MdePkg.dec
> 
> diff --git
> a/MdePkg/Library/BaseSynchronizationLib/RiscV64/Synchronization.c
> b/MdePkg/Library/BaseSynchronizationLib/RiscV64/Synchronization.c
> new file mode 100644
> index 000..e210b74
> --- /dev/null
> +++ b/MdePkg/Library/BaseSynchronizationLib/RiscV64/Synchronization.c
> @@ -0,0 +1,183 @@
> +/** @file
> +  Implementation of synchronization functions on RISC-V
> +
> +  Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development LP.
> + All rights reserved.
> +
> +  SPDX-License-Identifier: BSD-2-Clause-Patent **/
> +
> +#include 
> +
> +UINT32
> +SyncCompareExchange32 (
> +  IN volatile UINT32   *Value,
> +  IN UINT32CompareValue,
> +  IN UINT32ExchangeValue
> +);
> +
> +UINT64
> +SyncCompareExchange64 (
> +  IN volatile UINT64   *Value,
> +  IN UINT64CompareValue,
> +  IN UINT64ExchangeValue
> +);
> +
> +UINT32
> +SyncSyncIncrement32 (
> +  IN volatile UINT32   *Value
> +  );
> +
> +UINT32
> +SyncSyncDecrement32 (
> +  IN volatile UINT32   *Value
> +  );
> +
> +/**
> +  Performs an atomic compare exchange operation on a 16-bit
> +  unsigned integer.
> +
> +  Performs an atomic compare exchange operation on the 16-bit  unsigned
> + integer specified by Value.  If Value is equal to  CompareValue, then
> + Value is set to ExchangeValue and  CompareValue is returned.  If Value
> + is not equal to  CompareValue, then Value is returned. The compare
> + exchange  operation must be performed using MP safe mechanisms.
> +
> +  @param  Value A pointer to the 16-bit value for the
> +compare exchange operation.
> +  @param  CompareValue  16-bit value used in compare operation.
> +  @param  ExchangeValue 16-bit value used in exchange operation.
> +
> +  @return The original *Value before exchange.
> +
> +**/
> +UINT16
> +EFIAPI
> +InternalSyncCompareExchange16 (
> +  IN  volatile UINT16   *Value,
> +  IN  UINT16CompareValue,
> +  IN  UINT16ExchangeValue
> +  )
> +{
> +  DEBUG((DEBUG_ERROR, "%a:RISC-V does not support 16-bit AMO
> +operation\n", __FUNCTION__));
> +  ASSERT (FALSE);
> +  return 0;
> +}
> +
> +/**
> +  Performs an atomic compare exchange operation on a 32-bit
> +  unsigned integer.
> +
> +  Performs an atomic compare exchange operation on the 32-bit  unsigned
> + integer specified by Value.  If Value is equal to  CompareValue, then
> + Value is set to ExchangeValue and  CompareValue is returned.  If Value
> + is not equal to  CompareValue, then Value is returned. The compare
> + exchange  operation must be performed using MP safe mechanisms.
> +
> +  @param  Value A pointer to the 32-bit value for the
> +compare exchange operation.
> +  @param  CompareValue  32-bit value used in compare operation.
> +  @param  ExchangeValue 32-bit value used in exchange operation.
> +
> +  @return The original *Value before exchange.
> +
> +**/
> +UINT32
> +EFIAPI
> +InternalSyncCompareExchange32 (
> +  IN  volatile UINT32   *Value,
> +  IN  UINT32

Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 11/29] MdePkg/BaseCpuLib: RISC-V Base CPU library implementation.

2019-09-23 Thread Abner Chang
CC maintainers.

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Abner Chang
> Sent: Monday, September 23, 2019 8:32 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner (HPS SW/FW Technologist) 
> Subject: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 11/29]
> MdePkg/BaseCpuLib: RISC-V Base CPU library implementation.
> 
> Implement RISC-V CPU related functions in BaseCpuLib.
> 
> Signed-off-by: Abner Chang 
> ---
>  MdePkg/Library/BaseCpuLib/BaseCpuLib.inf |  6 +-
> MdePkg/Library/BaseCpuLib/BaseCpuLib.uni |  5 +++--
>  MdePkg/Library/BaseCpuLib/RiscV/Cpu.S| 19 +++
>  3 files changed, 27 insertions(+), 3 deletions(-)  create mode 100644
> MdePkg/Library/BaseCpuLib/RiscV/Cpu.S
> 
> diff --git a/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
> b/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
> index a7cb381..a95d8a0 100644
> --- a/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
> +++ b/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
> @@ -7,6 +7,7 @@
>  #  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.  #
> Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.  #
> Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.
> +#  Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development
> +LP. All rights reserved.
>  #
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -24,7 +25,7 @@
> 
> 
>  #
> -#  VALID_ARCHITECTURES   = IA32 X64 EBC ARM AARCH64
> +#  VALID_ARCHITECTURES   = IA32 X64 EBC ARM AARCH64 RISCV64
>  #
> 
>  [Sources.IA32]
> @@ -59,6 +60,9 @@
>AArch64/CpuFlushTlb.asm | MSFT
>AArch64/CpuSleep.asm| MSFT
> 
> +[Sources.RISCV64]
> +  RiscV/Cpu.S
> +
>  [Packages]
>MdePkg/MdePkg.dec
> 
> diff --git a/MdePkg/Library/BaseCpuLib/BaseCpuLib.uni
> b/MdePkg/Library/BaseCpuLib/BaseCpuLib.uni
> index fc95cda..85d56ce 100644
> --- a/MdePkg/Library/BaseCpuLib/BaseCpuLib.uni
> +++ b/MdePkg/Library/BaseCpuLib/BaseCpuLib.uni
> @@ -1,12 +1,13 @@
>  // /** @file
>  // Instance of CPU Library for various architecture.
>  //
> -// CPU Library implemented using ASM functions for IA-32 and X64,
> +// CPU Library implemented using ASM functions for IA-32, X64 and
> +RISCV64,
>  // PAL CALLs for IPF, and empty functions for EBC.
>  //
>  // Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.  //
> Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.  //
> Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.
> +// Copyright (c) 2019, Hewlett Packard Enterprise Development LP. All
> +rights reserved.
>  //
>  // SPDX-License-Identifier: BSD-2-Clause-Patent  // @@ -15,5 +16,5 @@
> 
>  #string STR_MODULE_ABSTRACT #language en-US "Instance of CPU
> Library for various architectures"
> 
> -#string STR_MODULE_DESCRIPTION  #language en-US "CPU Library
> implemented using ASM functions for IA-32 and X64, PAL CALLs for IPF, and
> empty functions for EBC."
> +#string STR_MODULE_DESCRIPTION  #language en-US "CPU Library
> implemented using ASM functions for IA-32, X64 and RISCV64, PAL CALLs for
> IPF, and empty functions for EBC."
> 
> diff --git a/MdePkg/Library/BaseCpuLib/RiscV/Cpu.S
> b/MdePkg/Library/BaseCpuLib/RiscV/Cpu.S
> new file mode 100644
> index 000..703b1e8
> --- /dev/null
> +++ b/MdePkg/Library/BaseCpuLib/RiscV/Cpu.S
> @@ -0,0 +1,19 @@
> +//-
> +-
> +//
> +// CpuSleep for RISC-V
> +//
> +// Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development
> +LP. All rights reserved. // SPDX-License-Identifier:
> +BSD-2-Clause-Patent //
> +//-
> +-
> +.data
> +.align 3
> +.section .text
> +
> +.global ASM_PFX(_CpuSleep)
> +
> +ASM_PFX(_CpuSleep):
> +wfi
> +ret
> +
> +
> --
> 2.7.4
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47898): https://edk2.groups.io/g/devel/message/47898
Mute This Topic: https://groups.io/mt/34271979/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 08/29] MdePkg/BaseCacheMaintenanceLib: RISC-V cache maintenance implementation.

2019-09-23 Thread Abner Chang


CC maintainers.

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Abner Chang
> Sent: Monday, September 23, 2019 8:32 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner (HPS SW/FW Technologist) 
> Subject: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 08/29]
> MdePkg/BaseCacheMaintenanceLib: RISC-V cache maintenance
> implementation.
> 
> Implement RISC-V cache maintenance functions in
> BaseCacheMaintenanceLib.
> 
> Signed-off-by: Abner Chang 
> ---
>  .../BaseCacheMaintenanceLib.inf|   4 +
>  .../Library/BaseCacheMaintenanceLib/RiscVCache.c   | 250
> +
>  2 files changed, 254 insertions(+)
>  create mode 100644
> MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c
> 
> diff --git
> a/MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.in
> f
> b/MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.in
> f
> index ec7feec..d9bfa04 100644
> ---
> a/MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.in
> f
> +++
> b/MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMaintenanceLib.in
> f
> @@ -6,6 +6,7 @@
>  #
>  #  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.  #
> Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
> +#  Copyright (c) 2016, Hewlett Packard Enterprise Development LP. All
> +rights reserved.
>  #
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -41,6 +42,9 @@
> [Sources.AARCH64]
>ArmCache.c
> 
> +[Sources.RISCV64]
> +  RiscVCache.c
> +
>  [Packages]
>MdePkg/MdePkg.dec
> 
> diff --git a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c
> b/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c
> new file mode 100644
> index 000..d8e4665
> --- /dev/null
> +++ b/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c
> @@ -0,0 +1,250 @@
> +/** @file
> +  RISC-V specific functionality for cache.
> +
> +  Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development LP.
> + All rights reserved.
> +
> +  SPDX-License-Identifier: BSD-2-Clause-Patent **/
> +
> +#include 
> +#include 
> +#include 
> +
> +/**
> +  RISC-V invalidate instruction cache.
> +
> +**/
> +VOID
> +EFIAPI
> +RiscVInvalidateInstCacheAsm (
> +  VOID
> +  );
> +
> +/**
> +  RISC-V invalidate data cache.
> +
> +**/
> +VOID
> +EFIAPI
> +RiscVInvalidateDataCacheAsm (
> +  VOID
> +  );
> +
> +/**
> +  Invalidates the entire instruction cache in cache coherency domain of
> +the
> +  calling CPU.
> +
> +**/
> +VOID
> +EFIAPI
> +InvalidateInstructionCache (
> +  VOID
> +  )
> +{
> +  RiscVInvalidateInstCacheAsm ();
> +}
> +
> +/**
> +  Invalidates a range of instruction cache lines in the cache coherency
> +domain
> +  of the calling CPU.
> +
> +  Invalidates the instruction cache lines specified by Address and
> + Length. If  Address is not aligned on a cache line boundary, then
> + entire instruction  cache line containing Address is invalidated. If
> + Address + Length is not  aligned on a cache line boundary, then the
> + entire instruction cache line  containing Address + Length -1 is
> + invalidated. This function may choose to  invalidate the entire
> + instruction cache if that is more efficient than  invalidating the
> + specified range. If Length is 0, then no instruction cache  lines are
> invalidated. Address is returned.
> +
> +  If Length is greater than (MAX_ADDRESS - Address + 1), then ASSERT().
> +
> +  @param  Address The base address of the instruction cache lines to
> +  invalidate. If the CPU is in a physical addressing mode, 
> then
> +  Address is a physical address. If the CPU is in a virtual
> +  addressing mode, then Address is a virtual address.
> +
> +  @param  Length  The number of bytes to invalidate from the instruction
> cache.
> +
> +  @return Address.
> +
> +**/
> +VOID *
> +EFIAPI
> +InvalidateInstructionCacheRange (
> +  IN VOID *Address,
> +  IN UINTN Length
> +  )
> +{
> +  DEBUG((DEBUG_ERROR, "%a:RISC-V unsupported function.\n",
> +__FUNCTION__));
> +  return Address;
> +}
> +
> +/**
> +  Writes back and invalidates the entire data cache in cache coherency
> +domain
> +  of the calling CPU.
> +
> +  Writes back and invalidates the entire data cache in cache coherency
> + domain  of the calling CPU. This function guarantees that all dirty
> + cache lines are  written back to system memory, and also invalidates
> + all the data cache lines  in the cache coherency domain of the calling CPU.
> +
> +**/
> +VOID
> +EFIAPI
> +WriteBackInvalidateDataCache (
> +  VOID
> +  )
> +{
> +  DEBUG((DEBUG_ERROR, "%a:RISC-V unsupported function.\n",
> +__FUNCTION__)); }
> +
> +/**
> +  Writes back and invalidates a range of data cache lines in the cache
> +  coherency domain of the calling CPU.
> +
> +  Writes back and invalidates the data cache lines specified by Address
> + and  Length. If Address is not aligned on a cache line boundary, then
> + entire data  cache line containing Address 

Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 14/29] NetworkPkg

2019-09-23 Thread Abner Chang
CC maintainers.

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Abner Chang
> Sent: Monday, September 23, 2019 8:32 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner (HPS SW/FW Technologist) 
> Subject: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 14/29] NetworkPkg
> 
> Add RISCV64 Arch.
> 
> Signed-off-by: Abner Chang 
> ---
>  NetworkPkg/Network.dsc.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/NetworkPkg/Network.dsc.inc b/NetworkPkg/Network.dsc.inc
> index c7f4328..b484f9b 100644
> --- a/NetworkPkg/Network.dsc.inc
> +++ b/NetworkPkg/Network.dsc.inc
> @@ -34,7 +34,7 @@
>  !include NetworkPkg/NetworkComponents.dsc.inc
> 
>  !else
> -[Components.IA32, Components.X64, Components.ARM,
> Components.AARCH64]
> +[Components.IA32, Components.X64, Components.ARM,
> Components.AARCH64,
> +Components.RISCV64]
>  !include NetworkPkg/NetworkComponents.dsc.inc
> 
>  !endif
> --
> 2.7.4
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47896): https://edk2.groups.io/g/devel/message/47896
Mute This Topic: https://groups.io/mt/34271973/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 10/29] MdePkg/BasePeCoff: Add RISC-V PE/Coff related code.

2019-09-23 Thread Abner Chang


CC maintainers
> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Abner Chang
> Sent: Monday, September 23, 2019 8:32 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner (HPS SW/FW Technologist) 
> Subject: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 10/29]
> MdePkg/BasePeCoff: Add RISC-V PE/Coff related code.
> 
> Support RISC-V image relocation.
> 
> Signed-off-by: Abner Chang 
> ---
>  MdePkg/Library/BasePeCoffLib/BasePeCoff.c  |   3 +-
>  MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf |   5 +
>  MdePkg/Library/BasePeCoffLib/BasePeCoffLib.uni |   2 +
>  .../Library/BasePeCoffLib/BasePeCoffLibInternals.h |   1 +
>  .../Library/BasePeCoffLib/RiscV/PeCoffLoaderEx.c   | 142
> +
>  5 files changed, 152 insertions(+), 1 deletion(-)  create mode 100644
> MdePkg/Library/BasePeCoffLib/RiscV/PeCoffLoaderEx.c
> 
> diff --git a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
> b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
> index 07bb62f..97e0ff4 100644
> --- a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
> +++ b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
> @@ -1,6 +1,6 @@
>  /** @file
>Base PE/COFF loader supports loading any PE32/PE32+ or TE image, but
> -  only supports relocating IA32, x64, IPF, and EBC images.
> +  only supports relocating IA32, x64, IPF, ARM, RISC-V and EBC images.
> 
>Caution: This file requires additional review when modified.
>This library will have external input - PE/COFF image.
> @@ -17,6 +17,7 @@
> 
>Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
>Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
> +  Portions Copyright (c) 2016, Hewlett Packard Enterprise Development
> + LP. All rights reserved.
>SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> diff --git a/MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
> b/MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
> index 395c140..b190494 100644
> --- a/MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
> +++ b/MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
> @@ -3,6 +3,7 @@
>  #  The IPF version library supports loading IPF and EBC PE/COFF image.
>  #  The IA32 version library support loading IA32, X64 and EBC PE/COFF images.
>  #  The X64 version library support loading IA32, X64 and EBC PE/COFF images.
> +#  The RISC-V version library support loading RISC-V images.
>  #
>  #  Caution: This module requires additional review when modified.
>  #  This library will have external input - PE/COFF image.
> @@ -11,6 +12,7 @@
>  #
>  #  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.  #
> Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
> +#  Copyright (c) 2016, Hewlett Packard Enterprise Development LP. All
> +rights reserved.
>  #
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -41,6 +43,9 @@
> [Sources.ARM]
>Arm/PeCoffLoaderEx.c
> 
> +[Sources.RISCV64]
> +  RiscV/PeCoffLoaderEx.c
> +
>  [Packages]
>MdePkg/MdePkg.dec
> 
> diff --git a/MdePkg/Library/BasePeCoffLib/BasePeCoffLib.uni
> b/MdePkg/Library/BasePeCoffLib/BasePeCoffLib.uni
> index b0ea702..8616ca3 100644
> --- a/MdePkg/Library/BasePeCoffLib/BasePeCoffLib.uni
> +++ b/MdePkg/Library/BasePeCoffLib/BasePeCoffLib.uni
> @@ -4,6 +4,7 @@
>  // The IPF version library supports loading IPF and EBC PE/COFF image.
>  // The IA32 version library support loading IA32, X64 and EBC PE/COFF
> images.
>  // The X64 version library support loading IA32, X64 and EBC PE/COFF images.
> +// The RISC-V version library support loading RISC-V32 and RISC-V64
> PE/COFF images.
>  //
>  // Caution: This module requires additional review when modified.
>  // This library will have external input - PE/COFF image.
> @@ -12,6 +13,7 @@
>  //
>  // Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.  //
> Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
> +// Copyright (c) 2016, Hewlett Packard Enterprise Development LP. All
> +rights reserved.
>  //
>  // SPDX-License-Identifier: BSD-2-Clause-Patent  // diff --git
> a/MdePkg/Library/BasePeCoffLib/BasePeCoffLibInternals.h
> b/MdePkg/Library/BasePeCoffLib/BasePeCoffLibInternals.h
> index b74277f..9c33703 100644
> --- a/MdePkg/Library/BasePeCoffLib/BasePeCoffLibInternals.h
> +++ b/MdePkg/Library/BasePeCoffLib/BasePeCoffLibInternals.h
> @@ -2,6 +2,7 @@
>Declaration of internal functions in PE/COFF Lib.
> 
>Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
> +  Copyright (c) 2016, Hewlett Packard Enterprise Development LP. All
> + rights reserved.
>SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> diff --git a/MdePkg/Library/BasePeCoffLib/RiscV/PeCoffLoaderEx.c
> b/MdePkg/Library/BasePeCoffLib/RiscV/PeCoffLoaderEx.c
> new file mode 100644
> index 000..8eb37f9
> --- /dev/null
> +++ b/MdePkg/Library/BasePeCoffLib/RiscV/PeCoffLoaderEx.c
> @@ -0,0 +1,142 @@
> +/** @file
> +  PE/Coff loader for RISC-V PE image
> +
> 

Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 13/29] MdeModulePkg/Logo

2019-09-23 Thread Abner Chang
CC maintainers

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Abner Chang
> Sent: Monday, September 23, 2019 8:32 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner (HPS SW/FW Technologist) 
> Subject: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 13/29]
> MdeModulePkg/Logo
> 
> Add RISCV64 Arch.
> 
> Signed-off-by: Abner Chang 
> ---
>  MdeModulePkg/Logo/Logo.inf | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/MdeModulePkg/Logo/Logo.inf b/MdeModulePkg/Logo/Logo.inf
> index 0182025..243748c 100644
> --- a/MdeModulePkg/Logo/Logo.inf
> +++ b/MdeModulePkg/Logo/Logo.inf
> @@ -19,7 +19,7 @@
>  #
>  # The following information is for reference only and not required by the
> build tools.
>  #
> -#  VALID_ARCHITECTURES   = IA32 X64 EBC ARM AARCH64
> +#  VALID_ARCHITECTURES   = IA32 X64 EBC ARM AARCH64 RISCV64
>  #
> 
>  [Binaries]
> --
> 2.7.4
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47894): https://edk2.groups.io/g/devel/message/47894
Mute This Topic: https://groups.io/mt/34271960/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 09/29] MdePkg/BaseIoLibIntrinsic: RISC-V I/O intrinsic functions.

2019-09-23 Thread Abner Chang


CC Maintainers.
> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Abner Chang
> Sent: Monday, September 23, 2019 8:32 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner (HPS SW/FW Technologist) 
> Subject: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 09/29]
> MdePkg/BaseIoLibIntrinsic: RISC-V I/O intrinsic functions.
> 
> RISC-V MMIO library instance.  RISC-V only supports memory map I/O.
> 
> Signed-off-by: Abner Chang 
> ---
>  .../BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf  |   8 +-
>  MdePkg/Library/BaseIoLibIntrinsic/IoLibRiscV.c | 601
> +
>  2 files changed, 607 insertions(+), 2 deletions(-)  create mode 100644
> MdePkg/Library/BaseIoLibIntrinsic/IoLibRiscV.c
> 
> diff --git a/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
> b/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
> index 457cce9..fbb568e 100644
> --- a/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
> +++ b/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
> @@ -2,13 +2,14 @@
>  #  Instance of I/O Library using compiler intrinsics.
>  #
>  #  I/O Library that uses compiler intrinsics to perform IN and OUT 
> instructions
> -#  for IA-32 and x64.  On IPF, I/O port requests are translated into MMIO
> requests.
> +#  for IA-32, x64 and RISC-V.  On IPF, I/O port requests are translated into
> MMIO requests.
>  #  MMIO requests are forwarded directly to memory.  For EBC, I/O port
> requests  #  ASSERT().
>  #
>  #  Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.  #
> Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.  #
> Copyright (c) 2017, AMD Incorporated. All rights reserved.
> +#  Portinos Copyright (c) 2016, Hewlett Packard Enterprise Development
> +LP. All rights reserved.
>  #
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -25,7 +26,7 @@
> 
> 
>  #
> -#  VALID_ARCHITECTURES   = IA32 X64 EBC ARM AARCH64
> +#  VALID_ARCHITECTURES   = IA32 X64 EBC ARM AARCH64 RISCV64
>  #
> 
>  [Sources]
> @@ -55,6 +56,9 @@
>  [Sources.AARCH64]
>IoLibArm.c
> 
> +[Sources.RISCV64]
> +  IoLibRiscV.c
> +
>  [Packages]
>MdePkg/MdePkg.dec
> 
> diff --git a/MdePkg/Library/BaseIoLibIntrinsic/IoLibRiscV.c
> b/MdePkg/Library/BaseIoLibIntrinsic/IoLibRiscV.c
> new file mode 100644
> index 000..789928b
> --- /dev/null
> +++ b/MdePkg/Library/BaseIoLibIntrinsic/IoLibRiscV.c
> @@ -0,0 +1,601 @@
> +/** @file
> +  Common I/O Library routines for RISC-V
> +
> +  Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development LP.
> + 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
> + INVALID URI REMOVED
> 3A__opensource.org_lic
> + enses_bsd-
> 2Dlicense.php=DwIBAg=C5b8zRQO1miGmBeVZ2LFWg=_SN6FZBN4V
> +
> gi4Ulkskz6qU3NYRO03nHp9P7Z5q59A3E=iiSSnOQeIcsWwWSNpZOq8Z8FU
> hf-ZXBIKZ
> + -k2RKjtSw=JXcajsH1FkirFiWOe0VJ0qh1HCibFZd6W9j87D8J98k=
> +
> +  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS"
> BASIS,
> +  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER
> EXPRESS OR IMPLIED.
> +**/
> +
> +#include "BaseIoLibIntrinsicInternal.h"
> +
> +/**
> +  Reads an 8-bit MMIO register.
> +
> +  Reads the 8-bit MMIO register specified by Address. The 8-bit read
> + value is  returned. This function must guarantee that all MMIO read
> + and write  operations are serialized.
> +
> +  If 8-bit MMIO register operations are not supported, then ASSERT().
> +
> +  @param  Address The MMIO register to read.
> +
> +  @return The value read.
> +
> +**/
> +UINT8
> +EFIAPI
> +MmioRead8 (
> +  IN  UINTN Address
> +  )
> +{
> +  return *(volatile UINT8*)Address;
> +}
> +
> +/**
> +  Writes an 8-bit MMIO register.
> +
> +  Writes the 8-bit MMIO register specified by Address with the value
> + specified  by Value and returns Value. This function must guarantee
> + that all MMIO read  and write operations are serialized.
> +
> +  If 8-bit MMIO register operations are not supported, then ASSERT().
> +
> +  @param  Address The MMIO register to write.
> +  @param  Value   The value to write to the MMIO register.
> +
> +  @return Value.
> +
> +**/
> +UINT8
> +EFIAPI
> +MmioWrite8 (
> +  IN  UINTN Address,
> +  IN  UINT8 Value
> +  )
> +{
> +  *(volatile UINT8 *)Address = Value;
> +  return Value;
> +}
> +
> +/**
> +  Reads a 16-bit MMIO register.
> +
> +  Reads the 16-bit MMIO register specified by Address. The 16-bit read
> + value is  returned. This function must guarantee that all MMIO read
> + and write  operations are serialized.
> +
> +  If 16-bit MMIO register operations are not supported, then ASSERT().
> +  If Address is not aligned on a 16-bit boundary, then ASSERT().
> +
> +  @param  Address The MMIO register to 

Re: [edk2-devel] [RFC PATCH v2 00/44] SEV-ES guest support

2019-09-23 Thread Dong, Eric
Hi Tom,

Thanks for you to contribute such a big changes. Seems like this is a big 
changes for current code, can you help to do a design review in TianoCore 
Design Meeting? It will be helpful for us to understand the code change and 
review it.

Ray is the owner of that meeting, you can contact him for the arrangement of 
your topic.

Thanks,
Eric

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Lendacky, Thomas
> Sent: Saturday, September 21, 2019 3:25 AM
> To: devel@edk2.groups.io
> Cc: Justen, Jordan L ; Laszlo Ersek
> ; Ard Biesheuvel ; Kinney,
> Michael D ; Gao, Liming
> ; Dong, Eric ; Ni, Ray
> ; Singh, Brijesh ; You, Benjamin
> ; Bi, Dandan ; Dong, Guo
> ; Wu, Hao A ; Wang, Jian J
> ; Ma, Maurice 
> Subject: Re: [edk2-devel] [RFC PATCH v2 00/44] SEV-ES guest support
> 
> On 9/19/19 2:52 PM, Lendacky, Thomas wrote:
> > From: Tom Lendacky 
> >
> > This patch series provides support for running EDK2/OVMF under SEV-ES.
> 
> I wanted to provide the full series so that everyone can see what is involved
> with the support.
> 
> Providing multiple, smaller series of patches might be easier to review.
> If that is desired, any suggestions/recommendations on how to best approach
> that would be great.
> 
> Thanks,
> Tom
> 
> >
> > Secure Encrypted Virtualization - Encrypted State (SEV-ES) expands on
> > the SEV support to protect the guest register state from the
> > hypervisor. See
> > "AMD64 Architecture Programmer's Manual Volume 2: System
> Programming",
> > section "15.35 Encrypted State (SEV-ES)" [1].
> >
> > In order to allow a hypervisor to perform functions on behalf of a
> > guest, there is architectural support for notifying a guest's
> > operating system when certain types of VMEXITs are about to occur.
> > This allows the guest to selectively share information with the
> > hypervisor to satisfy the requested function. The notification is
> > performed using a new exception, the VMM Communication exception
> > (#VC). The information is shared through the Guest-Hypervisor
> Communication Block (GHCB) using the VMGEXIT instruction.
> > The GHCB format and the protocol for using it is documented in "SEV-ES
> > Guest-Hypervisor Communication Block Standardization" [2].
> >
> > The main areas of the EDK2 code that are updated to support SEV-ES are
> > around the exception handling support and the AP boot support.
> >
> > Exception support is required starting in Sec, continuing through Pei
> > and into Dxe in order to handle #VC exceptions that are generated.
> > Each AP requires it's own GHCB page as well as a page to hold values
> > specific to that AP.
> >
> > AP booting poses some interesting challenges. The INIT-SIPI-SIPI
> > sequence is typically used to boot the APs. However, the hypervisor is
> > not allowed to update the guest registers. The GHCB document [2] talks
> > about how SMP booting under SEV-ES is performed.
> >
> > Since the GHCB page must be a shared (unencrypted) page, the processor
> > must be running in long mode in order for the guest and hypervisor to
> > communicate with each other. As a result, SEV-ES is only supported
> > under the X64 architecture.
> >
> > [1] https://www.amd.com/system/files/TechDocs/24593.pdf
> > [2] https://developer.amd.com/wp-content/resources/56421.pdf
> >
> > ---
> >
> > These patches are based on commit:
> > ada905ab5c0e ("MdeModulePkg DxeCore: Fix for missing Memory Attributes
> > Table (MAT) update")
> >
> > A version of the tree can be found at:
> > https://github.com/AMDESE/ovmf/tree/sev-es-v7
> >
> > Cc: Ard Biesheuvel 
> > Cc: Benjamin You 
> > Cc: Dandan Bi 
> > Cc: Eric Dong 
> > Cc: Guo Dong 
> > Cc: Hao A Wu 
> > Cc: Jian J Wang 
> > Cc: Jordan Justen 
> > Cc: Laszlo Ersek 
> > Cc: Liming Gao 
> > Cc: Maurice Ma 
> > Cc: Michael D Kinney 
> > Cc: Ray Ni 
> >
> > Changes since v1:
> > - Patches reworked to be more specific to the component/area being
> updated
> >and order of definition/usage
> > - Created a library for VMGEXIT-related functions to replace use of inline
> >functions
> > - Allocation method for GDT changed from AllocatePool to AllocatePages
> > - Early caching only enabled for SEV-ES guests
> > - Ensure AP loop mode set to halt loop mode for SEV-ES guests
> > - Reserved SEC GHCB-related memory areas when S3 is enabled
> >
> > Tom Lendacky (44):
> >MdePkg: Create PCDs to be used in support of SEV-ES
> >OvmfPkg/MemEncryptSevLib: Add an SEV-ES guest indicator function
> >OvmfPkg: Add support to perform SEV-ES initialization
> >OvmfPkg/ResetVector: Add support for a 32-bit SEV check
> >MdePkg: Add the MSR definition for the GHCB register
> >OvmfPkg: Create a GHCB page for use during Sec phase
> >OvmfPkg/PlatformPei: Reserve GHCB-related areas if S3 is supported
> >OvmfPkg: Create GHCB pages for use during Pei and Dxe phase
> >MdeModulePkg/DxeIplPeim: Support GHCB pages when creating page
> tables
> >OvmfPkg: A per-CPU 

Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 07/29] MdePkg/BaseLib: BaseLib for RISC-V RV64 Processor.

2019-09-23 Thread Abner Chang
CC Maintainers.

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Abner Chang
> Sent: Monday, September 23, 2019 8:32 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner (HPS SW/FW Technologist) 
> Subject: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 07/29]
> MdePkg/BaseLib: BaseLib for RISC-V RV64 Processor.
> 
> Add RISC-V RV64 BaseLib functions.
> 
> Signed-off-by: Abner Chang 
> ---
>  MdePkg/Include/Library/BaseLib.h   |  26 ++
>  MdePkg/Library/BaseLib/BaseLib.inf |  18 +-
>  MdePkg/Library/BaseLib/RiscV64/CpuBreakpoint.c |  27 +++
>  MdePkg/Library/BaseLib/RiscV64/CpuPause.c  |  29 +++
>  MdePkg/Library/BaseLib/RiscV64/DisableInterrupts.c |  24 ++
> MdePkg/Library/BaseLib/RiscV64/EnableInterrupts.c  |  25 ++
>  MdePkg/Library/BaseLib/RiscV64/FlushCache.S|  21 ++
>  MdePkg/Library/BaseLib/RiscV64/GetInterruptState.c |  35
> +++  .../Library/BaseLib/RiscV64/InternalSwitchStack.c  |  55 +
>  MdePkg/Library/BaseLib/RiscV64/LongJump.c  |  32 +++
>  .../Library/BaseLib/RiscV64/RiscVCpuBreakpoint.S   |  14 ++
>  MdePkg/Library/BaseLib/RiscV64/RiscVCpuPause.S |  14 ++
>  MdePkg/Library/BaseLib/RiscV64/RiscVInterrupt.S|  32 +++
>  .../Library/BaseLib/RiscV64/RiscVSetJumpLongJump.S |  55 +
>  MdePkg/Library/BaseLib/RiscV64/Unaligned.c | 264
> +
>  15 files changed, 670 insertions(+), 1 deletion(-)  create mode 100644
> MdePkg/Library/BaseLib/RiscV64/CpuBreakpoint.c
>  create mode 100644 MdePkg/Library/BaseLib/RiscV64/CpuPause.c
>  create mode 100644 MdePkg/Library/BaseLib/RiscV64/DisableInterrupts.c
>  create mode 100644 MdePkg/Library/BaseLib/RiscV64/EnableInterrupts.c
>  create mode 100644 MdePkg/Library/BaseLib/RiscV64/FlushCache.S
>  create mode 100644 MdePkg/Library/BaseLib/RiscV64/GetInterruptState.c
>  create mode 100644 MdePkg/Library/BaseLib/RiscV64/InternalSwitchStack.c
>  create mode 100644 MdePkg/Library/BaseLib/RiscV64/LongJump.c
>  create mode 100644
> MdePkg/Library/BaseLib/RiscV64/RiscVCpuBreakpoint.S
>  create mode 100644 MdePkg/Library/BaseLib/RiscV64/RiscVCpuPause.S
>  create mode 100644 MdePkg/Library/BaseLib/RiscV64/RiscVInterrupt.S
>  create mode 100644
> MdePkg/Library/BaseLib/RiscV64/RiscVSetJumpLongJump.S
>  create mode 100644 MdePkg/Library/BaseLib/RiscV64/Unaligned.c
> 
> diff --git a/MdePkg/Include/Library/BaseLib.h
> b/MdePkg/Include/Library/BaseLib.h
> index 2a75bc0..b8c8512 100644
> --- a/MdePkg/Include/Library/BaseLib.h
> +++ b/MdePkg/Include/Library/BaseLib.h
> @@ -4,6 +4,8 @@
> 
>  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
> Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
> +Portions Copyright (c) 2016 - 2019, Hewlett Packard Enterprise
> +Development LP. All rights reserved.
> +
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -124,6 +126,30 @@ typedef struct {
> 
>  #endif  // defined (MDE_CPU_AARCH64)
> 
> +#if defined (MDE_CPU_RISCV64)
> +///
> +/// The RISC-V architecture context buffer used by SetJump() and
> LongJump().
> +///
> +typedef struct {
> +  UINT64RA;
> +  UINT64S0;
> +  UINT64S1;
> +  UINT64S2;
> +  UINT64S3;
> +  UINT64S4;
> +  UINT64S5;
> +  UINT64S6;
> +  UINT64S7;
> +  UINT64S8;
> +  UINT64S9;
> +  UINT64S10;
> +  UINT64S11;
> +  UINT64SP;
> +} BASE_LIBRARY_JUMP_BUFFER;
> +
> +#define BASE_LIBRARY_JUMP_BUFFER_ALIGNMENT 8
> +
> +#endif // defined (MDE_CPU_RISCV64)
> 
>  //
>  // String Services
> diff --git a/MdePkg/Library/BaseLib/BaseLib.inf
> b/MdePkg/Library/BaseLib/BaseLib.inf
> index 3586beb..28d5795 100644
> --- a/MdePkg/Library/BaseLib/BaseLib.inf
> +++ b/MdePkg/Library/BaseLib/BaseLib.inf
> @@ -4,6 +4,7 @@
>  #  Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.  #
> Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.  #
> Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.
> +#  Copyright (c) 2016, Hewlett Packard Enterprise Development LP. All
> +rights reserved.
>  #
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent  # @@ -20,7 +21,7 @@
>LIBRARY_CLASS  = BaseLib
> 
>  #
> -#  VALID_ARCHITECTURES   = IA32 X64 EBC ARM AARCH64
> +#  VALID_ARCHITECTURES   = IA32 X64 EBC ARM AARCH64 RISCV64
>  #
> 
>  [Sources]
> @@ -381,6 +382,21 @@
>AArch64/CpuBreakpoint.asm | MSFT
>AArch64/SpeculationBarrier.asm| MSFT
> 
> +[Sources.RISCV64]
> +  Math64.c
> +  RiscV64/Unaligned.c
> +  RiscV64/InternalSwitchStack.c
> +  RiscV64/CpuBreakpoint.c
> +  

Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 05/29] MdePkg/Include: RISC-V definitions.

2019-09-23 Thread Abner Chang
CC maintainers.

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Abner Chang
> Sent: Monday, September 23, 2019 8:32 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner (HPS SW/FW Technologist) 
> Subject: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 05/29]
> MdePkg/Include: RISC-V definitions.
> 
> Add RISC-V processor related definitions.
> 
> Signed-off-by: Abner Chang 
> ---
>  MdePkg/Include/IndustryStandard/PeImage.h | 12 +++
>  MdePkg/Include/Protocol/DebugSupport.h| 55
> +++
>  MdePkg/Include/Protocol/PxeBaseCode.h |  4 +++
>  MdePkg/Include/Uefi/UefiBaseType.h| 13 
>  MdePkg/Include/Uefi/UefiSpec.h|  5 +++
>  5 files changed, 89 insertions(+)
> 
> diff --git a/MdePkg/Include/IndustryStandard/PeImage.h
> b/MdePkg/Include/IndustryStandard/PeImage.h
> index 720bb08..ca3fd0b 100644
> --- a/MdePkg/Include/IndustryStandard/PeImage.h
> +++ b/MdePkg/Include/IndustryStandard/PeImage.h
> @@ -9,6 +9,8 @@
> 
>  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
> Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
> +Portions Copyright (c) 2016 - 2019, Hewlett Packard Enterprise
> +Development LP. All rights reserved.
> +
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -34,6 +36,9 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
>  #define IMAGE_FILE_MACHINE_X64 0x8664
>  #define IMAGE_FILE_MACHINE_ARMTHUMB_MIXED  0x01c2
>  #define IMAGE_FILE_MACHINE_ARM64   0xAA64
> +#define IMAGE_FILE_MACHINE_RISCV32 0x5032
> +#define IMAGE_FILE_MACHINE_RISCV64 0x5064
> +#define IMAGE_FILE_MACHINE_RISCV1280x5128
> 
>  //
>  // EXE file formats
> @@ -494,6 +499,13 @@ typedef struct {
>  #define EFI_IMAGE_REL_BASED_DIR64   10
> 
>  ///
> +/// Relocation types of RISC-V processor.
> +///
> +#define EFI_IMAGE_REL_BASED_RISCV_HI20  5
> +#define EFI_IMAGE_REL_BASED_RISCV_LOW12I7
> +#define EFI_IMAGE_REL_BASED_RISCV_LOW12S8
> +
> +///
>  /// Line number format.
>  ///
>  typedef struct {
> diff --git a/MdePkg/Include/Protocol/DebugSupport.h
> b/MdePkg/Include/Protocol/DebugSupport.h
> index 800e771..1a29cc0 100644
> --- a/MdePkg/Include/Protocol/DebugSupport.h
> +++ b/MdePkg/Include/Protocol/DebugSupport.h
> @@ -7,6 +7,7 @@
> 
>  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
> Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.
> +Copyright (c) 2016, Hewlett Packard Enterprise Development LP. All
> +rights reserved.
> 
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
> @@ -603,6 +604,59 @@ typedef struct {
>UINT64  FAR;  // Fault Address Register  } EFI_SYSTEM_CONTEXT_AARCH64;
> 
> +///
> +/// RISC-V processor exception types.
> +///
> +#define EXCEPT_RISCV_INST_MISALIGNED  0
> +#define EXCEPT_RISCV_INST_ACCESS_FAULT1
> +#define EXCEPT_RISCV_ILLEGAL_INST 2
> +#define EXCEPT_RISCV_BREAKPOINT   3
> +#define EXCEPT_RISCV_LOAD_ADDRESS_MISALIGNED  4
> +#define EXCEPT_RISCV_LOAD_ACCESS_FAULT5
> +#define EXCEPT_RISCV_STORE_AMO_ADDRESS_MISALIGNED 6
> +#define EXCEPT_RISCV_STORE_AMO_ACCESS_FAULT   7
> +#define EXCEPT_RISCV_ENV_CALL_FROM_UMODE  8
> +#define EXCEPT_RISCV_ENV_CALL_FROM_SMODE  9
> +#define EXCEPT_RISCV_ENV_CALL_FROM_HMODE  10
> +#define EXCEPT_RISCV_ENV_CALL_FROM_MMODE  11
> +
> +#define EXCEPT_RISCV_SOFTWARE_INT   0x0
> +#define EXCEPT_RISCV_TIMER_INT  0x1
> +
> +typedef struct {
> +  UINT64  X0;
> +  UINT64  X1;
> +  UINT64  X2;
> +  UINT64  X3;
> +  UINT64  X4;
> +  UINT64  X5;
> +  UINT64  X6;
> +  UINT64  X7;
> +  UINT64  X8;
> +  UINT64  X9;
> +  UINT64  X10;
> +  UINT64  X11;
> +  UINT64  X12;
> +  UINT64  X13;
> +  UINT64  X14;
> +  UINT64  X15;
> +  UINT64  X16;
> +  UINT64  X17;
> +  UINT64  X18;
> +  UINT64  X19;
> +  UINT64  X20;
> +  UINT64  X21;
> +  UINT64  X22;
> +  UINT64  X23;
> +  UINT64  X24;
> +  UINT64  X25;
> +  UINT64  X26;
> +  UINT64  X27;
> +  UINT64  X28;
> +  UINT64  X29;
> +  UINT64  X30;
> +  UINT64  X31;
> +} EFI_SYSTEM_CONTEXT_RISCV64;
> 
>  ///
>  /// Universal EFI_SYSTEM_CONTEXT definition.
> @@ -614,6 +668,7 @@ typedef union {
>EFI_SYSTEM_CONTEXT_IPF  *SystemContextIpf;
>EFI_SYSTEM_CONTEXT_ARM  *SystemContextArm;
>EFI_SYSTEM_CONTEXT_AARCH64  *SystemContextAArch64;
> +  EFI_SYSTEM_CONTEXT_RISCV64  *SystemContextRiscV64;
>  } EFI_SYSTEM_CONTEXT;
> 
>  //
> diff --git a/MdePkg/Include/Protocol/PxeBaseCode.h
> b/MdePkg/Include/Protocol/PxeBaseCode.h
> index b02d270..8a9e4a1 100644
> --- a/MdePkg/Include/Protocol/PxeBaseCode.h
> +++ b/MdePkg/Include/Protocol/PxeBaseCode.h
> @@ -3,6 +3,8 @@
>devices for network access and network booting.
> 
>  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
> +Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development LP.
> +All rights 

Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 04/29] MdePkg: RISC-V RV64 binding in MdePkg

2019-09-23 Thread Abner Chang
CC maintainers.

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Abner Chang
> Sent: Monday, September 23, 2019 8:31 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner (HPS SW/FW Technologist) 
> Subject: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 04/29] MdePkg:
> RISC-V RV64 binding in MdePkg
> 
> Add RISCV64 sections in MdePkg.dec and RISCV64 ProcessorBind.h
> 
> Signed-off-by: Abner Chang 
> ---
>  MdePkg/Include/RiscV64/ProcessorBind.h | 173
> +
>  MdePkg/MdePkg.dec  |   5 +-
>  2 files changed, 177 insertions(+), 1 deletion(-)  create mode 100644
> MdePkg/Include/RiscV64/ProcessorBind.h
> 
> diff --git a/MdePkg/Include/RiscV64/ProcessorBind.h
> b/MdePkg/Include/RiscV64/ProcessorBind.h
> new file mode 100644
> index 000..c3d4ef7
> --- /dev/null
> +++ b/MdePkg/Include/RiscV64/ProcessorBind.h
> @@ -0,0 +1,173 @@
> +/** @file
> +  Processor or Compiler specific defines and types for RISC-V
> +
> +  Copyright (c) 2016 - 2019, Hewlett Packard Enterprise Development LP.
> + All rights reserved.
> +
> +  SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef __PROCESSOR_BIND_H__
> +#define __PROCESSOR_BIND_H__
> +
> +///
> +/// Define the processor type so other code can make processor based
> +choices /// #define MDE_CPU_RISCV64
> +
> +//
> +// Make sure we are using the correct packing rules per EFI
> +specification // #if !defined(__GNUC__) #pragma pack() #endif
> +
> +///
> +/// 8-byte unsigned value
> +///
> +typedef unsigned long long  UINT64  __attribute__ ((aligned (8))); ///
> +/// 8-byte signed value ///
> +typedef long long   INT64  __attribute__ ((aligned (8)));
> +///
> +/// 4-byte unsigned value
> +///
> +typedef unsigned intUINT32 __attribute__ ((aligned (4)));
> +///
> +/// 4-byte signed value
> +///
> +typedef int INT32  __attribute__ ((aligned (4)));
> +///
> +/// 2-byte unsigned value
> +///
> +typedef unsigned short  UINT16  __attribute__ ((aligned (2)));
> +///
> +/// 2-byte Character.  Unless otherwise specified all strings are
> +stored in the /// UTF-16 encoding format as defined by Unicode 2.1 and
> ISO/IEC 10646 standards.
> +///
> +typedef unsigned short  CHAR16  __attribute__ ((aligned (2)));
> +///
> +/// 2-byte signed value
> +///
> +typedef short   INT16  __attribute__ ((aligned (2)));
> +///
> +/// Logical Boolean.  1-byte value containing 0 for FALSE or a 1 for
> +TRUE.  Other /// values are undefined.
> +///
> +typedef unsigned char   BOOLEAN;
> +///
> +/// 1-byte unsigned value
> +///
> +typedef unsigned char   UINT8;
> +///
> +/// 1-byte Character
> +///
> +typedef charCHAR8;
> +///
> +/// 1-byte signed value
> +///
> +typedef signed char INT8;
> +///
> +/// Unsigned value of native width.  (4 bytes on supported 32-bit
> +processor instructions, /// 8 bytes on supported 64-bit processor
> +instructions) /// typedef UINT64  UINTN __attribute__ ((aligned (8)));
> +/// /// Signed value of native width.  (4 bytes on supported 32-bit
> +processor instructions, /// 8 bytes on supported 64-bit processor
> +instructions) ///
> +typedef INT64   INTN __attribute__ ((aligned (8)));
> +
> +//
> +// Processor specific defines
> +//
> +
> +///
> +/// A value of native width with the highest bit set.
> +///
> +#define MAX_BIT 0x8000ULL
> +///
> +/// A value of native width with the two highest bits set.
> +///
> +#define MAX_2_BITS  0xC000ULL
> +
> +///
> +/// Maximum legal RV64 address
> +///
> +#define MAX_ADDRESS   0xULL
> +
> +///
> +/// Maximum usable address at boot time (48 bits using 4 KB pages in
> +Supervisor mode) ///
> +#define MAX_ALLOC_ADDRESS   0xULL
> +
> +///
> +/// Maximum legal RISC-V INTN and UINTN values.
> +///
> +#define MAX_INTN   ((INTN)0x7FFFULL)
> +#define MAX_UINTN  ((UINTN)0xULL)
> +
> +///
> +/// The stack alignment required for RISC-V ///
> +#define CPU_STACK_ALIGNMENT   16
> +
> +///
> +/// Page allocation granularity for RISC-V ///
> +#define DEFAULT_PAGE_ALLOCATION_GRANULARITY   (0x1000)
> +#define RUNTIME_PAGE_ALLOCATION_GRANULARITY   (0x1000)
> +
> +//
> +// Modifier to ensure that all protocol member functions and EFI
> +intrinsics // use the correct C calling convention. All protocol member
> +functions and // EFI intrinsics are required to modify their member
> functions with EFIAPI.
> +//
> +#ifdef EFIAPI
> +  ///
> +  /// If EFIAPI is already defined, then we use that definition.
> +  ///
> +#elif defined(__GNUC__)
> +  ///
> +  /// Define the standard calling convention regardless of optimization
> +level
> +  /// The GCC support assumes a GCC compiler that supports the EFI ABI.
> +The EFI
> +  /// ABI is much closer to the x64 Microsoft* ABI than standard x64
> +(x86-64)
> +  /// GCC ABI. Thus a standard x64 (x86-64) GCC compiler can not be
> +used for
> 

Re: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 00/29] RISC-V EDK2 Port on

2019-09-23 Thread Abner Chang
CC maintainers.

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Abner Chang
> Sent: Monday, September 23, 2019 8:31 AM
> To: devel@edk2.groups.io
> Cc: Chang, Abner (HPS SW/FW Technologist) 
> Subject: [edk2-devel] [edk2-staging/RISC-V-V2 PATCH v2 00/29] RISC-V EDK2
> Port on
> 
> This branch "RISC-V-V2" is used to contribute RISC-V architecture on EDK2.
> Compare to the old branch "RISC-V", this branch "RISC-V-V2" is created
> based on the most recent edk2/master @37eef910. This is easier for
> reviewers to have clear ideas of edk2 code changes for RISC-V EDK2
> implementation.
> Because of the code changes made on old branch "RISC-V" is stale and not
> compliant with the latest RISC-V spec, this new branch has the fresh changes
> for RISC-V EDK2 implementation.
> 
> The main changes of these series of patches are,
> - Add RiscVPkg which conform with RISC-V Privilege Spec v1.10.
> - Incorporate and leverage RISC-V OpenSBI to provide EDK2 port OpenSBI
> library.
> - Provide RISC-V platform implementation specific drivers to EDK2 RISC-V
> platform
>   package.
> - Provide generic RISC-V SMBIOS DXE drive to create SMBIOS type 4, 7 and 44
> records,
>   in which the SMBIOS type 44 record is introduced in SMBIOS spec 3.3.0.
> 
> Abner Chang (29):
>   RiscVPkg: RISC-V processor package.
>   RiscVPkg/Include: Add header files of RISC-V CPU package
>   RiscVPkg/opensbi: EDK2 RISC-V OpenSBI support
>   MdePkg: RISC-V RV64 binding in MdePkg
>   MdePkg/Include: RISC-V definitions.
>   MdeModulePkg/CapsuleRuntimeDxe: Add RISCV64 arch.
>   MdePkg/BaseLib: BaseLib for RISC-V RV64 Processor.
>   MdePkg/BaseCacheMaintenanceLib: RISC-V cache maintenance
> implementation.
>   MdePkg/BaseIoLibIntrinsic: RISC-V I/O intrinsic functions.
>   MdePkg/BasePeCoff: Add RISC-V PE/Coff related code.
>   MdePkg/BaseCpuLib: RISC-V Base CPU library implementation.
>   MdePkg/BaseSynchronizationLib: RISC-V cache related code.
>   MdeModulePkg/Logo
>   NetworkPkg
>   RiscVPkg/Library: RISC-V CPU library
>   RiscVPkg/Library: Add RISC-V exception library
>   RiscVPkg/Library: Add RISC-V timer library
>   RiscVPkg/Library: Add EDK2 RISC-V OpenSBI library.
>   RiscVPkg/Library: RISC-V platform level DxeIPL libraries.
>   MdeModulePkg/DxeIplPeim : RISC-V platform level DxeIPL
>   RiscVPkg/PeiServicesTablePointerLibOpenSbi: RISC-V PEI Service
> Table Pointer library
>   RiscVPkg/RiscVPlatformTempMemoryInit: RISC-V Platform Temporary
> Memory library
>   RiscVPkg/CpuDxe: Add RISC-V CPU DXE driver.
>   BaseTools: BaseTools changes for RISC-V platform.
>   BaseTools/Scripts
>   RiscVPkg/SmbiosDxe: Generic SMBIOS DXE driver for RISC-V
> platforms.
>   edk2-staging/RISC-V-V2: Add submodule
>   edk2-staging/RISC-V-V2: Add ReadMe
>   edk2-staging: Update Maintainers.txt
> 
>  .gitmodules|  16 +-
>  BaseTools/Conf/build_rule.template |  62 ++-
>  BaseTools/Conf/tools_def.template  |  64 ++-
>  BaseTools/Scripts/GccBaseRiscV.lds |  66 +++
>  BaseTools/Source/C/Common/BasePeCoff.c |  15 +-
>  BaseTools/Source/C/Common/PeCoffLoaderEx.c |  95 
>  BaseTools/Source/C/GenFv/GenFvInternalLib.c| 128 -
>  BaseTools/Source/C/GenFw/Elf32Convert.c|   5 +-
>  BaseTools/Source/C/GenFw/Elf64Convert.c| 260 -
>  BaseTools/Source/C/GenFw/elf_common.h  |  62 +++
>  .../Source/C/Include/IndustryStandard/PeImage.h|   6 +
>  BaseTools/Source/Python/Common/DataType.py |   7 +-
>  Maintainers.txt|   5 +
>  MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf|  13 +-
>  MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c |  71 +++
>  MdeModulePkg/Logo/Logo.inf |   2 +-
>  .../CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf|   9 +-
>  MdePkg/Include/IndustryStandard/PeImage.h  |  12 +
>  MdePkg/Include/Library/BaseLib.h   |  26 +
>  MdePkg/Include/Protocol/DebugSupport.h |  55 ++
>  MdePkg/Include/Protocol/PxeBaseCode.h  |   4 +
>  MdePkg/Include/RiscV64/ProcessorBind.h | 173 ++
>  MdePkg/Include/Uefi/UefiBaseType.h |  13 +
>  MdePkg/Include/Uefi/UefiSpec.h |   5 +
>  .../BaseCacheMaintenanceLib.inf|   4 +
>  .../Library/BaseCacheMaintenanceLib/RiscVCache.c   | 250 +
>  MdePkg/Library/BaseCpuLib/BaseCpuLib.inf   |   6 +-
>  MdePkg/Library/BaseCpuLib/BaseCpuLib.uni   |   5 +-
>  MdePkg/Library/BaseCpuLib/RiscV/Cpu.S  |  19 +
>  .../BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf  |   8 +-
>  MdePkg/Library/BaseIoLibIntrinsic/IoLibRiscV.c | 601
> +
>  MdePkg/Library/BaseLib/BaseLib.inf |  18 +-
>  MdePkg/Library/BaseLib/RiscV64/CpuBreakpoint.c |  27 +
>  

Re: [edk2-devel] [patch v2 1/5] EmbeddedPkg: Unload image on EFI_SECURITY_VIOLATION

2019-09-23 Thread Dandan Bi
Hi EmbeddedPkg maintainers ,

Could you help push this patch?


Thanks,
Dandan
> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Dandan Bi
> Sent: Wednesday, September 18, 2019 11:06 AM
> To: devel@edk2.groups.io
> Cc: Leif Lindholm ; Ard Biesheuvel
> ; Laszlo Ersek 
> Subject: [edk2-devel] [patch v2 1/5] EmbeddedPkg: Unload image on
> EFI_SECURITY_VIOLATION
> 
> For the LoadImage() boot service, with EFI_SECURITY_VIOLATION retval, the
> Image was loaded and an ImageHandle was created with a valid
> EFI_LOADED_IMAGE_PROTOCOL, but the image can not be started right now.
> This follows UEFI Spec.
> 
> But if the caller of LoadImage() doesn't have the option to defer the
> execution of an image, we can not treat EFI_SECURITY_VIOLATION like any
> other LoadImage() error, we should unload image for the
> EFI_SECURITY_VIOLATION to avoid resource leak.
> 
> This patch is to do error handling for EFI_SECURITY_VIOLATION explicitly for
> the callers in EmbeddedPkg which don't have the policy to defer the
> execution of the image.
> 
> Cc: Leif Lindholm 
> Cc: Ard Biesheuvel 
> Cc: Laszlo Ersek 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1992
> Signed-off-by: Dandan Bi 
> Acked-by: Ard Biesheuvel 
> Acked-by: Laszlo Ersek 
> ---
>  .../AndroidFastboot/Arm/BootAndroidBootImg.c |  9 +
>  .../Library/AndroidBootImgLib/AndroidBootImgLib.c| 12 
>  2 files changed, 21 insertions(+)
> 
> diff --git
> a/EmbeddedPkg/Application/AndroidFastboot/Arm/BootAndroidBootImg.c
> b/EmbeddedPkg/Application/AndroidFastboot/Arm/BootAndroidBootImg.c
> index 591afbe7cc..fe05878b4b 100644
> ---
> a/EmbeddedPkg/Application/AndroidFastboot/Arm/BootAndroidBootImg.c
> +++
> b/EmbeddedPkg/Application/AndroidFastboot/Arm/BootAndroidBootImg.c
> @@ -71,10 +71,19 @@ StartEfiApplication (
> 
>// Load the image from the device path with Boot Services function
>Status = gBS->LoadImage (TRUE, ParentImageHandle, DevicePath, NULL, 0,
>);
>if (EFI_ERROR (Status)) {
> +//
> +// With EFI_SECURITY_VIOLATION retval, the Image was loaded and an
> ImageHandle was created
> +// with a valid EFI_LOADED_IMAGE_PROTOCOL, but the image can not be
> started right now.
> +// If the caller doesn't have the option to defer the execution of an 
> image,
> we should
> +// unload image for the EFI_SECURITY_VIOLATION to avoid resource leak.
> +//
> +if (Status == EFI_SECURITY_VIOLATION) {
> +  gBS->UnloadImage (ImageHandle);
> +}
>  return Status;
>}
> 
>// Passed LoadOptions to the EFI Application
>if (LoadOptionsSize != 0) {
> diff --git a/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
> b/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
> index d9e7aa7d2b..e1036954ee 100644
> --- a/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
> +++ b/EmbeddedPkg/Library/AndroidBootImgLib/AndroidBootImgLib.c
> @@ -439,10 +439,22 @@ AndroidBootImgBoot (
> + KernelSize;
> 
>Status = gBS->LoadImage (TRUE, gImageHandle,
> (EFI_DEVICE_PATH *),
> (VOID*)(UINTN)Kernel, KernelSize, );
> +  if (EFI_ERROR (Status)) {
> +//
> +// With EFI_SECURITY_VIOLATION retval, the Image was loaded and an
> ImageHandle was created
> +// with a valid EFI_LOADED_IMAGE_PROTOCOL, but the image can not be
> started right now.
> +// If the caller doesn't have the option to defer the execution of an 
> image,
> we should
> +// unload image for the EFI_SECURITY_VIOLATION to avoid resource leak.
> +//
> +if (Status == EFI_SECURITY_VIOLATION) {
> +  gBS->UnloadImage (ImageHandle);
> +}
> +return Status;
> +  }
> 
>// Set kernel arguments
>Status = gBS->HandleProtocol (ImageHandle,
> ,
>  (VOID **) );
>ImageInfo->LoadOptions = NewKernelArg;
> --
> 2.18.0.windows.1
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47887): https://edk2.groups.io/g/devel/message/47887
Mute This Topic: https://groups.io/mt/34271710/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 0/3] Arm builds on Visual Studio

2019-09-23 Thread Liming Gao
Leif:

>-Original Message-
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Leif
>Lindholm
>Sent: Friday, September 20, 2019 4:27 AM
>To: Laszlo Ersek 
>Cc: devel@edk2.groups.io; Gao, Liming ; Baptiste
>Gerondeau ; ard.biesheu...@linaro.org;
>Kinney, Michael D ; Zhang, Shenglei
>
>Subject: Re: [edk2-devel] [PATCH 0/3] Arm builds on Visual Studio
>
>On Thu, Sep 19, 2019 at 09:24:15PM +0200, Laszlo Ersek wrote:
>> On 09/19/19 11:44, Leif Lindholm wrote:
>> > I agree with this as a general rule, but for this (hopefully never to
>> > be repeated) operation, it makes sense to me to keep each change in
>> > this set as one patch.
>> >
>> > For the simple reason that the alternative leaves several unusable
>> > commits in sequence in the repository. There is simply no way to
>> > bisect through this change on a per-package basis.
>> >
>> > This is after all a horrible horrible hack that lets us keep using the
>> > .asm files provided for one toolchain family (RVCT) in a different
>> > toolchain family (MSFT), without having to delete and re-add, losing
>> > history in the process.
>> >
>> > Would you be OK with an exception for this extremely unusual
>> > situation?
>>
>> (The question was posed to Liming, but I'm going to follow up here with
>> my own thoughts, after getting CC'd by Liming. Thanks for that BTW.)
>
>Yes, I should have thought of that myself - Baptiste did exactly what
>I asked him to.
>
>> Let's assume the changes are split up with a fine granularity. Under
>> that assumption, consider two cases:
>>
>> (1) ARM builds on Visual Studio are broken until the last patch is
>> applied, but all other toolchains continue working fine throughout the
>> series.
>>
>> versus
>>
>> (2) ARM builds are broken on Visual Studio *and* on at least one other
>> -- preexistent -- toolchain, until the last patch in the series is applied.
>>
>>
>> Which case reflects reality?
>>
>> If it's case (1), then I prefer the fine-grained patch series structure.
>> Nothing regresses with existent toolchains (so bisection works with
>> them), we just have to advertise the last patch in the series as the one
>> that enables Visual Studio.
>>
>> If it's case (2), then I agree with the larger (multi-package) patch, as
>> a rare exception.
>>
>> (We can also put it like this: if it's *possible* to write this series
>> such that it enables (1), then we should strive for that.)
>
>I agree with your logic.
>It's just that I'm not even aware of anyone who has *tried* building
>with RVCT for several years. So we leave the "probably not working"
>toolchain potentially working for a few more commits, as a tradeoff
>against enabling the new one in one go.
>
>(Now, fair, there are other issues with the VS ARM port that as per
>the cover letter will also need to be addressed before the port is
>fully functional.)
>
If RVCT doesn't work, this change will follow into case (1). Right? 

Thanks
Liming
>/
>Leif
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47886): https://edk2.groups.io/g/devel/message/47886
Mute This Topic: https://groups.io/mt/34187297/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [Patch] Maintainers.txt: Move ShellBin maintainers to EDK II Releases section

2019-09-23 Thread Liming Gao
ShellBinPkg is generated for each edk2 stable tag release.

Cc: Andrew Fish 
Cc: Laszlo Ersek 
Cc: Leif Lindholm 
Cc: Michael D Kinney 
Signed-off-by: Liming Gao 
---
 Maintainers.txt | 13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/Maintainers.txt b/Maintainers.txt
index f348d70df3..f75b35d5a8 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -82,6 +82,12 @@ EDK II Releases:
 W: 
https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Release-Planning
 M: Liming Gao 
 
+W: 
https://github.com/tianocore/edk2/releases/download/edk2-stable20/ShellBinPkg.zip
+M: Ray Ni   (Ia32/X64)
+M: Zhichao Gao (Ia32/X64)
+M: Leif Lindholm(ARM/AArch64)
+M: Ard Biesheuvel  (ARM/AArch64)
+
 EDK II Architectures:
 -
 ARM, AARCH64
@@ -421,13 +427,6 @@ W: 
https://github.com/tianocore/tianocore.github.io/wiki/ShellPkg
 M: Ray Ni 
 M: Zhichao Gao 
 
-Maintainers for stable Shell binaries generation
-when need to publish Shell binaries with edk2 release:
-M: Ray Ni   (Ia32/X64)
-M: Zhichao Gao (Ia32/X64)
-M: Leif Lindholm(ARM/AArch64)
-M: Ard Biesheuvel  (ARM/AArch64)
-
 SignedCapsulePkg
 F: SignedCapsulePkg/
 W: https://github.com/tianocore/tianocore.github.io/wiki/SignedCapsulePkg
-- 
2.13.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47885): https://edk2.groups.io/g/devel/message/47885
Mute This Topic: https://groups.io/mt/34271643/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 31/35] ShellPkg/UefiShellDebug1CommandsLib: fix ShellCloseFile() call

2019-09-23 Thread Gao, Zhichao
Reviewed-by: Zhichao Gao 

> -Original Message-
> From: Carsey, Jaben
> Sent: Monday, September 23, 2019 10:29 PM
> To: Philippe Mathieu-Daudé ; devel@edk2.groups.io;
> ler...@redhat.com
> Cc: Ni, Ray ; Gao, Zhichao 
> Subject: RE: [edk2-devel] [PATCH 31/35]
> ShellPkg/UefiShellDebug1CommandsLib: fix ShellCloseFile() call
> 
> Reviewed-by: Jaben Carsey 
> 
> Thanks
> -Jaben
> 
> > -Original Message-
> > From: Philippe Mathieu-Daudé [mailto:phi...@redhat.com]
> > Sent: Monday, September 23, 2019 3:01 AM
> > To: devel@edk2.groups.io; ler...@redhat.com
> > Cc: Carsey, Jaben ; Ni, Ray
> > ; Gao, Zhichao 
> > Subject: Re: [edk2-devel] [PATCH 31/35]
> > ShellPkg/UefiShellDebug1CommandsLib: fix ShellCloseFile() call
> >
> > On 9/17/19 9:49 PM, Laszlo Ersek wrote:
> > > In the FileBufferSave() function, we invoke ShellCloseFile() if
> > > "Directory Can Not Be Saved".
> > >
> > > The ShellCloseFile() function takes a (SHELL_FILE_HANDLE*) parameter
> > > called "FileHandle", and correctly passes the de-referenced
> > > (*FileHandle) to EFI_SHELL_CLOSE_FILE, which takes a
> SHELL_FILE_HANDLE.
> > >
> > > However, FileBufferSave() passes SHELL_FILE_HANDLE to
> > > ShellCloseFile(), not the expected (SHELL_FILE_HANDLE*). Correct it.
> > >
> > > This fixes an actual bug that has remained hidden for two reasons:
> > >
> > > - pointer-to-VOID converts from/to any pointer-to-object type
> > > silently,
> > > - the bug is on an error path which has likely never fired in practice.
> > >
> > > Cc: Jaben Carsey 
> > > Cc: Ray Ni 
> > > Cc: Zhichao Gao 
> > > Signed-off-by: Laszlo Ersek 
> > > ---
> > >
> > > Notes:
> > > tested: edit (saving a file)
> > >
> > >  ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c | 2
> > > +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git
> > a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c
> > b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c
> > > index 464f9de38e52..fd324cc4a861 100644
> > > --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c
> > > +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c
> > > @@ -1462,7 +1462,7 @@ FileBufferSave (
> > >
> > >  if (Info != NULL && Info->Attribute & EFI_FILE_DIRECTORY) {
> > >StatusBarSetStatusString (L"Directory Can Not Be Saved");
> > > -  ShellCloseFile(FileHandle);
> > > +  ShellCloseFile ();
> > >FreePool(Info);
> > >return EFI_LOAD_ERROR;
> > >  }
> > >
> >
> > Reviewed-by: Philippe Mathieu-Daude 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47884): https://edk2.groups.io/g/devel/message/47884
Mute This Topic: https://groups.io/mt/34180234/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [Patch 05/10 V8] BaseTools: Enable Multiple Process AutoGen

2019-09-23 Thread dann frazier
On Wed, Aug 07, 2019 at 12:25:32PM +0800, Bob Feng wrote:
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1875
> 
> Assign the Module AutoGen tasks into multiple
> sub process.
> 
> Cc: Liming Gao 
> Signed-off-by: Bob Feng 
> ---
>  .../Source/Python/AutoGen/AutoGenWorker.py| 191 ++
>  BaseTools/Source/Python/AutoGen/DataPipe.py   |  17 +-
>  BaseTools/Source/Python/AutoGen/GenC.py   |   4 +-
>  .../Source/Python/AutoGen/ModuleAutoGen.py|   2 +-
>  .../Source/Python/AutoGen/PlatformAutoGen.py  |  16 +-
>  .../Source/Python/AutoGen/WorkspaceAutoGen.py |   6 +-
>  BaseTools/Source/Python/build/build.py| 125 
>  7 files changed, 306 insertions(+), 55 deletions(-)
>  create mode 100644 BaseTools/Source/Python/AutoGen/AutoGenWorker.py

I've bisected a regression building the ArmVirt architecture of
ArmVirtPkg/ArmVirtQemu.dsc to this commit.

$ build -a ARM -p ArmVirtPkg/ArmVirtQemu.dsc -t GCC49
[...]
"arm-linux-gnueabihf-gcc" -o 
/home/dannf/git/edk2.debug/Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdeModulePkg/Logo/LogoDxe/DEBUG/LogoDxe.dll
 -Wl,--emit-relocs -nostdlib -Wl,--gc-sections -u _ModuleEntryPoint 
-Wl,-e,_ModuleEntryPoint,-Map,/home/dannf/git/edk2.debug/Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdeModulePkg/Logo/LogoDxe/DEBUG/LogoDxe.map
 -z common-page-size=0x20 -Wl,--pic-veneer -Wl,--oformat=elf32-littlearm -z 
common-page-size=0x1000 
-Wl,--start-group,@/home/dannf/git/edk2.debug/Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdeModulePkg/Logo/LogoDxe/OUTPUT/static_library_files.lst,--end-group
 -mthumb -march=armv7-a -g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing 
-Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common -mlittle-endian 
-mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections 
-fdata-sections -fomit-frame-pointer -Wno-address -mthumb -mfloat-abi=soft 
-fno-pic -fno-pie -fstack-protector -mword-relocations -O0 
-DDISABLE_NEW_DEPRECATED_INTERFACES 
-Wl,--script=/home/dannf/git/edk2.debug/BaseTools/Scripts/GccBase.lds 
-Wl,--defsym=PECOFF_HEADER_SIZE=0x220
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld:
 error: source object 
/home/dannf/git/edk2.debug/Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint/OUTPUT/UefiDriverEntryPoint.lib(DriverEntryPoint.obj)
 has EABI version 5, but target 
/home/dannf/git/edk2.debug/Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdeModulePkg/Logo/LogoDxe/DEBUG/LogoDxe.dll
 has EABI version 0
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld:
 failed to merge target specific data of file 
/home/dannf/git/edk2.debug/Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdePkg/Library/UefiDriverEntryPoint/UefiDriverEntryPoint/OUTPUT/UefiDriverEntryPoint.lib(DriverEntryPoint.obj)
/usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld:
 error: source object 
/home/dannf/git/edk2.debug/Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdeModulePkg/Logo/LogoDxe/OUTPUT/LogoDxe.lib(AutoGen.obj)
 has EABI version 5, but target 
/home/dannf/git/edk2.debug/Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdeModulePkg/Logo/LogoDxe/DEBUG/LogoDxe.dll
 has EABI version 0
[...]

It looks like this maybe a side-effect of the ordering of the entries in
static_library_files.list. Previous to this commit, LogoDxehii.lib
would appear near the end of the file - now it is near the beginning.
Moving it back to the end of the file allows the linking to continue.

Also, is it expected that this does not report being an EABI5 object?
$ file 
Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdeModulePkg/Logo/LogoDxe/OUTPUT/LogoDxehii.lib
Build/ArmVirtQemu-ARM/DEBUG_GCC49/ARM/MdeModulePkg/Logo/LogoDxe/OUTPUT/LogoDxehii.lib:
 ELF 32-bit LSB relocatable, ARM, version 1 (ARM), not stripped

 -dann

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47883): https://edk2.groups.io/g/devel/message/47883
Mute This Topic: https://groups.io/mt/32779332/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v3 0/2] *** Add VS2019 Support ***

2019-09-23 Thread Liming Gao
Push 
6b80310f34199d1f62e45e40fa902734735091fa..670c903a68f214463f12c0c9619c162a0f342518

You can update BZ 2182 and close it. 

Thanks
Liming
>-Original Message-
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>Cheng, Ching JenX
>Sent: Thursday, September 19, 2019 4:52 PM
>To: devel@edk2.groups.io
>Subject: [edk2-devel] [PATCH v3 0/2] *** Add VS2019 Support ***
>
>REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2182
>
>In order to support VS2019 on EDK2, the following patches was modified def
>and batch files
>1. Add VS2019 x86/64 definitions on tools_def.template
>2. Add VS2019 support on toolsetup batches, and add version check with
>command vswhere
> Because VS2019 and VS2017 using the same vswhere to get the
>InstallationPath
>
>v2: In 01/02, add ARM/AARCH64/EBC Definitions, Combine VS2017_HOST and
>VS2019_HOST to VS_HOST
>v3: In 02/02, In BaseTools\set_vsprefix_envs.bat,
>move WINSDK10_PREFIX setting into VCToolsInstallDir check condition.
>
>Ching JenX Cheng (2):
>  Add VS2019 Toolchain def
>  Add VS2019 Support on ToolSetup Batches
>
> BaseTools/Conf/tools_def.template | 220
>+++
>+++
>+++
>---
> BaseTools/get_vsvars.bat  |  37 ++---
>
> BaseTools/set_vsprefix_envs.bat   |  86
>+++
>++-
> BaseTools/toolsetup.bat   |  16 +---
> edksetup.bat  |   6 --
> 5 files changed, 321 insertions(+), 44 deletions(-)
>
>--
>2.21.0.windows.1
>
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47882): https://edk2.groups.io/g/devel/message/47882
Mute This Topic: https://groups.io/mt/34197616/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-non-osi][PATCH V1 1/1] edk2-non-osi: Rename ClevoOpenBoardBinPkg to KabylakeOpenBoardBinPkg

2019-09-23 Thread Jeremy Soller
Reviewed-by: Jeremy Soller 

On Fri, Sep 20, 2019, at 12:39 PM, Kubacki, Michael A wrote:
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207
> 
>  * Renames the package to align with removal of ClevoOpenBoardPkg.
>  * Updates the KabylakeOpenBoardBinPkg maintainer list.
> 
> Cc: Nate DeSimone 
> Cc: Ankit Sinha 
> Cc: Jeremy Soller 
> Signed-off-by: Michael Kubacki 
> ---
>  Maintainers.txt
> |   3 +--
>  Platform/Intel/{ClevoOpenBoardBinPkg/N1xxWU => 
> KabylakeOpenBoardBinPkg/GalagoPro3}/Gop/Vbt.bin | Bin
>  2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt
> index 5759e4c..f72caa1 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -41,9 +41,8 @@ W: 
> https://github.com/tianocore/tianocore.github.io/wiki/Security
>  EDK II Packages:
>  
>  
> -Platform/Intel/ClevoOpenBoardBinPkg
> +Platform/Intel/KabylakeOpenBoardBinPkg
>  M: Michael Kubacki 
> -M: Ankit Sinha 
>  M: Nate DeSimone 
>  
>  Platform/Intel/CoffeelakeSiliconBinPkg
> diff --git a/Platform/Intel/ClevoOpenBoardBinPkg/N1xxWU/Gop/Vbt.bin 
> b/Platform/Intel/KabylakeOpenBoardBinPkg/GalagoPro3/Gop/Vbt.bin
> similarity index 100%
> rename from Platform/Intel/ClevoOpenBoardBinPkg/N1xxWU/Gop/Vbt.bin
> rename to Platform/Intel/KabylakeOpenBoardBinPkg/GalagoPro3/Gop/Vbt.bin
> -- 
> 2.16.2.windows.1
> 
> 
> 
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47881): https://edk2.groups.io/g/devel/message/47881
Mute This Topic: https://groups.io/mt/34233755/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms][PATCH V1 03/12] ClevoOpenBoardPkg: Remove global files and references

2019-09-23 Thread Jeremy Soller
Reviewed-by: Jeremy Soller 

On Fri, Sep 20, 2019, at 12:40 PM, Michael Kubacki wrote:
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207
> 
> Remove references to ClevoOpenBoardPkg external to the package
> since the package is now removed.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Ankit Sinha 
> Cc: Jeremy Soller 
> Signed-off-by: Michael Kubacki 
> ---
>  Maintainers.txt  |  5 -
>  Platform/Intel/Readme.md | 18 --
>  Readme.md|  1 -
>  3 files changed, 24 deletions(-)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt
> index c04cc23680..a30ee2f602 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -82,11 +82,6 @@ Platform/Intel/UserInterfaceFeaturePkg
>  M: Dandan Bi 
>  R: Liming Gao 
>  
> -Platform/Intel/ClevoOpenBoardPkg
> -M: Michael Kubacki 
> -M: Ankit Sinha 
> -M: Nate DeSimone 
> -
>  Platform/Intel/KabylakeOpenBoardPkg
>  M: Chasel Chiu 
>  M: Michael Kubacki 
> diff --git a/Platform/Intel/Readme.md b/Platform/Intel/Readme.md
> index 2575d4ec52..6a9b1d2e00 100644
> --- a/Platform/Intel/Readme.md
> +++ b/Platform/Intel/Readme.md
> @@ -53,7 +53,6 @@ A UEFI firmware implementation using MinPlatformPkg 
> is constructed using the fol
>  
>  
>  ## Board Support
> -* The `ClevoOpenBoardPkg` contains board implementations for Clevo 
> systems.
>  * The `KabylakeOpenBoardPkg` contains board implementations for Kaby 
> Lake systems.
>  * The `PurleyOpenBoardPkg` contains board implementations for Purley 
> systems.
>  * The `SimicsOpenBoardPkg` contains board implementations for the 
> Simics hardware simulator.
> @@ -84,15 +83,6 @@ A UEFI firmware implementation using MinPlatformPkg 
> is constructed using the fol
>  
> ||--||
>  | Simics Quick Start Package| Nehalem  
>   | SimicsOpenBoardPkg   | BoardX58Ich10  |
>  
> - System 76
> -
> -***Galago Pro Laptop***
> -
> -| Machine Name  | Supported Chipsets   
>   | BoardPkg | Board Name |
> -||--||
> -| galp2 (Clevo N130BU)  | Kaby Lake
>   | ClevoOpenBoardPkg| N1xxWU |
> -| galp3 & galp3-b (Clevo N1xxWU series) | Kaby Lake Refresh
>   | ClevoOpenBoardPkg| N1xxWU |
> -
>  ## Board Package Organization
>  The board package follows the standard EDK II package structure with 
> the following additional elements and guidelines:
>  * Only code usable across more than one board at the root level.
> @@ -226,11 +216,6 @@ return back to the minimum platform caller.
>|   ||--build_bios.py: Main build script. 
> Generic pre-build, build,
>|   || post-build, and clean 
> functions.
>|   ||
> -  |   ||--ClevoOpenBoardPkg
> -  |   |||--N1xxWU
> -  |   |||---build_config.cfg: 
> N1xxWU specific build
> -  |   ||  
> settings environment variables.
> -  |   ||
>|   ||--KabylakeOpenBoardPkg
>|   |||--KabylakeRvp3
>|   ||  |---build_config.cfg: 
> KabylakeRvp3 specific
> @@ -277,9 +262,6 @@ errors.
>  
>  ### **Known limitations**
>  
> -**ClevoOpenBoardPkg**
> -1. The firmware project has not been tested on the Galago Pro 3B.
> -
>  **KabylakeOpenBoardPkg**
>  1. This firmware project has only been tested for Microsoft Windows 10 
> x64 boot with AHCI mode and Integrated Graphic
> Device.
> diff --git a/Readme.md b/Readme.md
> index e4f211eee6..efdbe8523f 100644
> --- a/Readme.md
> +++ b/Readme.md
> @@ -225,7 +225,6 @@ they will be documented with the platform.
>  
>  ## Intel
>  ### [Minimum Platforms](Platform/Intel/Readme.md)
> -* [Clevo](Platform/Intel/ClevoOpenBoardPkg)
>  * [Kaby Lake](Platform/Intel/KabylakeOpenBoardPkg)
>  * [Purley](Platform/Intel/PurleyOpenBoardPkg)
>  * [Whiskey Lake](Platform/Intel/WhiskeylakeOpenBoardPkg)
> -- 
> 2.16.2.windows.1
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47880): https://edk2.groups.io/g/devel/message/47880
Mute This Topic: https://groups.io/mt/34233770/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms][PATCH V1 04/12] KabylakeOpenBoardPkg: Move policy update libs to KabylakeRvp3 board

2019-09-23 Thread Jeremy Soller
Reviewed-by: Jeremy Soller 

On Fri, Sep 20, 2019, at 12:40 PM, Kubacki, Michael A wrote:
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207
> 
> To prepare KabylakeOpenBoardPkg for multi-board support, the policy
> update libraries should be moved to the individual board directory.
> Prevously KabylakeOpenBoardPkg only supported the KabylakeRvp3 board
> and the policy update libraries were kept above the board directory
> level.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Ankit Sinha 
> Cc: Jeremy Soller 
> Signed-off-by: Michael Kubacki 
> ---
>  Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc  
>  | 6 
> +++---
>  Platform/Intel/KabylakeOpenBoardPkg/{ => 
> KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf
>  | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ => 
> KabylakeRvp3}/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSiliconPolicyUpdateLib.inf
>| 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ => 
> KabylakeRvp3}/Policy/Library/PeiSiliconPolicyUpdateLib/PeiSiliconPolicyUpdateLib.inf
>| 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ => 
> KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiPchPolicyUpdate.h
>  | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ => 
> KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSaPolicyUpdate.h
>   | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ => 
> KabylakeRvp3}/Policy/Library/DxeSiliconPolicyUpdateLib/DxeGopPolicyInit.h 
>  | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ => 
> KabylakeRvp3}/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSaPolicyInit.h  
>  | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ => 
> KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PcieDeviceTable.c
> | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ => 
> KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiFspMiscUpdUpdateLib.c
>  | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ => 
> KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiFspPolicyUpdateLib.c
>   | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ => 
> KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiPchPolicyUpdate.c
>  | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ => 
> KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiPchPolicyUpdatePreMem.c
>| 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ => 
> KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSaPolicyUpdate.c
>   | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ => 
> KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSaPolicyUpdatePreMem.c
> | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ => 
> KabylakeRvp3}/Policy/Library/DxeSiliconPolicyUpdateLib/DxeGopPolicyInit.c 
>  | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ => 
> KabylakeRvp3}/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSaPolicyUpdate.c
>  | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ => 
> KabylakeRvp3}/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSiliconPolicyUpdateLib.c
>  | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ => 
> KabylakeRvp3}/Policy/Library/PeiSiliconPolicyUpdateLib/PeiSiliconPolicyUpdateLib.c
>  | 0
>  19 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git 
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc 
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> index 813ca040a1..7090852192 100644
> --- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> @@ -127,13 +127,13 @@
>#
># Below library are used by FSP API mode
>#
> -  
> SiliconPolicyUpdateLib|$(PLATFORM_BOARD_PACKAGE)/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf
> +  
> SiliconPolicyUpdateLib|$(PROJECT)/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf
>
> SiliconPolicyInitLib|$(PLATFORM_SI_PACKAGE)/Library/PeiSiliconPolicyInitLibFsp/PeiSiliconPolicyInitLibFsp.inf
>  !else
>#
># Below library are used by FSP Dispatch mode and non-FSP build 
> (EDK2 build)
>#
> -  
> SiliconPolicyUpdateLib|$(PLATFORM_BOARD_PACKAGE)/Policy/Library/PeiSiliconPolicyUpdateLib/PeiSiliconPolicyUpdateLib.inf
> +  
> SiliconPolicyUpdateLib|$(PROJECT)/Policy/Library/PeiSiliconPolicyUpdateLib/PeiSiliconPolicyUpdateLib.inf
>
> SiliconPolicyInitLib|$(PLATFORM_SI_PACKAGE)/Library/PeiSiliconPolicyInitLibFsp/PeiSiliconPolicyInitLibFspAml.inf
>  !endif
>  
> @@ -196,7 +196,7 @@
>
> BoardAcpiTableLib|$(PLATFORM_PACKAGE)/Acpi/Library/MultiBoardAcpiSupportLib/DxeMultiBoardAcpiSupportLib.inf
>  
>
> 

Re: [edk2-devel] [edk2-platforms][PATCH V1 12/12] Add GalagoPro3 board details to global build and documentation

2019-09-23 Thread Jeremy Soller
Reviewed-by: Jeremy Soller 

On Fri, Sep 20, 2019, at 12:40 PM, Michael Kubacki wrote:
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207
> 
>  * Updates maintainers for the System 76 GalagoPro3 board
>  * Updated Readme.md with System 76 GalagoPro3 board details
>  * Adds the ability to build the GalagoPro3 board to build.cfg
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Ankit Sinha 
> Cc: Jeremy Soller 
> Signed-off-by: Michael Kubacki 
> ---
>  Maintainers.txt  |  3 ++
>  Platform/Intel/Readme.md | 44 +---
>  Platform/Intel/build.cfg |  1 +
>  3 files changed, 34 insertions(+), 14 deletions(-)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt
> index a30ee2f602..1260c8d246 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -87,6 +87,9 @@ M: Chasel Chiu 
>  M: Michael Kubacki 
>  M: Nate DeSimone 
>  
> +Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3
> +R: Jeremy Soller 
> +
>  Platform/Intel/MinPlatformPkg
>  M: Michael Kubacki 
>  M: Chasel Chiu 
> diff --git a/Platform/Intel/Readme.md b/Platform/Intel/Readme.md
> index 6a9b1d2e00..03fa4c2315 100644
> --- a/Platform/Intel/Readme.md
> +++ b/Platform/Intel/Readme.md
> @@ -83,6 +83,15 @@ A UEFI firmware implementation using MinPlatformPkg 
> is constructed using the fol
>  
> ||--||
>  | Simics Quick Start Package| Nehalem  
>   | SimicsOpenBoardPkg   | BoardX58Ich10  |
>  
> + System 76
> +
> +***Galago Pro Laptop***
> +
> +| Machine Name  | Supported Chipsets   
>   | BoardPkg | Board Name |
> +||--||
> +| galp2 | Kaby Lake
>   | KabylakeOpenBoardPkg | GalagoPro3 |
> +| galp3 & galp3-b   | Kaby Lake Refresh
>   | KabylakeOpenBoardPkg | GalagoPro3 |
> +
>  ## Board Package Organization
>  The board package follows the standard EDK II package structure with 
> the following additional elements and guidelines:
>  * Only code usable across more than one board at the root level.
> @@ -217,28 +226,31 @@ return back to the minimum platform caller.
>|   || post-build, and clean 
> functions.
>|   ||
>|   ||--KabylakeOpenBoardPkg
> -  |   |||--KabylakeRvp3
> -  |   ||  |---build_config.cfg: 
> KabylakeRvp3 specific
> -  |   ||  | 
> build settings, environment variables.
> -  |   ||  |---build_board.py: 
> Optional board-specific pre-build, build
> -  |   ||  and 
> clean post-build functions.
> +  |   ||   |--GalagoPro3
> +  |   ||   |   |---build_config.cfg: 
> System 76 Galago Pro 3 specific build
> +  |   ||   | 
> settings environment variables.
> +  |   ||   |--KabylakeRvp3
> +  |   ||   |---build_config.cfg: 
> KabylakeRvp3 specific
> +  |   ||   | build 
> settings, environment variables.
> +  |   ||   |---build_board.py: 
> Optional board-specific pre-build, build
> +  |   ||   and 
> clean post-build functions.
>|   ||
>|   ||--PurleyOpenBoardPkg
>|   ||   |--BoardMtOlympus
> -  |   |||---build_config.cfg: 
> BoardMtOlympus specific
> -  |   ||| 
> build settings, environment variables.
> -  |   |||---build_board.py: 
> Optional board-specific pre-build,
> -  |   ||build, 
> post-build and clean functions.
> +  |   ||   |---build_config.cfg: 
> BoardMtOlympus specific
> +  |   ||   | build 
> settings, environment variables.
> +  |   ||   |---build_board.py: 
> Optional board-specific pre-build,
> +  |   ||   build, 
> post-build and clean functions.
>|   ||
>|   ||--SimicsOpenBoardPkg
>

Re: [edk2-devel] [edk2-platforms][PATCH V1 07/12] KabylakeOpenBoardPkg: Add PeiSerialPortLibSpiFlash

2019-09-23 Thread Jeremy Soller
Reviewed-by: Jeremy Soller 

On Fri, Sep 20, 2019, at 12:40 PM, Michael Kubacki wrote:
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207
> 
> PeiSerialPortLibSpiFlash is currently used for early boot closed
> chassis debug on production systems such as the System 76 Galago Pro
> laptop. This change moves the library to KabylakeOpenBoardPkg from
> ClevoOpenBoardPkg since the Clevo package is being removes for
> code consolidation.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Ankit Sinha 
> Cc: Jeremy Soller 
> Signed-off-by: Michael Kubacki 
> ---
>  Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec   
>|   6 +
>  
> Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.inf
>  |  50 +++
>  
> Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.c
>| 320 
>  3 files changed, 376 insertions(+)
> 
> diff --git a/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec 
> b/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec
> index 68977d081e..383c34537d 100644
> --- a/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec
> @@ -29,6 +29,8 @@ gBoardModuleTokenSpaceGuid=  {0x72d1fff7, 
> 0xa42a, 0x4219, {0xb9, 0x9
>  
>  gTianoLogoGuid=  {0x7BB28B99, 0x61BB, 0x11D5, 
> {0x9A, 0x5D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D}}
>  
> +gSpiFlashDebugHobGuid =  {0xcaaaf418, 0x38a5, 0x4d49, 
> {0xbe, 0x74, 0xe6, 0x06, 0xe4, 0x02, 0x6d, 0x25}}
> +
>  gTbtInfoHobGuid   =  {0x74a81eaa, 0x033c, 0x4783, 
> {0xbe, 0x2b, 0x84, 0x85, 0x74, 0xa6, 0x97, 0xb7}}
>  
>  gPlatformModuleTokenSpaceGuid =  {0x69d13bf0, 0xaf91, 0x4d96, 
> {0xaa, 0x9f, 0x21, 0x84, 0xc5, 0xce, 0x3b, 0xc0}}
> @@ -65,6 +67,10 @@ 
> gBoardModuleTokenSpaceGuid.PcdSwSmiDTbtEnumerate|0xF7|UINT8|0x00110
>  
>  gBoardModuleTokenSpaceGuid.PcdSmcExtSmiBitPosition|0x01|UINT8|0x9015
>  
> +gBoardModuleTokenSpaceGuid.PcdFlashNvDebugMessageBase|0x|UINT32|0x9030
> +gBoardModuleTokenSpaceGuid.PcdFlashNvDebugMessageSize|0x|UINT32|0x9031
> +gBoardModuleTokenSpaceGuid.PcdFlashNvDebugMessageOffset|0x|UINT32|0x9032
> +
>  [PcdsDynamic]
>  
>  # Board GPIO Table
> diff --git 
> a/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.inf
>  
> b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.inf
> new file mode 100644
> index 00..ed93d0785f
> --- /dev/null
> +++ 
> b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.inf
> @@ -0,0 +1,50 @@
> +### @file
> +# Component description file for Serial I/O Port library to write to 
> SPI flash.
> +#
> +# Copyright (c) 2019, Intel Corporation. All rights reserved.
> +#
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +##
> +
> +[Defines]
> +  INF_VERSION= 0x00010005
> +  BASE_NAME  = PeiSerialPortLibFlash
> +  FILE_GUID  = 35A3BA89-04BE-409C-A3CA-DEF6B510F80F
> +  VERSION_STRING = 1.1
> +  MODULE_TYPE= PEIM
> +  LIBRARY_CLASS  = SerialPortLib|PEIM PEI_CORE
> +#
> +# The following information is for reference only and not required by 
> the build tools.
> +#
> +# VALID_ARCHITECTURES = IA32 X64 IPF
> +#
> +
> +[LibraryClasses]
> +  BaseLib
> +  BaseMemoryLib
> +  HobLib
> +  PcdLib
> +  PeiServicesLib
> +  SpiLib
> +
> +[Packages]
> +  MdePkg/MdePkg.dec
> +  MdeModulePkg/MdeModulePkg.dec
> +  MinPlatformPkg/MinPlatformPkg.dec
> +  KabylakeSiliconPkg/SiPkg.dec
> +  KabylakeOpenBoardPkg/OpenBoardPkg.dec
> +
> +[Sources]
> +  PeiSerialPortLibSpiFlash.c
> +
> +[Ppis]
> +  gPchSpiPpiGuid
> +
> +[Guids]
> +  gSpiFlashDebugHobGuid
> +
> +[Pcd]
> +  gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaBaseAddress   ## 
> CONSUMES
> +  gBoardModuleTokenSpaceGuid.PcdFlashNvDebugMessageBase   ## 
> CONSUMES
> +  gBoardModuleTokenSpaceGuid.PcdFlashNvDebugMessageSize   ## 
> CONSUMES
> diff --git 
> a/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.c
>  
> b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.c
> new file mode 100644
> index 00..0230149a38
> --- /dev/null
> +++ 
> b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.c
> @@ -0,0 +1,320 @@
> +/** @file
> +  Serial I/O Port library implementation for output to SPI flash
> +
> +Copyright (c) 2019, Intel Corporation. All rights reserved.
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +typedef struct {
> +  PCH_SPI_PPI 

Re: [edk2-devel] [edk2-platforms][PATCH V1 05/12] KabylakeOpenBoardPkg: Move EcCommands.h to KabylakeRvp3 board

2019-09-23 Thread Jeremy Soller
Reviewed-by: Jeremy Soller 

On Fri, Sep 20, 2019, at 12:40 PM, Michael Kubacki wrote:
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207
> 
> EC command details may vary across Kaby Lake boards. This change moves
> this set of EC commands to the KabylakeRvp3 directory since these
> commands are specifically used by that board at this time.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Ankit Sinha 
> Cc: Jeremy Soller 
> Signed-off-by: Michael Kubacki 
> ---
>  Platform/Intel/KabylakeOpenBoardPkg/{ => KabylakeRvp3}/Include/EcCommands.h 
> | 0
>  1 file changed, 0 insertions(+), 0 deletions(-)
> 
> diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Include/EcCommands.h 
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Include/EcCommands.h
> similarity index 100%
> rename from Platform/Intel/KabylakeOpenBoardPkg/Include/EcCommands.h
> rename to 
> Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Include/EcCommands.h
> -- 
> 2.16.2.windows.1
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47876): https://edk2.groups.io/g/devel/message/47876
Mute This Topic: https://groups.io/mt/34233773/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms][PATCH V1 11/12] KabylakeOpenBoardPkg/GalagoPro3: Add build files

2019-09-23 Thread Jeremy Soller
Reviewed-by: Jeremy Soller 

On Fri, Sep 20, 2019, at 12:40 PM, Kubacki, Michael A wrote:
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207
> 
>  * Adds files required to build the GalagoPro3 board to the board
>directory.
>  * Updates KabylakeOpenBoardPkg/OpenBoardPkg.dec to reference
>the new GalagoPro3 board directory.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Ankit Sinha 
> Cc: Jeremy Soller 
> Signed-off-by: Michael Kubacki 
> ---
>  Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec   
> |   4 +-
>  Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> | 385 +++
>  
> Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgBuildOption.dsc
>  | 151 +
>  Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgConfig.dsc  
> | 132 
>  Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc 
> | 265 
>  
> Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Include/Fdf/FlashMapInclude.fdf
>  |  48 ++
>  Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf
> | 716 
>  Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg
> |  33 +
>  8 files changed, 1732 insertions(+), 2 deletions(-)
> 
> diff --git a/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec 
> b/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec
> index 383c34537d..bdaf728af1 100644
> --- a/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec
> @@ -1,5 +1,5 @@
>  ## @file
> -# Module describe the entire platform configuration.
> +# Declaration file for Kaby Lake based boards.
>  #
>  # The DEC files are used by the utilities that parse DSC and
>  # INF files to generate AutoGen.c and AutoGen.h files
> @@ -20,6 +20,7 @@ PACKAGE_GUID = 0A8BA6E8-C8AC-4AC1-87AC-52772FA6AE5E
>  
>  [Includes]
>  Include
> +GalagoPro3/Include
>  KabylakeRvp3/Include
>  Features/Tbt/Include
>  
> @@ -303,7 +304,6 @@ 
> gBoardModuleTokenSpaceGuid.PcdIoExpanderPresent|FALSE|BOOLEAN|0x00EC
>  
>gBoardModuleTokenSpaceGuid.PcdAcpiGnvsAddress|0|UINT64|0x4013
>  
> -  # gIntelPeiGraphicsVbtGuid =  {0x4ad46122, 0xffeb, 0x4a52, {0xbf, 
> 0xb0, 0x51, 0x8c, 0xfc, 0xa0, 0x2d, 0xb0}}
>gBoardModuleTokenSpaceGuid.PcdGraphicsVbtGuid|{0x22, 0x61, 0xd4, 
> 0x4a, 0xeb, 0xff, 0x52, 0x4a, 0xbf, 0xb0, 0x51, 0x8c, 0xfc, 0xa0, 0x2d, 
> 0xb0}|VOID*|0x4014
>  
>  [PcdsDynamicEx]
> diff --git 
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc 
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> new file mode 100644
> index 00..3e7f5c6b8a
> --- /dev/null
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> @@ -0,0 +1,385 @@
> +## @file
> +#  System 76 GalagoPro3 board description file.
> +#
> +# Copyright (c) 2019, Intel Corporation. All rights reserved.
> +#
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +##
> +[Defines]
> +  #
> +  # Set platform specific package/folder name, same as passed from 
> PREBUILD script.
> +  # PLATFORM_PACKAGE would be the same as PLATFORM_NAME as well as 
> package build folder
> +  # DEFINE only takes effect at R9 DSC and FDF.
> +  #
> +  DEFINE  PLATFORM_PACKAGE= MinPlatformPkg
> +  DEFINE  PLATFORM_SI_PACKAGE = KabylakeSiliconPkg
> +  DEFINE  PLATFORM_SI_BIN_PACKAGE = KabylakeSiliconBinPkg
> +  DEFINE  PLATFORM_FSP_BIN_PACKAGE= KabylakeFspBinPkg
> +  DEFINE  PLATFORM_BOARD_PACKAGE  = KabylakeOpenBoardPkg
> +  DEFINE  BOARD   = GalagoPro3
> +  DEFINE  PROJECT = 
> $(PLATFORM_BOARD_PACKAGE)/$(BOARD)
> +
> +  #
> +  # Platform On/Off features are defined here
> +  #
> +  !include OpenBoardPkgConfig.dsc
> +
> +
> +#
> +# Defines Section - statements that will be processed to create a 
> Makefile.
> +#
> +
> +[Defines]
> +  PLATFORM_NAME   = $(PLATFORM_PACKAGE)
> +  PLATFORM_GUID   = 
> 7324F33D-4E96-4F8B-A550-544DE6162AB7
> +  PLATFORM_VERSION= 0.1
> +  DSC_SPECIFICATION   = 0x00010005
> +  OUTPUT_DIRECTORY= Build/$(PROJECT)
> +  SUPPORTED_ARCHITECTURES = IA32|X64
> +  BUILD_TARGETS   = DEBUG|RELEASE
> +  SKUID_IDENTIFIER= ALL
> +
> +
> +  FLASH_DEFINITION= $(PROJECT)/OpenBoardPkg.fdf
> +
> +  FIX_LOAD_TOP_MEMORY_ADDRESS = 0x0
> +  DEFINE   TOP_MEMORY_ADDRESS = 0x0
> +
> +  #
> +  # Default value for OpenBoardPkg.fdf use
> +  #
> +  DEFINE BIOS_SIZE_OPTION = SIZE_60
> +
> 

Re: [edk2-devel] [edk2-platforms][PATCH V1 10/12] KabylakeOpenBoardPkg/GalagoPro3: Add modules

2019-09-23 Thread Jeremy Soller
Reviewed-by: Jeremy Soller 

On Fri, Sep 20, 2019, at 12:40 PM, Michael Kubacki wrote:
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207
> 
> Adds the modules used for System 76 Galago Pro 3 board support.
> 
> This override should be removed in a future cleanup change. That is
> outside the scope of this change which is to move the contents from
> ClevoOpenBoardPkg/N1xxWU to KabylakeOpenBoardPkg/GalagoPro3.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Ankit Sinha 
> Cc: Jeremy Soller 
> Signed-off-by: Michael Kubacki 
> ---
>  
> Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
>  |  67 ++
>  
> Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
>| 640 
>  2 files changed, 707 insertions(+)
> 
> diff --git 
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
>  
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
> new file mode 100644
> index 00..76dd67d1a8
> --- /dev/null
> +++ 
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
> @@ -0,0 +1,67 @@
> +### @file
> +# Component information file for the Platform Init Pre-Memory PEI 
> module.
> +#
> +# Copyright (c) 2019, Intel Corporation. All rights reserved.
> +#
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +###
> +
> +[Defines]
> +  INF_VERSION= 0x00010017
> +  BASE_NAME  = PlatformInitPreMem
> +  FILE_GUID  = 611D-F78F-4FB9-B868-55907F169280
> +  VERSION_STRING = 1.0
> +  MODULE_TYPE= PEIM
> +  ENTRY_POINT= PlatformInitPreMemEntryPoint
> +
> +[LibraryClasses]
> +  BaseMemoryLib
> +  BoardInitLib
> +  DebugLib
> +  HobLib
> +  IoLib
> +  MemoryAllocationLib
> +  MtrrLib
> +  PeimEntryPoint
> +  PeiServicesLib
> +  ReportFvLib
> +  TestPointCheckLib
> +  TimerLib
> +
> +[Packages]
> +  MinPlatformPkg/MinPlatformPkg.dec
> +  MdeModulePkg/MdeModulePkg.dec
> +  MdePkg/MdePkg.dec
> +  UefiCpuPkg/UefiCpuPkg.dec
> +
> +[Pcd]
> +  gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode  ## 
> CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaBaseAddress## 
> CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize   ## 
> CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit  ## 
> CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit## 
> CONSUMES
> +
> +[FixedPcd]
> +  gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiAcpiReclaimMemorySize  
> ## CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiAcpiNvsMemorySize  
> ## CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiReservedMemorySize 
> ## CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiRtDataMemorySize   
> ## CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiRtCodeMemorySize   
> ## CONSUMES
> +
> +[Sources]
> +  PlatformInitPreMem.c
> +
> +[Ppis]
> +  gEfiPeiMemoryDiscoveredPpiGuid
> +  gEfiPeiMasterBootModePpiGuid  ## PRODUCES
> +  gEfiPeiBootInRecoveryModePpiGuid  ## PRODUCES
> +  gEfiPeiReadOnlyVariable2PpiGuid
> +  gPeiBaseMemoryTestPpiGuid
> +  gPeiPlatformMemorySizePpiGuid
> +
> +[Guids]
> +  gEfiMemoryTypeInformationGuid
> +
> +[Depex]
> +  gEfiPeiReadOnlyVariable2PpiGuid
> diff --git 
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
>  
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
> new file mode 100644
> index 00..b784026c1b
> --- /dev/null
> +++ 
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
> @@ -0,0 +1,640 @@
> +/** @file
> +  Source code file for Platform Init Pre-Memory PEI module
> +
> +Copyright (c) 2019, Intel Corporation. All rights reserved.
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +EFI_STATUS
> +EFIAPI
> +MemoryDiscoveredPpiNotifyCallback (
> +  IN CONST EFI_PEI_SERVICES  **PeiServices,
> +  IN EFI_PEI_NOTIFY_DESCRIPTOR   *NotifyDescriptor,
> +  IN VOID*Ppi
> +  );
> +
> +EFI_STATUS
> +EFIAPI
> 

Re: [edk2-devel] [edk2-platforms][PATCH V1 06/12] KabylakeOpenBoardPkg: Move flash map to board

2019-09-23 Thread Jeremy Soller
Reviewed-by: Jeremy Soller 

On Fri, Sep 20, 2019, at 12:40 PM, Michael Kubacki wrote:
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207
> 
> The flash map currently in KabylakeOpenBoardPkg is only
> applicable to the KabylakeRvp3 board. This change moves
> the flash map to that board directory to prepare for other
> boards to reside in the package.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Ankit Sinha 
> Cc: Jeremy Soller 
> Signed-off-by: Michael Kubacki 
> ---
>  Platform/Intel/KabylakeOpenBoardPkg/{ => 
> KabylakeRvp3}/Include/Fdf/FlashMapInclude.fdf | 0
>  Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf  
> | 2 +-
>  Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg  
> | 2 +-
>  3 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git 
> a/Platform/Intel/KabylakeOpenBoardPkg/Include/Fdf/FlashMapInclude.fdf 
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Include/Fdf/FlashMapInclude.fdf
> similarity index 100%
> rename from 
> Platform/Intel/KabylakeOpenBoardPkg/Include/Fdf/FlashMapInclude.fdf
> rename to 
> Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Include/Fdf/FlashMapInclude.fdf
> diff --git 
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf 
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
> index 7267d478ad..2b8eab36a1 100644
> --- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
> @@ -8,7 +8,7 @@
>  ##
>  
>  [Defines]
> -   !include $(PLATFORM_BOARD_PACKAGE)/Include/Fdf/FlashMapInclude.fdf
> +   !include $(PROJECT)/Include/Fdf/FlashMapInclude.fdf
>  
>  
> 
>  #
> diff --git 
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg 
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
> index ab1a9a61c2..78f808bfaf 100644
> --- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
> @@ -13,7 +13,7 @@ openssl_path =
>  PLATFORM_BOARD_PACKAGE = KabylakeOpenBoardPkg
>  PROJECT = KabylakeOpenBoardPkg/KabylakeRvp3
>  BOARD = KabylakeRvp3
> -FLASH_MAP_FDF = KabylakeOpenBoardPkg/Include/Fdf/FlashMapInclude.fdf
> +FLASH_MAP_FDF = 
> KabylakeOpenBoardPkg/KabylakeRvp3/Include/Fdf/FlashMapInclude.fdf
>  PROJECT_DSC = KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
>  BOARD_PKG_PCD_DSC = 
> KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.dsc
>  ADDITIONAL_SCRIPTS = KabylakeOpenBoardPkg/KabylakeRvp3/build_board.py
> -- 
> 2.16.2.windows.1
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47871): https://edk2.groups.io/g/devel/message/47871
Mute This Topic: https://groups.io/mt/34233774/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms][PATCH V1 08/12] KabylakeOpenBoardPkg/GalagoPro3: Add headers

2019-09-23 Thread Jeremy Soller
Reviewed-by: Jeremy Soller 

On Fri, Sep 20, 2019, at 12:40 PM, Kubacki, Michael A wrote:
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207
> 
> Adds the Galago Pro 3 board ID header file.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Ankit Sinha 
> Cc: Jeremy Soller 
> Signed-off-by: Michael Kubacki 
> ---
>  Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Include/GalagoPro3Id.h 
> | 13 +
>  1 file changed, 13 insertions(+)
> 
> diff --git 
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Include/GalagoPro3Id.h 
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Include/GalagoPro3Id.h
> new file mode 100644
> index 00..5999f18edf
> --- /dev/null
> +++ 
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Include/GalagoPro3Id.h
> @@ -0,0 +1,13 @@
> +/** @file
> +
> +Copyright (c) 2019, Intel Corporation. All rights reserved.
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef _GALAGO_PRO_3_ID_H_
> +#define _GALAGO_PRO_3_ID_H_
> +
> +#define BoardIdGalagoPro3 0x60
> +
> +#endif
> -- 
> 2.16.2.windows.1
> 
> 
> 
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47870): https://edk2.groups.io/g/devel/message/47870
Mute This Topic: https://groups.io/mt/34233776/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms][PATCH V1 1/1] ClevoOpenBoardPkg/N1xxWU: Enable Synaptics touchpad support in OS

2019-09-23 Thread Jeremy Soller
Reviewed-by: Jeremy Soller 

On Thu, Sep 19, 2019, at 8:15 PM, Kubacki, Michael A wrote:
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2068
> 
> Adds the ACPI device for the Synaptics touchpad. With this change,
> the touchpad device is functional in the OS.
> 
> Cc: Ankit Sinha 
> Cc: Nate DeSimone 
> Signed-off-by: Michael Kubacki 
> ---
>  
> Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardAcpiLib/DxeN1xxWUAcpiTableLib.c
>  | 2 +-
>  Platform/Intel/ClevoOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/LpcB.asl   
>   | 6 +++---
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git 
> a/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardAcpiLib/DxeN1xxWUAcpiTableLib.c
>  
> b/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardAcpiLib/DxeN1xxWUAcpiTableLib.c
> index 96a3232fe5..d309bf4e1d 100644
> --- 
> a/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardAcpiLib/DxeN1xxWUAcpiTableLib.c
> +++ 
> b/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardAcpiLib/DxeN1xxWUAcpiTableLib.c
> @@ -54,7 +54,7 @@ N1xxWUUpdateGlobalNvs (
>//
>mGlobalNvsArea.Area->LowPowerS0Idle = PcdGet8 (PcdLowPowerS0Idle);
>  
> -  mGlobalNvsArea.Area->Ps2MouseEnable = FALSE;
> +  mGlobalNvsArea.Area->Ps2MouseEnable = PcdGet8 (PcdPs2KbMsEnable);
>mGlobalNvsArea.Area->Ps2KbMsEnable  = PcdGet8 (PcdPs2KbMsEnable);
>  }
>  
> diff --git 
> a/Platform/Intel/ClevoOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/LpcB.asl 
> b/Platform/Intel/ClevoOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/LpcB.asl
> index 6fbaf3a97f..3ef9aed1e6 100644
> --- a/Platform/Intel/ClevoOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/LpcB.asl
> +++ b/Platform/Intel/ClevoOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/LpcB.asl
> @@ -55,10 +55,10 @@ scope (\_SB.PCI0.LPCB) {
>  
>}
>  
> -  Device(PS2M)// PS/2 Mouse
> +  Device(SYNM)// Synaptics Mouse
>{
> -Name(_HID,"MSFT0003")
> -Name(_CID,EISAID("PNP0F03"))
> +Name(_HID,"SYN1221")
> +Name(_CID,EISAID("PNP0F13"))
>  
>  Method(_STA)
>  {
> -- 
> 2.16.2.windows.1
> 
> 
> 
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47868): https://edk2.groups.io/g/devel/message/47868
Mute This Topic: https://groups.io/mt/34207602/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms][PATCH V1 01/12] Platform/Intel: Remove N1xxWU board build option

2019-09-23 Thread Jeremy Soller
Reviewed-by: Jeremy Soller 

On Fri, Sep 20, 2019, at 12:40 PM, Kubacki, Michael A wrote:
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207
> 
> The N1xxWU board contents will be moved to KabylakeOpenBoardPkg
> to reduce code duplication between ClevoOpenBoardPkg and
> KabylakeOpenBoardPkg.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Ankit Sinha 
> Cc: Jeremy Soller 
> Signed-off-by: Michael Kubacki 
> ---
>  Platform/Intel/build.cfg | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/Platform/Intel/build.cfg b/Platform/Intel/build.cfg
> index 75cb446aa5..04e8f4fa64 100644
> --- a/Platform/Intel/build.cfg
> +++ b/Platform/Intel/build.cfg
> @@ -55,6 +55,4 @@ NUMBER_OF_PROCESSORS = 0
>  BoardMtOlympus = PurleyOpenBoardPkg/BoardMtOlympus/build_config.cfg
>  BoardX58Ich10 = SimicsOpenBoardPkg/BoardX58Ich10/build_config.cfg
>  KabylakeRvp3 = KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
> -N1xxWU = ClevoOpenBoardPkg/N1xxWU/build_config.cfg
>  WhiskeylakeURvp = WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.cfg
> -
> -- 
> 2.16.2.windows.1
> 
> 
> 
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47867): https://edk2.groups.io/g/devel/message/47867
Mute This Topic: https://groups.io/mt/34233769/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms][PATCH V1 01/12] Platform/Intel: Remove N1xxWU board build option

2019-09-23 Thread Sinha, Ankit
Reviewed-by: Ankit Sinha 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Kubacki, Michael 
A
Sent: Friday, September 20, 2019 11:40 AM
To: devel@edk2.groups.io
Cc: Chiu, Chasel ; Desimone, Nathaniel L 
; Sinha, Ankit ; Jeremy 
Soller 
Subject: [edk2-devel] [edk2-platforms][PATCH V1 01/12] Platform/Intel: Remove 
N1xxWU board build option

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207

The N1xxWU board contents will be moved to KabylakeOpenBoardPkg to reduce code 
duplication between ClevoOpenBoardPkg and KabylakeOpenBoardPkg.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Ankit Sinha 
Cc: Jeremy Soller 
Signed-off-by: Michael Kubacki 
---
 Platform/Intel/build.cfg | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Platform/Intel/build.cfg b/Platform/Intel/build.cfg index 
75cb446aa5..04e8f4fa64 100644
--- a/Platform/Intel/build.cfg
+++ b/Platform/Intel/build.cfg
@@ -55,6 +55,4 @@ NUMBER_OF_PROCESSORS = 0  BoardMtOlympus = 
PurleyOpenBoardPkg/BoardMtOlympus/build_config.cfg
 BoardX58Ich10 = SimicsOpenBoardPkg/BoardX58Ich10/build_config.cfg
 KabylakeRvp3 = KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
-N1xxWU = ClevoOpenBoardPkg/N1xxWU/build_config.cfg
 WhiskeylakeURvp = WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.cfg
-
--
2.16.2.windows.1





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47866): https://edk2.groups.io/g/devel/message/47866
Mute This Topic: https://groups.io/mt/34233769/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms][PATCH V1 1/1] ClevoOpenBoardPkg/N1xxWU: Enable Synaptics touchpad support in OS

2019-09-23 Thread Sinha, Ankit
Reviewed-by: Ankit Sinha 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Kubacki, Michael 
A
Sent: Thursday, September 19, 2019 7:16 PM
To: devel@edk2.groups.io
Cc: Sinha, Ankit ; Desimone, Nathaniel L 

Subject: [edk2-devel] [edk2-platforms][PATCH V1 1/1] ClevoOpenBoardPkg/N1xxWU: 
Enable Synaptics touchpad support in OS

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2068

Adds the ACPI device for the Synaptics touchpad. With this change, the touchpad 
device is functional in the OS.

Cc: Ankit Sinha 
Cc: Nate DeSimone 
Signed-off-by: Michael Kubacki 
---
 
Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardAcpiLib/DxeN1xxWUAcpiTableLib.c
 | 2 +-
 Platform/Intel/ClevoOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/LpcB.asl   
  | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardAcpiLib/DxeN1xxWUAcpiTableLib.c
 
b/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardAcpiLib/DxeN1xxWUAcpiTableLib.c
index 96a3232fe5..d309bf4e1d 100644
--- 
a/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardAcpiLib/DxeN1xxWUAcpiTableLib.c
+++ b/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardAcpiLib/DxeN1
+++ xxWUAcpiTableLib.c
@@ -54,7 +54,7 @@ N1xxWUUpdateGlobalNvs (
   //
   mGlobalNvsArea.Area->LowPowerS0Idle = PcdGet8 (PcdLowPowerS0Idle);
 
-  mGlobalNvsArea.Area->Ps2MouseEnable = FALSE;
+  mGlobalNvsArea.Area->Ps2MouseEnable = PcdGet8 (PcdPs2KbMsEnable);
   mGlobalNvsArea.Area->Ps2KbMsEnable  = PcdGet8 (PcdPs2KbMsEnable);
 }
 
diff --git a/Platform/Intel/ClevoOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/LpcB.asl 
b/Platform/Intel/ClevoOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/LpcB.asl
index 6fbaf3a97f..3ef9aed1e6 100644
--- a/Platform/Intel/ClevoOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/LpcB.asl
+++ b/Platform/Intel/ClevoOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/LpcB.asl
@@ -55,10 +55,10 @@ scope (\_SB.PCI0.LPCB) {
 
   }
 
-  Device(PS2M)// PS/2 Mouse
+  Device(SYNM)// Synaptics Mouse
   {
-Name(_HID,"MSFT0003")
-Name(_CID,EISAID("PNP0F03"))
+Name(_HID,"SYN1221")
+Name(_CID,EISAID("PNP0F13"))
 
 Method(_STA)
 {
--
2.16.2.windows.1





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47865): https://edk2.groups.io/g/devel/message/47865
Mute This Topic: https://groups.io/mt/34207602/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [Qemu-devel] [PATCH 1/2] q35: implement 128K SMRAM at default SMBASE address

2019-09-23 Thread Laszlo Ersek
On 09/20/19 11:28, Laszlo Ersek wrote:
> On 09/20/19 10:28, Igor Mammedov wrote:
>> On Thu, 19 Sep 2019 19:02:07 +0200
>> "Laszlo Ersek"  wrote:
>>
>>> Hi Igor,
>>>
>>> (+Brijesh)
>>>
>>> long-ish pondering ahead, with a question at the end.
>> [...]
>>
>>> Finally: can you please remind me why we lock down 128KB (32 pages) at
>>> 0x3_, and not just half of that? What do we need the range at
>>> [0x4_..0x4_] for?
>>
>>
>> If I recall correctly, CPU consumes 64K of save/restore area.
>> The rest 64K are temporary RAM for using in SMI relocation handler,
>> if it's possible to get away without it then we can drop it and
>> lock only 64K required for CPU state. It won't help with SEV
>> conflict though as it's in the first 64K.
> 
> OK. Let's go with 128KB for now. Shrinking the area is always easier
> than growing it.
> 
>> On QEMU side,  we can drop black-hole approach and allocate
>> dedicated SMRAM region, which explicitly gets mapped into
>> RAM address space and after SMI hanlder initialization, gets
>> unmapped (locked). So that SMRAM would be accessible only
>> from SMM context. That way RAM at 0x3 could be used as
>> normal when SMRAM is unmapped.
> 
> I prefer the black-hole approach, introduced in your current patch
> series, if it can work. Way less opportunity for confusion.
> 
> I've started work on the counterpart OVMF patches; I'll report back.

I've got good results. For this (1/2) QEMU patch:

Tested-by: Laszlo Ersek 

I tested the following scenarios. In every case, I verified the OVMF
log, and also the "info mtree" monitor command's result (i.e. whether
"smbase-blackhole" / "smbase-window" were disabled or enabled). Mostly,
I diffed these text files between the test scenarios (looking for
desired / undesired differences). In the Linux guests, I checked /
compared the dmesg too (wrt. the UEFI memmap).

- unpatched OVMF (regression test), Fedora guest, normal boot and S3

- patched OVMF, but feature disabled with "-global mch.smbase-smram=off"
(another regression test), Fedora guest, normal boot and S3

- patched OVMF, feature enabled, Fedora and various Windows guests
(win7, win8, win10 families, client/server), normal boot and S3

- a subset of the above guests, with S3 disabled (-global
  ICH9-LPC.disable_s3=1), and obviously S3 resume not tested

SEV: used 5.2-ish Linux guest, with S3 disabled (no support under SEV
for that now):

- unpatched OVMF (regression test), normal boot

- patched OVMF but feature disabled on the QEMU cmdline (another
regression test), normal boot

- patched OVMF, feature enabled, normal boot.

I plan to post the OVMF patches tomorrow, for discussion.

(It's likely too early to push these QEMU / edk2 patches right now -- we
don't know yet if this path will take us to the destination. For now, it
certainly looks great.)

Thanks
Laszlo

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47864): https://edk2.groups.io/g/devel/message/47864
Mute This Topic: https://groups.io/mt/34201782/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [RFC] EDK II Continuous Integration Phase 1

2019-09-23 Thread Michael D Kinney
Hi Sean,

For host based tests, I agree that VS2017 or VS2019
would be a good choice.  Pick the one with the best
coverage and easiest for developers to get feedback on
the test results and test coverage.  That may be sufficient
for automated CI tests.  Enabling other tool chains for
host based testing will be required to support developers
that implement unit tests and want to test them locally
before adding to the automated CI tests.

For build tests, I think we need VS2015, VS2017, GCC,
and XCODE5.  We can add VS2019 if there is a request to make
that one of the fully validated tool chains for EDK II.
For pre-commit gates, we could choose to do build tests of
only the libs/modules touched by the patch series.  Then 
perform complete package/platform build tests in a
Daily/Weekly/Release scope.

We need to update the RFC with the specific tool chains and
tool versions for both Host Based tests and Code Compilation
Tests.  They are not the same.

Thanks,

Mike

> -Original Message-
> From: Sean Brogan 
> Sent: Friday, September 20, 2019 2:30 PM
> To: Kinney, Michael D ;
> devel@edk2.groups.io; r...@edk2.groups.io; Kinney,
> Michael D 
> Cc: Bret Barkelew 
> Subject: RE: [edk2-devel] [RFC] EDK II Continuous
> Integration Phase 1
> 
> Currently it is building on Windows with VS2019.
> VS2017 would be trivial but not worth it in my
> perspective given how aligned the two are.   If you
> really wanted to do a weekly or nightly build it could
> be added to that but I have been focused on a PR build.
> I have a pipeline for GCC on linux.  It doesn't'
> support host based unit tests but I am working to get
> the rest of the tests running.
> I do not have a pipeline for Mac or LLVM/Clang.  That
> would be next and I think your files below should help.
> 
> To date we use PYTOOLs features to install our extra
> tools.  This makes it super easy and works for both
> local and server based builds.  It gives strong
> versioning and management of that.  It also tracks
> those versions and you can see them on every build in
> the Built Tool Report artifact.   It can be downloaded
> here for html version.
> https://dev.azure.com/tianocore/edk2-ci-
> play/_build/results?buildId=803=artifacts.
> BUILD_TOOL_REPORT.html
> 
> Here it is pasted as plain text below.  You can see the
> iasl and nasm versions here.
> 
> Key   Value   Type
> TOOL_CHAIN_TAGVS2019  TOOL
> VC Version14.22.27905 TOOL
> d:\a\1\s\Conf\build_rule.txt  1.04INFO
> d:\a\1\s\Conf\target.txt  1.03INFO
> d:\a\1\s\Conf\tools_def.txt   1.22INFO
> iasl  20190215.0.0INFO
> Mu-Basetools  2019.03.1   INFO
> mu_nasm   2.14.02 INFO
> 
> 
> Hope that helps.
> 
> I would be happy to queue up this topic for next design
> meeting and open it up to questions?  I hope others
> would take a look prior to meeting.
> 
> Thanks
> Sean
> 
> 
> 
> -Original Message-
> From: Kinney, Michael D 
> Sent: Thursday, September 19, 2019 2:56 PM
> To: devel@edk2.groups.io; Sean Brogan
> ; r...@edk2.groups.io;
> Kinney, Michael D 
> Cc: Bret Barkelew 
> Subject: RE: [edk2-devel] [RFC] EDK II Continuous
> Integration Phase 1
> 
> Hi Sean,
> 
> Which OS/Compiler configurations are currently enabled
> for the Code Compilation Test?
> 
> I have been working on enabling multiple OS/Compiler
> configurations in Azure Pipelines.  There are some
> tools that need to be installed for each of these
> environments.
> Examples include NASM, iASL, Python.
> 
> For the work you have done, how are these extra tools
> installed?  Is it in the YML files or in the Python
> scripts.
> 
> One critical task is to identify the tools and their
> specific versions that the CI system is configured to
> use.
> These configurations should be documented in a Wiki
> page and updated as new tools are released and adopted
> by EDK II.
> The inventory of tools used to validate a release
> should Also be documented in a release notes for a
> stable tag.
> 
> Here are the YML files that install the additional
> tools required to support EDK II builds.  I need the
> source and versions of these tools to be reviewed and
> approved.
> 
> https://nam06.safelinks.protection.outlook.com/?url=htt
> ps%3A%2F%2Fgithub.com%2Fmdkinney%2Fedk2-
> ci%2Fblob%2Fmaster%2FAzurePipelines%2FWindowsPrerequisi
> tes.ymldata=02%7C01%7Csean.brogan%40microsoft.com%
> 7C9e7d685fa1764cf500af08d73d4c1e1b%7C72f988bf86f141af91
> ab2d7cd011db47%7C1%7C0%7C637045269452466989sdata=h
> M4AKoMutISI5Oc%2FeVMevx%2FVRUCjJHuhEwqom0R30Ak%3Dr
> eserved=0
> https://nam06.safelinks.protection.outlook.com/?url=htt
> ps%3A%2F%2Fgithub.com%2Fmdkinney%2Fedk2-
> ci%2Fblob%2Fmaster%2FAzurePipelines%2FUbuntuPrerequisit
> es.ymldata=02%7C01%7Csean.brogan%40microsoft.com%7
> C9e7d685fa1764cf500af08d73d4c1e1b%7C72f988bf86f141af91a
> b2d7cd011db47%7C1%7C0%7C637045269452466989sdata=KQ
> 2zas2bJ%2FCjSRWGyMrxq5Rk4cW5lOgXQNR99QJbEKY%3Drese
> rved=0
> https://nam06.safelinks.protection.outlook.com/?url=htt
> 

Re: [edk2-devel] [edk2-platforms][PATCH V1 10/12] KabylakeOpenBoardPkg/GalagoPro3: Add modules

2019-09-23 Thread Kubacki, Michael A
Agree as noted in the patch commit message. At the very least an alternative 
solution must be used that eliminates the override copy.

Thanks,
Michael

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Nate
> DeSimone
> Sent: Monday, September 23, 2019 1:16 AM
> To: Kubacki, Michael A ;
> devel@edk2.groups.io
> Cc: Chiu, Chasel ; Sinha, Ankit
> ; Jeremy Soller 
> Subject: Re: [edk2-devel] [edk2-platforms][PATCH V1 10/12]
> KabylakeOpenBoardPkg/GalagoPro3: Add modules
> 
> I would like us to re-evaluate whether an override of PlatformInitPreMem is
> really needed... but I understand that is not in scope for this patch series.
> 
> Reviewed-by: Nate DeSimone 
> 
> -Original Message-
> From: Kubacki, Michael A 
> Sent: Friday, September 20, 2019 11:40 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Sinha, Ankit ;
> Jeremy Soller 
> Subject: [edk2-platforms][PATCH V1 10/12]
> KabylakeOpenBoardPkg/GalagoPro3: Add modules
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207
> 
> Adds the modules used for System 76 Galago Pro 3 board support.
> 
> This override should be removed in a future cleanup change. That is outside
> the scope of this change which is to move the contents from
> ClevoOpenBoardPkg/N1xxWU to KabylakeOpenBoardPkg/GalagoPro3.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Ankit Sinha 
> Cc: Jeremy Soller 
> Signed-off-by: Michael Kubacki 
> ---
> 
> Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/Intel
> /MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf |  67
> ++
> 
> Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/Intel
> /MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c   | 640
> 
>  2 files changed, 707 insertions(+)
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/In
> tel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/In
> tel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
> new file mode 100644
> index 00..76dd67d1a8
> --- /dev/null
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/I
> +++ ntel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.
> +++ inf
> @@ -0,0 +1,67 @@
> +### @file
> +# Component information file for the Platform Init Pre-Memory PEI
> module.
> +#
> +# Copyright (c) 2019, Intel Corporation. All rights reserved. # #
> +SPDX-License-Identifier: BSD-2-Clause-Patent # ###
> +
> +[Defines]
> +  INF_VERSION= 0x00010017
> +  BASE_NAME  = PlatformInitPreMem
> +  FILE_GUID  = 611D-F78F-4FB9-B868-55907F169280
> +  VERSION_STRING = 1.0
> +  MODULE_TYPE= PEIM
> +  ENTRY_POINT= PlatformInitPreMemEntryPoint
> +
> +[LibraryClasses]
> +  BaseMemoryLib
> +  BoardInitLib
> +  DebugLib
> +  HobLib
> +  IoLib
> +  MemoryAllocationLib
> +  MtrrLib
> +  PeimEntryPoint
> +  PeiServicesLib
> +  ReportFvLib
> +  TestPointCheckLib
> +  TimerLib
> +
> +[Packages]
> +  MinPlatformPkg/MinPlatformPkg.dec
> +  MdeModulePkg/MdeModulePkg.dec
> +  MdePkg/MdePkg.dec
> +  UefiCpuPkg/UefiCpuPkg.dec
> +
> +[Pcd]
> +  gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode  ##
> CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaBaseAddress##
> CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize   ## CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit  ##
> CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit##
> CONSUMES
> +
> +[FixedPcd]
> +  gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiAcpiReclaimMemorySize
> ## CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiAcpiNvsMemorySize
> ## CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiReservedMemorySize
> ## CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiRtDataMemorySize
> ## CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiRtCodeMemorySize
> ## CONSUMES
> +
> +[Sources]
> +  PlatformInitPreMem.c
> +
> +[Ppis]
> +  gEfiPeiMemoryDiscoveredPpiGuid
> +  gEfiPeiMasterBootModePpiGuid  ## PRODUCES
> +  gEfiPeiBootInRecoveryModePpiGuid  ## PRODUCES
> +  gEfiPeiReadOnlyVariable2PpiGuid
> +  gPeiBaseMemoryTestPpiGuid
> +  gPeiPlatformMemorySizePpiGuid
> +
> +[Guids]
> +  gEfiMemoryTypeInformationGuid
> +
> +[Depex]
> +  gEfiPeiReadOnlyVariable2PpiGuid
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/In
> tel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/In
> tel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
> new file mode 100644
> index 00..b784026c1b
> --- /dev/null
> +++
> 

Re: [edk2-devel] [PATCH 00/35] edk2: clean up the usage of standardized (VOID*) typedefs

2019-09-23 Thread Marvin Häuser
Good day,

Thank you, Laszlo, for your ambition to introduce stricter code style 
enforcements. Sorry to "hijack" the actual topic (I did not CC anyone on 
purpose, as this is mostly a separate topic and I'd like a quick comment 
first), but this seems like a good occasion to mention another few bad 
practices edk2 has been following. Mainly, I'd like to call *some* 
attention to quality problems in the code base while this has some 
traction, and cause a discussion on whether and how those are to be 
approached.

Thank you for your time.

Regards,
Marvin



"inadequate type punning":
e.g. 
https://github.com/tianocore/edk2/blob/fcdedafd97c8f18c33a63d26b954e5dbaee81a2b/MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.c#L446

This is mostly about the infamous "Strict Aliasing" rule, which is 
basically:
"An object shall have its stored value accessed only by an lvalue 
expression that has one of the
following types:
— a type compatible with the effective type of the object,
— a qualifed version of a type compatible with the effective type of the 
object,
— a type that is the signed or unsigned type corresponding to the 
effective type of the object,
— a type that is the signed or unsigned type corresponding to a qualifed 
version of the effective
type of the object,
— an aggregate or union type that includes one of the aforementioned 
types among its members
(including, recursively, a member of a subaggregate or contained union), or
— a character type."
C18 (ISO/IEC 9899:2018), 6.5.7 (exists, though has been updated, since C90)

Currently optimisations based on this are disabled. This is a bit nasty 
to work around if *seriously* needed when sticking to C90, I can only 
think of memcpy right now. However, even though there are compilers that 
do not fully support C99 (ahem, Microsoft :) ), type-punning by unions 
should be supported by them all, and has been legal as of C99, where the 
following part has been dropped from the standard:
"With one exception, if a member of a union object is accessed after a 
value has been stored in a different member of the object, the behavior 
is implementation-defined."
C90 (ISO/IEC 9899:1990), 6.3.2.3



"pointer unions":
e.g. 
https://github.com/tianocore/edk2/blob/fcdedafd97c8f18c33a63d26b954e5dbaee81a2b/MdePkg/Include/IndustryStandard/SmBios.h#L2592

While the idea behind them is certainly style preference, using a union 
of pointers prevents two important things over a union of structs.

1) CONST declaration: When defining a variable of a union type 
containing pointers as CONST, speaking of its members, they are all 
going to be CONST pointers to arbitrary memory and not arbitrary 
pointers to CONST memory. With a union of structs, you can have either 
as required (e.g. CONST UNION_TYPE *union, or UNION_TYPE *COST union).

2) Well-defined header inspection:
"if a union contains several structures that share a common initial 
sequence [...], it is permitted to inspect the common initial part of 
any of them anywhere that a declaration of the completed type of the 
union is visible"
C18 (ISO/IEC 9899:2018), 6.5.2.3.6 (exists since at least C90)

This guarantee can be used to inspect the type defined in a common 
header (e.g. SMBIOS_STRUCTURE) and the process the type-specific data by 
accessing the appropiate member (e.g. SMBIOS_TABLE_TYPE0) legally. Plain 
casts and "pointer union" accesses are illegal as per the "inadequate 
type punning" point above.



"casting away CONST":
e.g. 
https://github.com/tianocore/edk2/blob/fcdedafd97c8f18c33a63d26b954e5dbaee81a2b/MdePkg/Library/BaseIoLibIntrinsic/IoLibMmioBuffer.c#L236

This should be obvious as Undefined Behaviour because memory previously 
guaranteed to be read-only is returned as a pointer to memory that 
allows writing, but for easier lookup, here's the related rule:
"the left operand has atomic, qualifed, or unqualifed pointer type, and 
[...] the type pointed to by the left has all the qualifers of the type 
pointed to by the right"
C18 (ISO/IEC 9899:2018), 6.5.16.1 (exists since at least C90)



"structs with trailing 1-length array"
e.g. 
https://github.com/tianocore/edk2/blob/fcdedafd97c8f18c33a63d26b954e5dbaee81a2b/MdePkg/Include/Guid/FileInfo.h#L51

This is undefined as per:
"The behavior is undefned in the following circumstances:
[...]
— Addition or subtraction of a pointer into, or just beyond, an array 
object and an integer type produces a result that does not point into, 
or just beyond, the same array object (6.5.6).
— Addition or subtraction of a pointer into, or just beyond, an array 
object and an integer type produces a result that points just beyond the 
array object and is used as the operand of a unary * operator that is 
evaluated (6.5.6).
— Pointers that do not point into, or just beyond, the same array object 
are subtracted (6.5.6)."
C18 (ISO/IEC 9899:2018), J.2 (exists since at least C90)

Same as above, while not all compilers fully support C99, flexible 
arrays should be support by all reasonably 

Re: [edk2-devel] [PATCH 35/35] UefiPayloadPkg/BlSupportDxe: fix ReserveResourceInGcd() calls

2019-09-23 Thread Philippe Mathieu-Daudé
On 9/23/19 6:02 PM, Dong, Guo wrote:
> 
> This is not dead code. 
> This actual bug didn't cause issues since BlSupportDxe just allocate 
> resources reported from bootloaders. 

Ah OK, thanks Guo.

> Anyway, this is a great enhancement from spec to capture such bugs.
> 
> Thanks,
> Guo
> 
>> -Original Message-
>> From: Philippe Mathieu-Daudé [mailto:phi...@redhat.com]
>> Sent: Monday, September 23, 2019 8:08 AM
>> To: devel@edk2.groups.io; ler...@redhat.com
>> Cc: You, Benjamin ; Dong, Guo
>> ; Ma, Maurice 
>> Subject: Re: [edk2-devel] [PATCH 35/35] UefiPayloadPkg/BlSupportDxe: fix
>> ReserveResourceInGcd() calls
>>
>> On 9/17/19 9:49 PM, Laszlo Ersek wrote:
>>> The last parameter of ReserveResourceInGcd() is "ImageHandle",
>>> forwarded in turn to gDS->AllocateMemorySpace() or gDS-
>>> AllocateIoSpace() as "owner"
>>> image handle.
>>>
>>> But BlDxeEntryPoint() passes "SystemTable" as "ImageHandle".
>>>
>>> Compilers have not flagged it because EFI_HANDLE (the type of
>>> "ImageHandle") is unfortunately specified as (VOID*), and
>>> (EFI_SYSTEM_TABLE*) converts to (VOID*) silently.
>>>
>>> Hand the entry point function's "ImageHandle" parameter to
>>> ReserveResourceInGcd(). This fixes an actual bug.
>>
>> Wow very buggy, so I assume this is mostly dead code, right?
>>
>>> Cc: Benjamin You 
>>> Cc: Guo Dong 
>>> Cc: Maurice Ma 
>>> Signed-off-by: Laszlo Ersek 
>>> ---
>>>
>>> Notes:
>>> build-tested only
>>>
>>>  UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c | 4 ++--
>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c
>>> b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c
>>> index bcee4cd9bc41..28dfc8fc5545 100644
>>> --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c
>>> +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c
>>> @@ -106,10 +106,10 @@ BlDxeEntryPoint (
>>>//
>>>// Report MMIO/IO Resources
>>>//
>>> -  Status = ReserveResourceInGcd (TRUE,
>>> EfiGcdMemoryTypeMemoryMappedIo, 0xFEC0, SIZE_4KB, 0,
>> SystemTable);
>>> // IOAPIC
>>> +  Status = ReserveResourceInGcd (TRUE,
>>> + EfiGcdMemoryTypeMemoryMappedIo, 0xFEC0, SIZE_4KB, 0,
>>> + ImageHandle); // IOAPIC
>>>ASSERT_EFI_ERROR (Status);
>>>
>>> -  Status = ReserveResourceInGcd (TRUE,
>>> EfiGcdMemoryTypeMemoryMappedIo, 0xFED0, SIZE_1KB, 0,
>> SystemTable);
>>> // HPET
>>> +  Status = ReserveResourceInGcd (TRUE,
>>> + EfiGcdMemoryTypeMemoryMappedIo, 0xFED0, SIZE_1KB, 0,
>>> + ImageHandle); // HPET
>>>ASSERT_EFI_ERROR (Status);
>>>
>>>//
>>>
>>
>> Reviewed-by: Philippe Mathieu-Daude 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47860): https://edk2.groups.io/g/devel/message/47860
Mute This Topic: https://groups.io/mt/34180240/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 20/35] NetworkPkg/Ip4Dxe: fix NetLibDestroyServiceChild() call

2019-09-23 Thread Philippe Mathieu-Daudé
On 9/17/19 9:49 PM, Laszlo Ersek wrote:
> Both NetLibDestroyServiceChild() and EFI_SERVICE_BINDING_DESTROY_CHILD
> take an EFI_HANDLE for the "ChildHandle" parameter, not an (EFI_HANDLE*).
> 
> This patch fixes a real bug.
> 
> Cc: Jiaxin Wu 
> Cc: Siyuan Fu 
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
> possibly only build-tested
> 
>  NetworkPkg/Ip4Dxe/Ip4If.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/NetworkPkg/Ip4Dxe/Ip4If.c b/NetworkPkg/Ip4Dxe/Ip4If.c
> index 44b8d9fc8faf..53a333037f94 100644
> --- a/NetworkPkg/Ip4Dxe/Ip4If.c
> +++ b/NetworkPkg/Ip4Dxe/Ip4If.c
> @@ -592,7 +592,7 @@ Ip4SetAddress (
>Interface->Controller,
>Interface->Image,
>,
> -  >ArpHandle
> +  Interface->ArpHandle
>);
>  
>  Interface->ArpHandle = NULL;
> @@ -657,7 +657,7 @@ ON_ERROR:
>  Interface->Controller,
>  Interface->Image,
>  ,
> ->ArpHandle
> +Interface->ArpHandle

I'm surprise this one never triggered unexpected behaviors, it
looks easy to reach.

Reviewed-by: Philippe Mathieu-Daude 

>  );
>  
>return Status;
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47859): https://edk2.groups.io/g/devel/message/47859
Mute This Topic: https://groups.io/mt/34180221/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 35/35] UefiPayloadPkg/BlSupportDxe: fix ReserveResourceInGcd() calls

2019-09-23 Thread Guo Dong

This is not dead code. 
This actual bug didn't cause issues since BlSupportDxe just allocate resources 
reported from bootloaders. 
Anyway, this is a great enhancement from spec to capture such bugs.

Thanks,
Guo

> -Original Message-
> From: Philippe Mathieu-Daudé [mailto:phi...@redhat.com]
> Sent: Monday, September 23, 2019 8:08 AM
> To: devel@edk2.groups.io; ler...@redhat.com
> Cc: You, Benjamin ; Dong, Guo
> ; Ma, Maurice 
> Subject: Re: [edk2-devel] [PATCH 35/35] UefiPayloadPkg/BlSupportDxe: fix
> ReserveResourceInGcd() calls
> 
> On 9/17/19 9:49 PM, Laszlo Ersek wrote:
> > The last parameter of ReserveResourceInGcd() is "ImageHandle",
> > forwarded in turn to gDS->AllocateMemorySpace() or gDS-
> >AllocateIoSpace() as "owner"
> > image handle.
> >
> > But BlDxeEntryPoint() passes "SystemTable" as "ImageHandle".
> >
> > Compilers have not flagged it because EFI_HANDLE (the type of
> > "ImageHandle") is unfortunately specified as (VOID*), and
> > (EFI_SYSTEM_TABLE*) converts to (VOID*) silently.
> >
> > Hand the entry point function's "ImageHandle" parameter to
> > ReserveResourceInGcd(). This fixes an actual bug.
> 
> Wow very buggy, so I assume this is mostly dead code, right?
> 
> > Cc: Benjamin You 
> > Cc: Guo Dong 
> > Cc: Maurice Ma 
> > Signed-off-by: Laszlo Ersek 
> > ---
> >
> > Notes:
> > build-tested only
> >
> >  UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c
> > b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c
> > index bcee4cd9bc41..28dfc8fc5545 100644
> > --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c
> > +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c
> > @@ -106,10 +106,10 @@ BlDxeEntryPoint (
> >//
> >// Report MMIO/IO Resources
> >//
> > -  Status = ReserveResourceInGcd (TRUE,
> > EfiGcdMemoryTypeMemoryMappedIo, 0xFEC0, SIZE_4KB, 0,
> SystemTable);
> > // IOAPIC
> > +  Status = ReserveResourceInGcd (TRUE,
> > + EfiGcdMemoryTypeMemoryMappedIo, 0xFEC0, SIZE_4KB, 0,
> > + ImageHandle); // IOAPIC
> >ASSERT_EFI_ERROR (Status);
> >
> > -  Status = ReserveResourceInGcd (TRUE,
> > EfiGcdMemoryTypeMemoryMappedIo, 0xFED0, SIZE_1KB, 0,
> SystemTable);
> > // HPET
> > +  Status = ReserveResourceInGcd (TRUE,
> > + EfiGcdMemoryTypeMemoryMappedIo, 0xFED0, SIZE_1KB, 0,
> > + ImageHandle); // HPET
> >ASSERT_EFI_ERROR (Status);
> >
> >//
> >
> 
> Reviewed-by: Philippe Mathieu-Daude 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47858): https://edk2.groups.io/g/devel/message/47858
Mute This Topic: https://groups.io/mt/34180240/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 25/35] OvmfPkg/VideoDxe: document EFI_EDID_OVERRIDE_PROTOCOL.GetEdid() call

2019-09-23 Thread Philippe Mathieu-Daudé
Hi Laszlo,

On 9/17/19 9:49 PM, Laszlo Ersek wrote:
> According to the UEFI spec -- and to the edk2 header
> "MdePkg/Include/Protocol/EdidOverride.h" too --,
> EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID takes an (EFI_HANDLE*), and not an
> EFI_HANDLE, as second parameter ("ChildHandle").
> 
> This is probably [*] a bug in the UEFI spec. Given that this CSM module
> (VideoDxe) had been used for a long time on physical platforms before it
> was moved to OvmfPkg, keep the current "ChildHandle" argument, just cast
> it explicitly.
> 
> [*] The edk2 tree contains no other GetEdid() call, and also no GetEdid()
> implementation.
> 
> The edk2-platforms tree contains two GetEdid() calls, at commit
> 022c212167e0, in files
> - "Drivers/DisplayLink/DisplayLinkPkg/DisplayLinkGop/Edid.c",
> - "Drivers/OptionRomPkg/CirrusLogic5430Dxe/Edid.c".
> 
> From these, the first passes an (EFI_HANDLE*) as "ChildHandle", the
> second passes an EFI_HANDLE. It's difficult to draw a conclusion. :/
> 
> No functional changes.
> 
> (I've also requested a non-normative (informative) clarification for the
> UEFI spec: , in the
> direction that matches this patch.)

(EFI_HANDLE*) makes sense to me, but I'd rather wait for the spec
clarification before Acking this patch, I don't want we silent a bug
with this cast.

> Cc: Ard Biesheuvel 
> Cc: David Woodhouse 
> Cc: Jordan Justen 
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
> build-tested only
> 
>  OvmfPkg/Csm/BiosThunk/VideoDxe/BiosVideo.c | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/OvmfPkg/Csm/BiosThunk/VideoDxe/BiosVideo.c 
> b/OvmfPkg/Csm/BiosThunk/VideoDxe/BiosVideo.c
> index 0640656dba14..995136adee27 100644
> --- a/OvmfPkg/Csm/BiosThunk/VideoDxe/BiosVideo.c
> +++ b/OvmfPkg/Csm/BiosThunk/VideoDxe/BiosVideo.c
> @@ -1402,9 +1402,13 @@ BiosVideoCheckForVbe (
>goto Done;
>  }
>  
> +//
> +// Cast "ChildHandle" to (EFI_HANDLE*) in order to work around the spec 
> bug
> +// in UEFI v2.8, reported as Mantis#2018.
> +//
>  Status = EdidOverride->GetEdid (
>   EdidOverride,
> - BiosVideoPrivate->Handle,
> + (EFI_HANDLE *) BiosVideoPrivate->Handle,
>   ,
>   ,
>   (UINT8 **) 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47857): https://edk2.groups.io/g/devel/message/47857
Mute This Topic: https://groups.io/mt/34180226/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 21/35] NetworkPkg/TcpDxe: fix SockFreeFoo() parameter list

2019-09-23 Thread Philippe Mathieu-Daudé
On 9/17/19 9:49 PM, Laszlo Ersek wrote:
> The SockFreeFoo() callback function for NetbufFromExt() has to match the
> NET_VECTOR_EXT_FREE prototype, which takes a (VOID*) as callback argument
> (Arg). EFI_EVENT has nothing to do with NET_VECTOR_EXT_FREE. Fix the
> SockFreeFoo() parameter list.
> 
> This change is a no-op in practice.
> 
> Cc: Jiaxin Wu 
> Cc: Siyuan Fu 
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
> build-tested only
> 
>  NetworkPkg/TcpDxe/SockImpl.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/NetworkPkg/TcpDxe/SockImpl.c b/NetworkPkg/TcpDxe/SockImpl.c
> index f5e01771e2a8..fb28e2ed40d3 100644
> --- a/NetworkPkg/TcpDxe/SockImpl.c
> +++ b/NetworkPkg/TcpDxe/SockImpl.c
> @@ -67,13 +67,13 @@ SockBufNext (
>  /**
>User provided callback function for NetbufFromExt.
>  
> -  @param[in] EventThe Event this notify function registered to, ignored.
> +  @param[in] Arg  The Arg parameter forwarded by NetbufFromExt(). 
> Ignored.
>  
>  **/
>  VOID
>  EFIAPI
>  SockFreeFoo (
> -  IN EFI_EVENT Event
> +  IN VOID  *Arg
>)
>  {
>return;
> 

Reviewed-by: Philippe Mathieu-Daude 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47856): https://edk2.groups.io/g/devel/message/47856
Mute This Topic: https://groups.io/mt/34180222/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 35/35] UefiPayloadPkg/BlSupportDxe: fix ReserveResourceInGcd() calls

2019-09-23 Thread Philippe Mathieu-Daudé
On 9/17/19 9:49 PM, Laszlo Ersek wrote:
> The last parameter of ReserveResourceInGcd() is "ImageHandle", forwarded
> in turn to gDS->AllocateMemorySpace() or gDS->AllocateIoSpace() as "owner"
> image handle.
> 
> But BlDxeEntryPoint() passes "SystemTable" as "ImageHandle".
> 
> Compilers have not flagged it because EFI_HANDLE (the type of
> "ImageHandle") is unfortunately specified as (VOID*), and
> (EFI_SYSTEM_TABLE*) converts to (VOID*) silently.
> 
> Hand the entry point function's "ImageHandle" parameter to
> ReserveResourceInGcd(). This fixes an actual bug.

Wow very buggy, so I assume this is mostly dead code, right?

> Cc: Benjamin You 
> Cc: Guo Dong 
> Cc: Maurice Ma 
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
> build-tested only
> 
>  UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c 
> b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c
> index bcee4cd9bc41..28dfc8fc5545 100644
> --- a/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c
> +++ b/UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c
> @@ -106,10 +106,10 @@ BlDxeEntryPoint (
>//
>// Report MMIO/IO Resources
>//
> -  Status = ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 
> 0xFEC0, SIZE_4KB, 0, SystemTable); // IOAPIC
> +  Status = ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 
> 0xFEC0, SIZE_4KB, 0, ImageHandle); // IOAPIC
>ASSERT_EFI_ERROR (Status);
>  
> -  Status = ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 
> 0xFED0, SIZE_1KB, 0, SystemTable); // HPET
> +  Status = ReserveResourceInGcd (TRUE, EfiGcdMemoryTypeMemoryMappedIo, 
> 0xFED0, SIZE_1KB, 0, ImageHandle); // HPET
>ASSERT_EFI_ERROR (Status);
>  
>//
> 

Reviewed-by: Philippe Mathieu-Daude 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47855): https://edk2.groups.io/g/devel/message/47855
Mute This Topic: https://groups.io/mt/34180240/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 22/35] OvmfPkg/XenBusDxe: fix UninstallMultipleProtocolInterfaces() call

2019-09-23 Thread Philippe Mathieu-Daudé
On 9/17/19 9:49 PM, Laszlo Ersek wrote:
> Unlike the InstallMultipleProtocolInterfaces() boot service, which takes
> an (EFI_HANDLE*) as first parameter, the
> UninstallMultipleProtocolInterfaces() boot service takes an EFI_HANDLE as
> first parameter.
> 
> This is an actual bug. It must have remained hidden until now because it's
> on an error path. Fix the UninstallMultipleProtocolInterfaces() call.
> 
> Cc: Anthony Perard 
> Cc: Ard Biesheuvel 
> Cc: Jordan Justen 
> Cc: Julien Grall 
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
> build-tested only
> 
>  OvmfPkg/XenBusDxe/XenBus.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/OvmfPkg/XenBusDxe/XenBus.c b/OvmfPkg/XenBusDxe/XenBus.c
> index bb8ddbc4d44d..2451e58a5961 100644
> --- a/OvmfPkg/XenBusDxe/XenBus.c
> +++ b/OvmfPkg/XenBusDxe/XenBus.c
> @@ -210,7 +210,7 @@ XenBusAddDevice (
>  
>  ErrorOpenProtocolByChild:
>gBS->UninstallMultipleProtocolInterfaces (
> ->Handle,
> +Private->Handle,
>  , Private->DevicePath,
>  , >XenBusIo,
>  NULL);
> 

Reviewed-by: Philippe Mathieu-Daude 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47854): https://edk2.groups.io/g/devel/message/47854
Mute This Topic: https://groups.io/mt/34180223/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 31/35] ShellPkg/UefiShellDebug1CommandsLib: fix ShellCloseFile() call

2019-09-23 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey 

Thanks
-Jaben

> -Original Message-
> From: Philippe Mathieu-Daudé [mailto:phi...@redhat.com]
> Sent: Monday, September 23, 2019 3:01 AM
> To: devel@edk2.groups.io; ler...@redhat.com
> Cc: Carsey, Jaben ; Ni, Ray ;
> Gao, Zhichao 
> Subject: Re: [edk2-devel] [PATCH 31/35]
> ShellPkg/UefiShellDebug1CommandsLib: fix ShellCloseFile() call
> 
> On 9/17/19 9:49 PM, Laszlo Ersek wrote:
> > In the FileBufferSave() function, we invoke ShellCloseFile() if "Directory
> > Can Not Be Saved".
> >
> > The ShellCloseFile() function takes a (SHELL_FILE_HANDLE*) parameter
> > called "FileHandle", and correctly passes the de-referenced (*FileHandle)
> > to EFI_SHELL_CLOSE_FILE, which takes a SHELL_FILE_HANDLE.
> >
> > However, FileBufferSave() passes SHELL_FILE_HANDLE to ShellCloseFile(),
> > not the expected (SHELL_FILE_HANDLE*). Correct it.
> >
> > This fixes an actual bug that has remained hidden for two reasons:
> >
> > - pointer-to-VOID converts from/to any pointer-to-object type silently,
> > - the bug is on an error path which has likely never fired in practice.
> >
> > Cc: Jaben Carsey 
> > Cc: Ray Ni 
> > Cc: Zhichao Gao 
> > Signed-off-by: Laszlo Ersek 
> > ---
> >
> > Notes:
> > tested: edit (saving a file)
> >
> >  ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c
> > index 464f9de38e52..fd324cc4a861 100644
> > --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c
> > +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c
> > @@ -1462,7 +1462,7 @@ FileBufferSave (
> >
> >  if (Info != NULL && Info->Attribute & EFI_FILE_DIRECTORY) {
> >StatusBarSetStatusString (L"Directory Can Not Be Saved");
> > -  ShellCloseFile(FileHandle);
> > +  ShellCloseFile ();
> >FreePool(Info);
> >return EFI_LOAD_ERROR;
> >  }
> >
> 
> Reviewed-by: Philippe Mathieu-Daude 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47853): https://edk2.groups.io/g/devel/message/47853
Mute This Topic: https://groups.io/mt/34180234/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [Patch] BaseTools: init DependencyHeaderFileSet for each MakeFile class

2019-09-23 Thread Liming Gao
Reviewed-by: Liming Gao 

> -Original Message-
> From: Feng, Bob C 
> Sent: Thursday, September 19, 2019 10:57 AM
> To: devel@edk2.groups.io
> Cc: Gao, Liming ; Shi, Steven ; 
> Feng, Bob C 
> Subject: [Patch] BaseTools: init DependencyHeaderFileSet for each MakeFile 
> class
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2203
> 
> This patch is going to fix a regression issue that
> build breaks when the custom makefile exist.
> 
> Cc: Liming Gao 
> Cc: Steven Shi 
> Signed-off-by: Bob Feng 
> ---
>  BaseTools/Source/Python/AutoGen/GenMake.py | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py 
> b/BaseTools/Source/Python/AutoGen/GenMake.py
> index 940136248f..e447e43ec3 100755
> --- a/BaseTools/Source/Python/AutoGen/GenMake.py
> +++ b/BaseTools/Source/Python/AutoGen/GenMake.py
> @@ -447,10 +447,11 @@ cleanlib:
>  self.Macros["WORKSPACE"   ] = 
> self._AutoGenObject.Macros["WORKSPACE"]
>  self.Macros["FFS_OUTPUT_DIR"  ] = 
> self._AutoGenObject.Macros["FFS_OUTPUT_DIR"]
>  self.GenFfsList = ModuleAutoGen.GenFfsList
>  self.MacroList = ['FFS_OUTPUT_DIR', 'MODULE_GUID', 'OUTPUT_DIR']
>  self.FfsOutputFileList = []
> +self.DependencyHeaderFileSet = set()
> 
>  # Compose a dict object containing information used to do replacement in 
> template
>  @property
>  def _TemplateDict(self):
>  if self._FileType not in self._SEP_:
> @@ -908,11 +909,11 @@ cleanlib:
>  SourceFileList,
>  ForceIncludedFile,
>  self._AutoGenObject.IncludePathList + 
> self._AutoGenObject.BuildOptionIncPathList
>  )
> 
> -self.DependencyHeaderFileSet = set()
> +
>  if FileDependencyDict:
>  for Dependency in FileDependencyDict.values():
>  self.DependencyHeaderFileSet.update(set(Dependency))
> 
>  # Get a set of unique package includes from MetaFile
> @@ -1242,10 +1243,11 @@ ${BEGIN}\t-@${create_directory_command}\n${END}\
>  #
>  def __init__(self, ModuleAutoGen):
>  BuildFile.__init__(self, ModuleAutoGen)
>  self.PlatformInfo = self._AutoGenObject.PlatformInfo
>  self.IntermediateDirectoryList = ["$(DEBUG_DIR)", "$(OUTPUT_DIR)"]
> +self.DependencyHeaderFileSet = set()
> 
>  # Compose a dict object containing information used to do replacement in 
> template
>  @property
>  def _TemplateDict(self):
>  Separator = self._SEP_[self._FileType]
> @@ -1432,10 +1434,11 @@ cleanlib:
>  self.ModuleMakefileList = []
>  self.IntermediateDirectoryList = []
>  self.ModuleBuildDirectoryList = []
>  self.LibraryBuildDirectoryList = []
>  self.LibraryMakeCommandList = []
> +self.DependencyHeaderFileSet = set()
> 
>  # Compose a dict object containing information used to do replacement in 
> template
>  @property
>  def _TemplateDict(self):
>  Separator = self._SEP_[self._FileType]
> @@ -1537,10 +1540,11 @@ class TopLevelMakefile(BuildFile):
>  #   @param  Workspace   Object of WorkspaceAutoGen class
>  #
>  def __init__(self, Workspace):
>  BuildFile.__init__(self, Workspace)
>  self.IntermediateDirectoryList = []
> +self.DependencyHeaderFileSet = set()
> 
>  # Compose a dict object containing information used to do replacement in 
> template
>  @property
>  def _TemplateDict(self):
>  Separator = self._SEP_[self._FileType]
> --
> 2.20.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47852): https://edk2.groups.io/g/devel/message/47852
Mute This Topic: https://groups.io/mt/34195983/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-staging/UEFI_PCI_ENHANCE-2 PATCH] PciBusDxe: New PCI features Max_Payload_Size, Max_Read_Req_Size

2019-09-23 Thread Javeed, Ashraf
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2194

The EDK2 Kernel PciBusDxe driver is enhanced to enable the configuration
of PCI features like Max_Payload_Size and Max_Read_Req_Size.

Max_Payload_Size:- The PCI Device Control register provides this feature
register field which controls the maximum data packet (TLP) size that a
PCI device should maintain as a requester. The PCI Bus driver is required
to maintain a highest common value supported by all the PCI devices in a
PCIe hierarchy, especially in case of isochronous applications.

Max_Read_Req_Size:- The PCI Device Control register provides this feature
register field which controls the maximum memory read request size that a
PCI device should maintain as a requester. The PCI Bus driver is required
to maintain a common value, same as Max_Payload_Size, in case of
isochronous applications only; or else, it should maintain the user
requested value uniformly in a PCIe hierarchy (PCI root port and its
downstream devices).

The PCI Base Specification 4 Revision 1 contains detailed information
about these features. The EDK2 PCI Bus driver needs to enable the
configuration of these features as per the PCI Base specification.

The EDK2 PCI Bus driver also needs to take the PCI device-specific
platform policy into the consideration while programming these features;
thus the code changes to support these, is explicitly dependent on the
new PCI Platform Protocol interface definition defined in the below
record:-
https://bugzilla.tianocore.org/show_bug.cgi?id=1954

Signed-off-by: Ashraf Javeed 
Cc: Jian J Wang 
Cc: Hao A Wu 
Cc: Ray Ni 
---
 MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c   |   23 ++
 MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.h   |   14 -
 MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf  |9 +-
 MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c |  229 
++
 MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c|  139 
--
 MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c |   34 

 MdeModulePkg/Bus/Pci/PciBusDxe/PciFeatureSupport.c| 1601 
+
 MdeModulePkg/Bus/Pci/PciBusDxe/PciFeatureSupport.h|  201 
++
 MdeModulePkg/Bus/Pci/PciBusDxe/PciPlatformSupport.c   |  565 
+++
 MdeModulePkg/Bus/Pci/PciBusDxe/PciPlatformSupport.h   |  193 
+
 MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c   |   15 +
 MdeModulePkg/MdeModulePkg.dec |   10 ++
 12 files changed, 2797 insertions(+), 236 deletions(-)

diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c 
b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
index b020ce50ce..2503b298f4 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
@@ -8,7 +8,7 @@
   PCI Root Bridges. So it means platform needs install PCI Root Bridge IO 
protocol for each
   PCI Root Bus and install PCI Host Bridge Resource Allocation Protocol.
 
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -34,8 +34,6 @@ BOOLEAN   
gFullEnumeration = TRUE;
 UINT64gAllOne  = 

[edk2-devel] How to fill EFI_VARIABLE_AUTHENTICATION_2 descriptor properly

2019-09-23 Thread phlamorim
I want to create an Authenticated Variable like described in UEFI specification 
2.8 on tópic 8.2.2(8.2.2 Using the EFI_VARIABLE_AUTHENTICATION_2 descriptor). I 
understood the first step but im stucked from step 2 to 6.

On the second step i should compute a Hash of the serialization of some 
parameters of the SetVariable() call, the serialization here means to 
concatenate bytes of each variable and then compute the Hash? The algorithm to 
compute de hash is not specified til this moment. The pseudo-code example is 
*digest=hash(VariableName,VendorGuid,* *Attributes, TimeStamp, 
DataNew_variable_content);* by reading past i assume the allowed algorithm is 
SHA256 which is quoted on step 4.b.

In the third step i should sign the digest value computed in the second step, 
using a selected signature scheme and they show an example: *(e.g. PKCS #1 
v1.5)* , i don't know which methods we have to do this task but i assume we 
have some tool or feature in openssl which can handle this task. Read past 
again i found *Only a digest encryption algorithm of RSA with PKCS #1 v1.5 
padding (RSASSA_PKCS1v1_5).
is accepted* sayd on step 4.g. Then im assumed its needed to use PKCS #1 v.15 
in this step.

In the fourth step the spec ask to create a DER-encoded PKCS #7 version 1.5 
SignedData with a st of rules to fill SignedData and SignerInfo.

The steps 5 and 6 is just about to construct the Data parameter following the 
properly rules before the call to SetVariable(). I want to know if we have the 
used algorithms in the Crypto and Security Pkg, and if i asssumed the used 
algorithms in the steps 2 to 4 correctly. Iam new to all those cryptography 
concepts so any resource and code example on setting a new Authenticated 
variable will be appreciated.

I attached an example of what i believe the UEFI Application should do to set a 
new time based authenticated variable, the steps from 2 to 6 are just comments 
in somekind of pseudo-code. Let me know if this is the correct path and if i 
should use external tools out of UEFI preboot enviroment to do the computations.

Regards, Paulo Amorim.

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47850): https://edk2.groups.io/g/devel/message/47850
Mute This Topic: https://groups.io/mt/34264328/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

#include 
#include 
#include 

EFI_STATUS
EFIAPI
UefiMain(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
{
	UINT8 *Payload = NULL;
	
	/* Step 1 */
	EFI_VARIABLE_AUTHENTICATION_2 AuthDesc2;

	SystemTable->RuntimeServices->GetTime();
	AuthDesc2.TimeStamp.Pad1 		 = 0;
	AuthDesc2.TimeStamp.Nanosecond 	 = 0;
	AuthDesc2.TimeStamp.TimeZone 	 = 0;
	AuthDesc2.TimeStamp.Daylight 	 = 0;
	AuthDesc2.TimeStamp.Pad2 		 = 0;

	AuthDesc2.AuthInfo.CertType = EFI_CERT_TYPE_PKCS7_GUID;

	/* Step 2	
	hash = sha256(
		VariableName ||
		VendorGuid ||
		Attributes || 
		AuthDesc2.TimeStamp || 
		NewValue
	);
	*/
	
	/* Step 3
	signed_hash = pkcs#1-1.5(hash);
	*/

	/* Step 4
	DERencPKCS7 = DERenc-pkcs#7-1.5(signed_hash);
	*/

	/* Step 5
	AuthDesc2.AuthInfo.CertData	= DERencPKCS7;
	*/

	/* Step 6
	//Make Payload point to a region allocated with size of AuthDesc2 + NewDataSize
	
	Payload = Concatenate(AuthDesc2, VariableNewData);
	*/

	SystemTable->RuntimeServices->SetVariable(
		"variable_name",
		,
		EFI_VARIABLE_NON_VOLATILE |
		EFI_VARIABLE_BOOTSERVICE_ACCESS |
		EFI_VARIABLE_RUNTIME_ACCESS |
		EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS,
		PayloadSize,
		Payload
	);

	return EFI_SUCCESS;
}


[edk2-devel] [PATCH] MdeModulePkg/UfsPassThru : Fix UFS flag read from Query Resp UPIU

2019-09-23 Thread Agrawal, Sachin
As per UFS spec, flag value is stored in the 'last byte' of value
field. Existing code is attempting to read first byte.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2208

Test: Verified the Fix by sending command to set fPowerOnWPEn flag
and then reading it to verify the set value.

Cc: Hao A Wu 
Cc: Ray Ni 

Signed-off-by: Sachin Agrawal 
---
 MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c  | 5 -
 MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c | 5 -
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c 
b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c
index e8ef0c2a7a..e450f6f49d 100644
--- a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c
+++ b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c
@@ -977,7 +977,10 @@ UfsRwFlags (
   }
 
   if (Trd->Ocs == 0) {
-*Value = (UINT8)QueryResp->Tsf.Value;
+//
+// The 'FLAG VALUE' field is at byte offset 3 of QueryResp->Tsf.Value
+//
+*Value = *((UINT8*)&(QueryResp->Tsf.Value) + 3);
   } else {
 Status = EFI_DEVICE_ERROR;
   }
diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c 
b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
index 0b95e7..93ac958f65 100644
--- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
+++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c
@@ -863,7 +863,10 @@ UfsGetReturnDataFromQueryResponse (
 case UtpQueryFuncOpcodeSetFlag:
 case UtpQueryFuncOpcodeClrFlag:
 case UtpQueryFuncOpcodeTogFlag:
-  CopyMem (Packet->DataBuffer, >Tsf.Value, sizeof (UINT8));
+  //
+  // The 'FLAG VALUE' field is at byte offset 3 of QueryResp->Tsf.Value
+  //
+  *((UINT8*)(Packet->DataBuffer)) = *((UINT8*)&(QueryResp->Tsf.Value) + 3);
   break;
 case UtpQueryFuncOpcodeRdAttr:
 case UtpQueryFuncOpcodeWrAttr:
-- 
2.14.3.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47849): https://edk2.groups.io/g/devel/message/47849
Mute This Topic: https://groups.io/mt/34263041/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 10/35] MdeModulePkg/PlatformVarCleanupLib: fix HiiConstructConfigHdr() call

2019-09-23 Thread Philippe Mathieu-Daudé
On 9/17/19 9:49 PM, Laszlo Ersek wrote:
> The HiiConstructConfigHdr() function takes the "DriverHandle" parameter in
> order to fetch the device path from it, and then turn the device path into
> PATH routing information.
> 
> The HiiConstructConfigHdr() function is called from
> VariableCleanupHiiExtractConfig(), which is only installed when "Type" is
> "VarCleanupManually" in PlatformVarCleanup().
> 
> In that case, we create "Private->DriverHandle" as a new handle, and
> install "mVarCleanupHiiVendorDevicePath" on it. Then we pass
> "Private->DriverHandle" to HiiAddPackages(), which consumes the device
> path for routing purposes.
> 
> It follows that the "DriverHandle" argument pased to

"passed"

> HiiConstructConfigHdr() should be the same driver handle, for matching
> routing.
> 
> Currently we pass "Private->HiiHandle", which is clearly a typo, because
> it is the return value of HiiAddPackages(), and stands for the published
> HII package list.

Phew...

> Therefore this patch addresses an actual bug.
> 
> The typo has not been flagged by compilers because the UEFI spec
> regrettably defines both EFI_HANDLE and EFI_HII_HANDLE as (VOID*).
> 
> Cc: Hao A Wu 
> Cc: Jian J Wang 
> Cc: Liming Gao 
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
> build-tested only
> 
>  MdeModulePkg/Library/PlatformVarCleanupLib/PlatVarCleanupLib.c | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/MdeModulePkg/Library/PlatformVarCleanupLib/PlatVarCleanupLib.c 
> b/MdeModulePkg/Library/PlatformVarCleanupLib/PlatVarCleanupLib.c
> index 968c044a316a..3875d614bb41 100644
> --- a/MdeModulePkg/Library/PlatformVarCleanupLib/PlatVarCleanupLib.c
> +++ b/MdeModulePkg/Library/PlatformVarCleanupLib/PlatVarCleanupLib.c
> @@ -609,7 +609,11 @@ VariableCleanupHiiExtractConfig (
>  // Allocate and fill a buffer large enough to hold the  
> template
>  // followed by "=0=" followed by a 
> Null-terminator.
>  //
> -ConfigRequestHdr = HiiConstructConfigHdr (, 
> mVarStoreName, Private->HiiHandle);
> +ConfigRequestHdr = HiiConstructConfigHdr (
> + ,
> + mVarStoreName,
> + Private->DriverHandle
> + );
>  Size = (StrLen (ConfigRequestHdr) + 32 + 1) * sizeof (CHAR16);
>  ConfigRequest = AllocateZeroPool (Size);
>  ASSERT (ConfigRequest != NULL);
> 

Reviewed-by: Philippe Mathieu-Daude 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47848): https://edk2.groups.io/g/devel/message/47848
Mute This Topic: https://groups.io/mt/34180211/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 31/35] ShellPkg/UefiShellDebug1CommandsLib: fix ShellCloseFile() call

2019-09-23 Thread Philippe Mathieu-Daudé
On 9/17/19 9:49 PM, Laszlo Ersek wrote:
> In the FileBufferSave() function, we invoke ShellCloseFile() if "Directory
> Can Not Be Saved".
> 
> The ShellCloseFile() function takes a (SHELL_FILE_HANDLE*) parameter
> called "FileHandle", and correctly passes the de-referenced (*FileHandle)
> to EFI_SHELL_CLOSE_FILE, which takes a SHELL_FILE_HANDLE.
> 
> However, FileBufferSave() passes SHELL_FILE_HANDLE to ShellCloseFile(),
> not the expected (SHELL_FILE_HANDLE*). Correct it.
> 
> This fixes an actual bug that has remained hidden for two reasons:
> 
> - pointer-to-VOID converts from/to any pointer-to-object type silently,
> - the bug is on an error path which has likely never fired in practice.
> 
> Cc: Jaben Carsey 
> Cc: Ray Ni 
> Cc: Zhichao Gao 
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
> tested: edit (saving a file)
> 
>  ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c 
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c
> index 464f9de38e52..fd324cc4a861 100644
> --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c
> +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Edit/FileBuffer.c
> @@ -1462,7 +1462,7 @@ FileBufferSave (
>  
>  if (Info != NULL && Info->Attribute & EFI_FILE_DIRECTORY) {
>StatusBarSetStatusString (L"Directory Can Not Be Saved");
> -  ShellCloseFile(FileHandle);
> +  ShellCloseFile ();
>FreePool(Info);
>return EFI_LOAD_ERROR;
>  }
> 

Reviewed-by: Philippe Mathieu-Daude 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47847): https://edk2.groups.io/g/devel/message/47847
Mute This Topic: https://groups.io/mt/34180234/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 30/35] ShellPkg: stop taking EFI_HANDLE in place of SHELL_FILE_HANDLE

2019-09-23 Thread Philippe Mathieu-Daudé
On 9/17/19 9:49 PM, Laszlo Ersek wrote:
> The TouchFileByHandle() and IsDirectoryEmpty() functions are passed
> SHELL_FILE_HANDLE parameters, and they use those parameters correctly.
> However, their parameter lists say EFI_HANDLE.
> 
> Spell out the right type in the parameter lists.
> 
> In practice, this change is a no-op (because, quite regrettably, both
> EFI_HANDLE and SHELL_FILE_HANDLE are specified to be typedefs of (VOID*)).
> 
> Cc: Jaben Carsey 
> Cc: Ray Ni 
> Cc: Zhichao Gao 
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
> tested: rm, touch
> 
>  ShellPkg/Library/UefiShellLevel2CommandsLib/Rm.c| 2 +-
>  ShellPkg/Library/UefiShellLevel3CommandsLib/Touch.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Rm.c 
> b/ShellPkg/Library/UefiShellLevel2CommandsLib/Rm.c
> index 3a1196f1529e..59f7eec376f2 100644
> --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Rm.c
> +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Rm.c
> @@ -24,7 +24,7 @@ STATIC CONST SHELL_PARAM_ITEM ParamList[] = {
>  **/
>  BOOLEAN
>  IsDirectoryEmpty (
> -  IN EFI_HANDLE   FileHandle
> +  IN SHELL_FILE_HANDLE   FileHandle
>)
>  {
>EFI_STATUS  Status;
> diff --git a/ShellPkg/Library/UefiShellLevel3CommandsLib/Touch.c 
> b/ShellPkg/Library/UefiShellLevel3CommandsLib/Touch.c
> index 0f00344c815e..a215f5774c69 100644
> --- a/ShellPkg/Library/UefiShellLevel3CommandsLib/Touch.c
> +++ b/ShellPkg/Library/UefiShellLevel3CommandsLib/Touch.c
> @@ -21,7 +21,7 @@
>  **/
>  EFI_STATUS
>  TouchFileByHandle (
> -  IN EFI_HANDLE Handle
> +  IN SHELL_FILE_HANDLE Handle
>)
>  {
>EFI_STATUSStatus;
> 

Reviewed-by: Philippe Mathieu-Daude 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47846): https://edk2.groups.io/g/devel/message/47846
Mute This Topic: https://groups.io/mt/34180233/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 27/35] SecurityPkg: stop abusing EFI_EVENT for protocol notify registration

2019-09-23 Thread Philippe Mathieu-Daudé
On 9/17/19 9:49 PM, Laszlo Ersek wrote:
> EfiCreateProtocolNotifyEvent() takes a (VOID**) for "Registration",
> similarly to gBS->RegisterProtocolNotify(). We should pass the address of
> an actual pointer-to-VOID, and not the address of an EFI_EVENT. EFI_EVENT
> just happens to be specified as (VOID*), and has nothing to do with the
> registration.
> 
> This change is a no-op in practice; it's a semantic improvement.
> 
> Cc: Chao Zhang 
> Cc: Jian Wang 
> Cc: Jiewen Yao 
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
> build-tested only
> 
>  SecurityPkg/HddPassword/HddPasswordDxe.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/SecurityPkg/HddPassword/HddPasswordDxe.c 
> b/SecurityPkg/HddPassword/HddPasswordDxe.c
> index b0d795b6597f..051e64091d7f 100644
> --- a/SecurityPkg/HddPassword/HddPasswordDxe.c
> +++ b/SecurityPkg/HddPassword/HddPasswordDxe.c
> @@ -2770,7 +2770,7 @@ HddPasswordDxeInit (
>  {
>EFI_STATUS Status;
>HDD_PASSWORD_DXE_PRIVATE_DATA  *Private;
> -  EFI_EVENT  Registration;
> +  VOID   *Registration;
>EFI_EVENT  EndOfDxeEvent;
>EDKII_VARIABLE_LOCK_PROTOCOL   *VariableLock;
>  
> 

Reviewed-by: Philippe Mathieu-Daude 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47845): https://edk2.groups.io/g/devel/message/47845
Mute This Topic: https://groups.io/mt/34180229/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 26/35] SecurityPkg: fix UninstallMultipleProtocolInterfaces() calls

2019-09-23 Thread Philippe Mathieu-Daudé
On 9/17/19 9:49 PM, Laszlo Ersek wrote:
> Unlike the InstallMultipleProtocolInterfaces() boot service, which takes
> an (EFI_HANDLE*) as first parameter, the
> UninstallMultipleProtocolInterfaces() boot service takes an EFI_HANDLE as
> first parameter.
> 
> These are actual bugs. They must have remained hidden until now because
> they are all in Unload() functions, which are probably exercised
> infrequently. Fix the UninstallMultipleProtocolInterfaces() calls.
> 
> Cc: Chao Zhang 
> Cc: Jian Wang 
> Cc: Jiewen Yao 
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
> build-tested only
> 
>  SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c
>   | 2 +-
>  SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c   
>   | 2 +-
>  
> SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDriver.c
>  | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c 
> b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c
> index 54155a338100..9052eced757d 100644
> --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c
> +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c
> @@ -443,7 +443,7 @@ Tcg2ConfigDriverUnload (
>ASSERT (PrivateData->Signature == TCG2_CONFIG_PRIVATE_DATA_SIGNATURE);
>  
>gBS->UninstallMultipleProtocolInterfaces (
> - ,
> + ImageHandle,
>   ,
>   PrivateData,
>   NULL
> diff --git a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c 
> b/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c
> index 341879e4c4ba..fb06624fdb8f 100644
> --- a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c
> +++ b/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c
> @@ -138,7 +138,7 @@ TcgConfigDriverUnload (
>ASSERT (PrivateData->Signature == TCG_CONFIG_PRIVATE_DATA_SIGNATURE);
>  
>gBS->UninstallMultipleProtocolInterfaces (
> - ,
> + ImageHandle,
>   ,
>   PrivateData,
>   NULL
> diff --git 
> a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDriver.c
>  
> b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDriver.c
> index 798ef9cfbc01..6c0294151e6c 100644
> --- 
> a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDriver.c
> +++ 
> b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDriver.c
> @@ -115,7 +115,7 @@ SecureBootConfigDriverUnload (
>ASSERT (PrivateData->Signature == 
> SECUREBOOT_CONFIG_PRIVATE_DATA_SIGNATURE);
>  
>gBS->UninstallMultipleProtocolInterfaces (
> - ,
> + ImageHandle,
>   ,
>   PrivateData,
>   NULL
> 

Reviewed-by: Philippe Mathieu-Daude 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47844): https://edk2.groups.io/g/devel/message/47844
Mute This Topic: https://groups.io/mt/34180228/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] DebugFeaturePkg: Remove white space and update the ending format

2019-09-23 Thread Philippe Mathieu-Daudé
On 9/6/19 7:16 PM, Zhang, Shenglei wrote:
> Remove white space in AcpiDebug.c.
> The original end of last line in DebugFeaturePkg.dsc is '/r'.
> Now update it to '/r/n'.
> 
> Cc: Eric Dong 
> Cc: Liming Gao 
> Signed-off-by: Shenglei Zhang 
> ---
> v2: In v1 the patch remove the '/r'. In v2 it is updated to '/r/n'.
> The v1 patch is "DebugFeaturePkg: Remove white space and white ending 
> line".
> 
>  Platform/Intel/DebugFeaturePkg/AcpiDebug/AcpiDebug.c | 3 +--
>  Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dsc   | 2 +-
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/Platform/Intel/DebugFeaturePkg/AcpiDebug/AcpiDebug.c 
> b/Platform/Intel/DebugFeaturePkg/AcpiDebug/AcpiDebug.c
> index f9cd8bcb..5ad8d259 100644
> --- a/Platform/Intel/DebugFeaturePkg/AcpiDebug/AcpiDebug.c
> +++ b/Platform/Intel/DebugFeaturePkg/AcpiDebug/AcpiDebug.c
> @@ -487,7 +487,7 @@ InitializeAcpiDebugSmm (
>if (EFI_ERROR (Status)) {
>  return Status;
>}
> -
> +
>Status = SmmBase2->InSmm (SmmBase2, );
>ASSERT_EFI_ERROR (Status);
>if (EFI_ERROR (Status)) {
> @@ -519,4 +519,3 @@ InitializeAcpiDebugSmm (
>
>return Status;
>  }
> -
> diff --git a/Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dsc 
> b/Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dsc
> index 30f57d5d..8e5ff4c9 100644
> --- a/Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dsc
> +++ b/Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dsc
> @@ -98,4 +98,4 @@
>DebugFeaturePkg/AcpiDebug/AcpiDebugSmm.inf
>
>  [BuildOptions]
> -  *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
> \ No newline at end of file
> +  *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
> 

Reviewed-by: Philippe Mathieu-Daude 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47843): https://edk2.groups.io/g/devel/message/47843
Mute This Topic: https://groups.io/mt/33169036/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] UserInterfaceFeaturePkg: Update the end of last line

2019-09-23 Thread Philippe Mathieu-Daudé
On 9/6/19 7:16 PM, Zhang, Shenglei wrote:
> The original the of last line is '/r'. Now update it to '/r/n'.
> 
> Cc: Dandan Bi 
> Cc: Liming Gao 
> Signed-off-by: Shenglei Zhang 
> ---
> v2: In v1 the patch remove the '/r'. In v2 it is updated to '/r/n'.
> The v1 patch is "UserInterfaceFeaturePkg:Remove white ending line in DSC 
> file".
> 
>  .../Intel/UserInterfaceFeaturePkg/UserInterfaceFeaturePkg.dsc   | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git 
> a/Platform/Intel/UserInterfaceFeaturePkg/UserInterfaceFeaturePkg.dsc 
> b/Platform/Intel/UserInterfaceFeaturePkg/UserInterfaceFeaturePkg.dsc
> index e97bed53..6c5f77b5 100644
> --- a/Platform/Intel/UserInterfaceFeaturePkg/UserInterfaceFeaturePkg.dsc
> +++ b/Platform/Intel/UserInterfaceFeaturePkg/UserInterfaceFeaturePkg.dsc
> @@ -77,4 +77,4 @@
>UserInterfaceFeaturePkg/UserAuthentication/UserAuthenticationSmm.inf
>
>  [BuildOptions]
> -  *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
> \ No newline at end of file
> +  *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
> 

Reviewed-by: Philippe Mathieu-Daude 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47842): https://edk2.groups.io/g/devel/message/47842
Mute This Topic: https://groups.io/mt/33169035/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 6/7] OvmfPkg: strip trailing whitespace

2019-09-23 Thread Philippe Mathieu-Daudé
On 9/20/19 12:24 PM, Leif Lindholm wrote:
> 
> On Fri, Sep 20, 2019 at 08:13:36AM +0200, Laszlo Ersek wrote:
>> On 09/19/19 20:06, Leif Lindholm wrote:
>>> Cc: Jordan Justen 
>>> Cc: Laszlo Ersek 
>>> Cc: Ard Biesheuvel 
>>> Cc: Anthony Perard 
>>> Cc: Julien Grall 
>>> Cc: David Woodhouse 
>>> Signed-off-by: Leif Lindholm 
>>> ---
>>>  OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c |   4 ++--
>>>  OvmfPkg/AcpiPlatformDxe/Xen.c  |   8 
>>>  OvmfPkg/AcpiTables/Facs.aslc   |   6 +++---
>>>  OvmfPkg/Csm/LegacyBootMaintUiLib/LegacyBootMaintUiVfr.Vfr  |  18 
>>> +-
>>>  OvmfPkg/Include/IndustryStandard/Xen/arch-x86/xen-x86_32.h |   4 ++--
>>>  OvmfPkg/Include/IndustryStandard/Xen/arch-x86/xen-x86_64.h |   4 ++--
>>>  OvmfPkg/Include/IndustryStandard/Xen/arch-x86/xen.h|   4 ++--
>>>  OvmfPkg/Include/IndustryStandard/Xen/hvm/params.h  |   2 +-
>>>  OvmfPkg/Include/IndustryStandard/Xen/io/protocols.h|   2 +-
>>>  OvmfPkg/Include/IndustryStandard/Xen/io/ring.h |  34 
>>> +-
>>>  OvmfPkg/Include/IndustryStandard/Xen/memory.h  |   4 ++--
>>>  OvmfPkg/Include/IndustryStandard/Xen/xen-compat.h  |   4 ++--
>>>  OvmfPkg/Include/IndustryStandard/Xen/xen.h |  10 +-
>>>  OvmfPkg/Include/Register/QemuSmramSaveStateMap.h   |   2 +-
>>>  OvmfPkg/Library/DxePciLibI440FxQ35/PciLib.c|  12 
>>> ++--
>>>  OvmfPkg/Library/LockBoxLib/LockBoxDxe.c|   2 +-
>>>  OvmfPkg/Library/LockBoxLib/LockBoxLib.c|   2 +-
>>>  OvmfPkg/Library/LockBoxLib/LockBoxLib.h|   2 +-
>>>  OvmfPkg/Library/PlatformSecureLib/PlatformSecureLib.c  |   4 ++--
>>>  OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.c|   2 +-
>>>  OvmfPkg/Library/XenIoMmioLib/XenIoMmioLib.c|   2 +-
>>>  OvmfPkg/PlatformPei/Xen.c  |   2 +-
>>>  OvmfPkg/SataControllerDxe/ComponentName.c  |   6 +++---
>>>  OvmfPkg/SataControllerDxe/SataController.c | 214 
>>> +++---
>>>  OvmfPkg/SataControllerDxe/SataController.h | 208 
>>> 
>>
>> (did you forget --stat-graph-width=20?)
> 
> Hmm...
> *scratches head*
> First of all, I saw that before sending out and didn't even reflect on
> it. Clearly past git-send-email-o-clock.
> 
> Secondly, I have
> [diff]
> statGraphWidth = 20
> in .git/config from running SetupGit.py.
> 
> Oh, rubbish. From git-diff manpage:
> ---
> The width of the graph part can be limited by using
> --stat-graph-width= (affects all commands generating a stat
> graph) or by setting diff.statGraphWidth= (does not affect git
> format-patch).

TIL this doesn't affect git-format-patch... Odd.

> ---
> I had missed that bit. So yeah, that setting in SetupGit.py is
> completely meaningless.
> (Why would you give those two different code paths?!?)
> 
> Which given we already can't set --stat ...
> Do you think it might be a good idea to set up a few standard aliases?
> 
>>>  OvmfPkg/SataControllerDxe/SataControllerDxe.inf|   6 +++---
>>>  OvmfPkg/Sec/SecMain.c  |  34 
>>> +-
>>>  27 files changed, 301 insertions(+), 301 deletions(-)
>>
>> I've checked this patch with "git show -b" (--> nothing) and "git show
>> --word-diff" (--> output consists purely of context).
>>
>> Reviewed-by: Laszlo Ersek 

Reviewed-by: Philippe Mathieu-Daude 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47840): https://edk2.groups.io/g/devel/message/47840
Mute This Topic: https://groups.io/mt/34202575/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 7/7] UefiCpuPkg: strip trailing whitespace

2019-09-23 Thread Philippe Mathieu-Daudé
On 9/19/19 8:06 PM, Leif Lindholm wrote:
> Cc: Eric Dong 
> Cc: Ray Ni 
> Cc: Laszlo Ersek 
> Signed-off-by: Leif Lindholm 
> ---
>  UefiCpuPkg/Application/Cpuid/Cpuid.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/UefiCpuPkg/Application/Cpuid/Cpuid.c 
> b/UefiCpuPkg/Application/Cpuid/Cpuid.c
> index f39a7fb33ae5..cee64f2fb5fc 100644
> --- a/UefiCpuPkg/Application/Cpuid/Cpuid.c
> +++ b/UefiCpuPkg/Application/Cpuid/Cpuid.c
> @@ -709,7 +709,7 @@ CpuidArchitecturalPerformanceMonitoring (
>Display CPUID_EXTENDED_TOPOLOGY leafs for all supported levels.
>  
>@param[in] LeafFunction  Leaf function index for CPUID_EXTENDED_TOPOLOGY.
> -  
> +
>  **/
>  VOID
>  CpuidExtendedTopology (
> 

Reviewed-by: Philippe Mathieu-Daude 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47841): https://edk2.groups.io/g/devel/message/47841
Mute This Topic: https://groups.io/mt/34202574/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 2/7] ArmPlatformPkg: strip trailing whitespace

2019-09-23 Thread Philippe Mathieu-Daudé
On 9/19/19 8:06 PM, Leif Lindholm wrote:
> Cc: Ard Biesheuvel 
> Signed-off-by: Leif Lindholm 
> ---
>  ArmPlatformPkg/Scripts/Ds5/profile.py | 2 +-
>  ArmPlatformPkg/Scripts/Makefile   | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/ArmPlatformPkg/Scripts/Ds5/profile.py 
> b/ArmPlatformPkg/Scripts/Ds5/profile.py
> index 8f74cf2a8bdf..f87dee24695c 100644
> --- a/ArmPlatformPkg/Scripts/Ds5/profile.py
> +++ b/ArmPlatformPkg/Scripts/Ds5/profile.py
> @@ -321,7 +321,7 @@ for (key,value) in sorted_functions_cycles[:20]:
>   else:
>   break;
>  print ""
> -for (key,value) in sorted_all_functions_cycles[:20]: 
> +for (key,value) in sorted_all_functions_cycles[:20]:
>   if value[0] != 0:
>   print "%s (cycles: %d - %d%%, count: %d)" % (key, value[0], 
> (value[0] * 100) / total_cycles, value[1])
>   else:
> diff --git a/ArmPlatformPkg/Scripts/Makefile b/ArmPlatformPkg/Scripts/Makefile
> index 09f1c9092328..da949dc1ed56 100644
> --- a/ArmPlatformPkg/Scripts/Makefile
> +++ b/ArmPlatformPkg/Scripts/Makefile
> @@ -1,6 +1,6 @@
>  #/* @file
>  #  Copyright (c) 2011-2015, ARM Limited. All rights reserved.
> -#
> +#
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent
>  #
>  #*/
> 

Reviewed-by: Philippe Mathieu-Daude 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47838): https://edk2.groups.io/g/devel/message/47838
Mute This Topic: https://groups.io/mt/34202569/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 4/7] EmulatorPkg: strip trailing whitespace

2019-09-23 Thread Philippe Mathieu-Daudé
On 9/19/19 8:06 PM, Leif Lindholm wrote:
> Cc: Jordan Justen 
> Cc: Andrew Fish 
> Cc: Ray Ni 
> Signed-off-by: Leif Lindholm 
> ---
>  EmulatorPkg/Readme.md | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/EmulatorPkg/Readme.md b/EmulatorPkg/Readme.md
> index 5ea61ca7ab5a..0c2eea6a9a02 100644
> --- a/EmulatorPkg/Readme.md
> +++ b/EmulatorPkg/Readme.md
> @@ -57,12 +57,12 @@ emulator.**
>
>  For example, to build + run:
>
> -`$ EmulatorPkg/build.sh`
> +`$ EmulatorPkg/build.sh`
>  `$ EmulatorPkg/build.sh run`
>
>  The build architecture will match your host machine's architecture.
>
>  On X64 host machines, you can build + run IA32 mode as well:
>
> -`$ EmulatorPkg/build.sh -a IA32`
> +`$ EmulatorPkg/build.sh -a IA32`
>  `$ EmulatorPkg/build.sh -a IA32 run`
> 

Reviewed-by: Philippe Mathieu-Daude 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47839): https://edk2.groups.io/g/devel/message/47839
Mute This Topic: https://groups.io/mt/34202571/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/7] ArmPkg: strip trailing whitespace

2019-09-23 Thread Philippe Mathieu-Daudé
On 9/19/19 8:06 PM, Leif Lindholm wrote:
> Cc: Ard Biesheuvel 
> Signed-off-by: Leif Lindholm 
> ---
>  ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf 
> b/ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
> index f4fecbb4098a..5028a955afac 100644
> --- a/ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
> +++ b/ArmPkg/Library/ArmMmuLib/ArmMmuBaseLib.inf
> @@ -22,8 +22,8 @@ [Sources.AARCH64]
>
>  [Sources.ARM]
>Arm/ArmMmuLibCore.c
> -  Arm/ArmMmuLibV7Support.S   |GCC 
> -  Arm/ArmMmuLibV7Support.asm |RVCT 
> +  Arm/ArmMmuLibV7Support.S   |GCC
> +  Arm/ArmMmuLibV7Support.asm |RVCT
>
>  [Packages]
>ArmPkg/ArmPkg.dec
> 

Reviewed-by: Philippe Mathieu-Daude 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47837): https://edk2.groups.io/g/devel/message/47837
Mute This Topic: https://groups.io/mt/34202568/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms][PATCH V1 01/12] Platform/Intel: Remove N1xxWU board build option

2019-09-23 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Kubacki,
> Michael A
> Sent: Saturday, September 21, 2019 2:40 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Sinha, Ankit ;
> Jeremy Soller 
> Subject: [edk2-devel] [edk2-platforms][PATCH V1 01/12] Platform/Intel:
> Remove N1xxWU board build option
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207
> 
> The N1xxWU board contents will be moved to KabylakeOpenBoardPkg to
> reduce code duplication between ClevoOpenBoardPkg and
> KabylakeOpenBoardPkg.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Ankit Sinha 
> Cc: Jeremy Soller 
> Signed-off-by: Michael Kubacki 
> ---
>  Platform/Intel/build.cfg | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/Platform/Intel/build.cfg b/Platform/Intel/build.cfg index
> 75cb446aa5..04e8f4fa64 100644
> --- a/Platform/Intel/build.cfg
> +++ b/Platform/Intel/build.cfg
> @@ -55,6 +55,4 @@ NUMBER_OF_PROCESSORS = 0  BoardMtOlympus =
> PurleyOpenBoardPkg/BoardMtOlympus/build_config.cfg
>  BoardX58Ich10 = SimicsOpenBoardPkg/BoardX58Ich10/build_config.cfg
>  KabylakeRvp3 = KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
> -N1xxWU = ClevoOpenBoardPkg/N1xxWU/build_config.cfg
>  WhiskeylakeURvp =
> WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.cfg
> -
> --
> 2.16.2.windows.1
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47836): https://edk2.groups.io/g/devel/message/47836
Mute This Topic: https://groups.io/mt/34233769/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms][PATCH V1 10/12] KabylakeOpenBoardPkg/GalagoPro3: Add modules

2019-09-23 Thread Chiu, Chasel
Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Kubacki, Michael A 
> Sent: Saturday, September 21, 2019 2:40 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Sinha, Ankit ;
> Jeremy Soller 
> Subject: [edk2-platforms][PATCH V1 10/12]
> KabylakeOpenBoardPkg/GalagoPro3: Add modules
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207
> 
> Adds the modules used for System 76 Galago Pro 3 board support.
> 
> This override should be removed in a future cleanup change. That is outside
> the scope of this change which is to move the contents from
> ClevoOpenBoardPkg/N1xxWU to KabylakeOpenBoardPkg/GalagoPro3.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Ankit Sinha 
> Cc: Jeremy Soller 
> Signed-off-by: Michael Kubacki 
> ---
> 
> Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/Intel/
> MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf |  67
> ++
> 
> Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/Intel/
> MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c   | 640
> 
>  2 files changed, 707 insertions(+)
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/Inte
> l/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/Inte
> l/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
> new file mode 100644
> index 00..76dd67d1a8
> --- /dev/null
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/I
> +++ ntel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.
> +++ inf
> @@ -0,0 +1,67 @@
> +### @file
> +# Component information file for the Platform Init Pre-Memory PEI module.
> +#
> +# Copyright (c) 2019, Intel Corporation. All rights reserved. # #
> +SPDX-License-Identifier: BSD-2-Clause-Patent # ###
> +
> +[Defines]
> +  INF_VERSION= 0x00010017
> +  BASE_NAME  = PlatformInitPreMem
> +  FILE_GUID  =
> 611D-F78F-4FB9-B868-55907F169280
> +  VERSION_STRING = 1.0
> +  MODULE_TYPE= PEIM
> +  ENTRY_POINT= PlatformInitPreMemEntryPoint
> +
> +[LibraryClasses]
> +  BaseMemoryLib
> +  BoardInitLib
> +  DebugLib
> +  HobLib
> +  IoLib
> +  MemoryAllocationLib
> +  MtrrLib
> +  PeimEntryPoint
> +  PeiServicesLib
> +  ReportFvLib
> +  TestPointCheckLib
> +  TimerLib
> +
> +[Packages]
> +  MinPlatformPkg/MinPlatformPkg.dec
> +  MdeModulePkg/MdeModulePkg.dec
> +  MdePkg/MdePkg.dec
> +  UefiCpuPkg/UefiCpuPkg.dec
> +
> +[Pcd]
> +  gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode
> ## CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaBaseAddress##
> CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize   ##
> CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit  ##
> CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit##
> CONSUMES
> +
> +[FixedPcd]
> +  gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiAcpiReclaimMemorySize
> ## CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiAcpiNvsMemorySize
> ## CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiReservedMemorySize
> ## CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiRtDataMemorySize
> ## CONSUMES
> +  gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiRtCodeMemorySize
> ## CONSUMES
> +
> +[Sources]
> +  PlatformInitPreMem.c
> +
> +[Ppis]
> +  gEfiPeiMemoryDiscoveredPpiGuid
> +  gEfiPeiMasterBootModePpiGuid  ## PRODUCES
> +  gEfiPeiBootInRecoveryModePpiGuid  ## PRODUCES
> +  gEfiPeiReadOnlyVariable2PpiGuid
> +  gPeiBaseMemoryTestPpiGuid
> +  gPeiPlatformMemorySizePpiGuid
> +
> +[Guids]
> +  gEfiMemoryTypeInformationGuid
> +
> +[Depex]
> +  gEfiPeiReadOnlyVariable2PpiGuid
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/Inte
> l/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/Inte
> l/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
> new file mode 100644
> index 00..b784026c1b
> --- /dev/null
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/I
> +++ ntel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.
> +++ c
> @@ -0,0 +1,640 @@
> +/** @file
> +  Source code file for Platform Init Pre-Memory PEI module
> +
> +Copyright (c) 2019, Intel Corporation. All rights reserved.
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include  #include
> + #include 
> +
> +EFI_STATUS
> +EFIAPI
> 

Re: [edk2-devel] [edk2-platforms][PATCH V1 08/12] KabylakeOpenBoardPkg/GalagoPro3: Add headers

2019-09-23 Thread Chiu, Chasel
Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Kubacki, Michael A 
> Sent: Saturday, September 21, 2019 2:40 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Sinha, Ankit ;
> Jeremy Soller 
> Subject: [edk2-platforms][PATCH V1 08/12]
> KabylakeOpenBoardPkg/GalagoPro3: Add headers
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207
> 
> Adds the Galago Pro 3 board ID header file.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Ankit Sinha 
> Cc: Jeremy Soller 
> Signed-off-by: Michael Kubacki 
> ---
>  Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Include/GalagoPro3Id.h
> | 13 +
>  1 file changed, 13 insertions(+)
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Include/GalagoPro3Id.
> h
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Include/GalagoPro3Id.
> h
> new file mode 100644
> index 00..5999f18edf
> --- /dev/null
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Include/GalagoPro3Id.
> h
> @@ -0,0 +1,13 @@
> +/** @file
> +
> +Copyright (c) 2019, Intel Corporation. All rights reserved.
> +SPDX-License-Identifier: BSD-2-Clause-Patent
> +
> +**/
> +
> +#ifndef _GALAGO_PRO_3_ID_H_
> +#define _GALAGO_PRO_3_ID_H_
> +
> +#define BoardIdGalagoPro3 0x60
> +
> +#endif
> --
> 2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47834): https://edk2.groups.io/g/devel/message/47834
Mute This Topic: https://groups.io/mt/34233776/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms][PATCH V1 06/12] KabylakeOpenBoardPkg: Move flash map to board

2019-09-23 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Kubacki, Michael A 
> Sent: Saturday, September 21, 2019 2:40 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Sinha, Ankit ;
> Jeremy Soller 
> Subject: [edk2-platforms][PATCH V1 06/12] KabylakeOpenBoardPkg: Move
> flash map to board
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207
> 
> The flash map currently in KabylakeOpenBoardPkg is only applicable to the
> KabylakeRvp3 board. This change moves the flash map to that board
> directory to prepare for other boards to reside in the package.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Ankit Sinha 
> Cc: Jeremy Soller 
> Signed-off-by: Michael Kubacki 
> ---
>  Platform/Intel/KabylakeOpenBoardPkg/{ =>
> KabylakeRvp3}/Include/Fdf/FlashMapInclude.fdf | 0
>  Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
> | 2 +-
>  Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
> | 2 +-
>  3 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/Include/Fdf/FlashMapInclude.fdf
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Include/Fdf/FlashMa
> pInclude.fdf
> similarity index 100%
> rename from
> Platform/Intel/KabylakeOpenBoardPkg/Include/Fdf/FlashMapInclude.fdf
> rename to
> Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Include/Fdf/FlashMapI
> nclude.fdf
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
> index 7267d478ad..2b8eab36a1 100644
> --- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
> @@ -8,7 +8,7 @@
>  ##
> 
>  [Defines]
> -   !include
> $(PLATFORM_BOARD_PACKAGE)/Include/Fdf/FlashMapInclude.fdf
> +   !include $(PROJECT)/Include/Fdf/FlashMapInclude.fdf
> 
> 
> 
> 
>  #
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
> index ab1a9a61c2..78f808bfaf 100644
> --- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
> @@ -13,7 +13,7 @@ openssl_path =
>  PLATFORM_BOARD_PACKAGE = KabylakeOpenBoardPkg  PROJECT =
> KabylakeOpenBoardPkg/KabylakeRvp3  BOARD = KabylakeRvp3
> -FLASH_MAP_FDF =
> KabylakeOpenBoardPkg/Include/Fdf/FlashMapInclude.fdf
> +FLASH_MAP_FDF =
> +KabylakeOpenBoardPkg/KabylakeRvp3/Include/Fdf/FlashMapInclude.fdf
>  PROJECT_DSC = KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
>  BOARD_PKG_PCD_DSC =
> KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.dsc
>  ADDITIONAL_SCRIPTS =
> KabylakeOpenBoardPkg/KabylakeRvp3/build_board.py
> --
> 2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47833): https://edk2.groups.io/g/devel/message/47833
Mute This Topic: https://groups.io/mt/34233774/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH 1/1] MdeModulePkg/SdMmcPciHcDxe: Fix bus timing switch sequence

2019-09-23 Thread Albecki, Mateusz
SD specification recommends switching card bus timing before
switching bus timing in controller. Emmc driver used to do
this switch other way around. This commit adds controller
timing switch in EmmcSwitchBusTiming function to enforce this
order and removes all controller timing programing from
EmmcSwitchToXXX functions.

Signed-off-by: Mateusz Albecki 
Cc: Hao A Wu 
Cc: Marcin Wojtas 
---
 MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c | 79 +++--
 1 file changed, 20 insertions(+), 59 deletions(-)

diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c 
b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c
index 3f4a8e5413..06ee1208be 100644
--- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c
+++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c
@@ -671,6 +671,7 @@ EmmcSwitchBusTiming (
   UINT8 CmdSet;
   UINT32DevStatus;
   SD_MMC_HC_PRIVATE_DATA*Private;
+  UINT8 HostCtrl1;
 
   Private = SD_MMC_HC_PRIVATE_FROM_THIS (PassThru);
   //
@@ -704,6 +705,25 @@ EmmcSwitchBusTiming (
 return Status;
   }
 
+  if (BusTiming == SdMmcMmcHsSdr || BusTiming == SdMmcMmcHsDdr) {
+HostCtrl1 = BIT2;
+Status = SdMmcHcOrMmio (PciIo, Slot, SD_MMC_HC_HOST_CTRL1, sizeof 
(HostCtrl1), );
+if (EFI_ERROR (Status)) {
+  return Status;
+}
+  } else {
+HostCtrl1 = (UINT8)~BIT2;
+Status = SdMmcHcAndMmio (PciIo, Slot, SD_MMC_HC_HOST_CTRL1, sizeof 
(HostCtrl1), );
+if (EFI_ERROR (Status)) {
+  return Status;
+}
+  }
+
+  Status = SdMmcHcUhsSignaling (Private->ControllerHandle, PciIo, Slot, 
BusTiming);
+  if (EFI_ERROR (Status)) {
+return Status;
+  }
+
   //
   // Convert the clock freq unit from MHz to KHz.
   //
@@ -772,7 +792,6 @@ EmmcSwitchToHighSpeed (
   )
 {
   EFI_STATUS  Status;
-  UINT8   HostCtrl1;
   SD_MMC_HC_PRIVATE_DATA  *Private;
   BOOLEAN IsDdr;
 
@@ -794,20 +813,6 @@ EmmcSwitchToHighSpeed (
 return Status;
   }
 
-  //
-  // Set to High Speed timing
-  //
-  HostCtrl1 = BIT2;
-  Status = SdMmcHcOrMmio (PciIo, Slot, SD_MMC_HC_HOST_CTRL1, sizeof 
(HostCtrl1), );
-  if (EFI_ERROR (Status)) {
-return Status;
-  }
-
-  Status = SdMmcHcUhsSignaling (Private->ControllerHandle, PciIo, Slot, 
BusMode->BusTiming);
-  if (EFI_ERROR (Status)) {
-return Status;
-  }
-
   return EmmcSwitchBusTiming (PciIo, PassThru, Slot, Rca, 
BusMode->DriverStrength, BusMode->BusTiming, BusMode->ClockFreq);
 }
 
@@ -837,7 +842,6 @@ EmmcSwitchToHS200 (
   )
 {
   EFI_STATUS   Status;
-  UINT16   ClockCtrl;
   SD_MMC_HC_PRIVATE_DATA  *Private;
 
   Private = SD_MMC_HC_PRIVATE_FROM_THIS (PassThru);
@@ -851,39 +855,6 @@ EmmcSwitchToHS200 (
   if (EFI_ERROR (Status)) {
 return Status;
   }
-  //
-  // Stop bus clock at first
-  //
-  Status = SdMmcHcStopClock (PciIo, Slot);
-  if (EFI_ERROR (Status)) {
-return Status;
-  }
-
-  Status = SdMmcHcUhsSignaling (Private->ControllerHandle, PciIo, Slot, 
BusMode->BusTiming);
-  if (EFI_ERROR (Status)) {
-return Status;
-  }
-
-  //
-  // Wait Internal Clock Stable in the Clock Control register to be 1 before 
set SD Clock Enable bit
-  //
-  Status = SdMmcHcWaitMmioSet (
- PciIo,
- Slot,
- SD_MMC_HC_CLOCK_CTRL,
- sizeof (ClockCtrl),
- BIT1,
- BIT1,
- SD_MMC_HC_GENERIC_TIMEOUT
- );
-  if (EFI_ERROR (Status)) {
-return Status;
-  }
-  //
-  // Set SD Clock Enable in the Clock Control register to 1
-  //
-  ClockCtrl = BIT2;
-  Status = SdMmcHcOrMmio (PciIo, Slot, SD_MMC_HC_CLOCK_CTRL, sizeof 
(ClockCtrl), );
 
   Status = EmmcSwitchBusTiming (PciIo, PassThru, Slot, Rca, 
BusMode->DriverStrength, BusMode->BusTiming, BusMode->ClockFreq);
   if (EFI_ERROR (Status)) {
@@ -945,11 +916,6 @@ EmmcSwitchToHS400 (
   // Set to High Speed timing and set the clock frequency to a value less than 
or equal to 52MHz.
   // This step is necessary to be able to switch Bus into 8 bit DDR mode which 
is unsupported in HS200.
   //
-  Status = SdMmcHcUhsSignaling (Private->ControllerHandle, PciIo, Slot, 
SdMmcMmcHsSdr);
-  if (EFI_ERROR (Status)) {
-return Status;
-  }
-
   HsFreq = BusMode->ClockFreq < 52 ? BusMode->ClockFreq : 52;
   Status = EmmcSwitchBusTiming (PciIo, PassThru, Slot, Rca, 
BusMode->DriverStrength, SdMmcMmcHsSdr, HsFreq);
   if (EFI_ERROR (Status)) {
@@ -961,11 +927,6 @@ EmmcSwitchToHS400 (
 return Status;
   }
 
-  Status = SdMmcHcUhsSignaling (Private->ControllerHandle, PciIo, Slot, 
BusMode->BusTiming);
-  if (EFI_ERROR (Status)) {
-return Status;
-  }
-
   return EmmcSwitchBusTiming (PciIo, PassThru, Slot, Rca, 
BusMode->DriverStrength, BusMode->BusTiming, BusMode->ClockFreq);
 }
 
-- 
2.14.1.windows.1



Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk 

Re: [edk2-devel] [edk2-platforms][PATCH V1 11/12] KabylakeOpenBoardPkg/GalagoPro3: Add build files

2019-09-23 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Kubacki,
> Michael A
> Sent: Saturday, September 21, 2019 2:40 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Sinha, Ankit ;
> Jeremy Soller 
> Subject: [edk2-devel] [edk2-platforms][PATCH V1 11/12]
> KabylakeOpenBoardPkg/GalagoPro3: Add build files
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207
> 
>  * Adds files required to build the GalagoPro3 board to the board
>directory.
>  * Updates KabylakeOpenBoardPkg/OpenBoardPkg.dec to reference
>the new GalagoPro3 board directory.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Ankit Sinha 
> Cc: Jeremy Soller 
> Signed-off-by: Michael Kubacki 
> ---
>  Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec
> |   4 +-
>  Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> | 385 +++
> 
> Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgBuildOpti
> on.dsc | 151 +
> 
> Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgConfig.dsc
> | 132 
>  Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc
> | 265 
> 
> Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Include/Fdf/FlashMapInc
> lude.fdf |  48 ++
>  Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf
> | 716 
>  Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg
> |  33 +
>  8 files changed, 1732 insertions(+), 2 deletions(-)
> 
> diff --git a/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec
> b/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec
> index 383c34537d..bdaf728af1 100644
> --- a/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec
> @@ -1,5 +1,5 @@
>  ## @file
> -# Module describe the entire platform configuration.
> +# Declaration file for Kaby Lake based boards.
>  #
>  # The DEC files are used by the utilities that parse DSC and
>  # INF files to generate AutoGen.c and AutoGen.h files
> @@ -20,6 +20,7 @@ PACKAGE_GUID =
> 0A8BA6E8-C8AC-4AC1-87AC-52772FA6AE5E
> 
>  [Includes]
>  Include
> +GalagoPro3/Include
>  KabylakeRvp3/Include
>  Features/Tbt/Include
> 
> @@ -303,7 +304,6 @@
> gBoardModuleTokenSpaceGuid.PcdIoExpanderPresent|FALSE|BOOLEAN|0x0
> 0EC
> 
> 
> gBoardModuleTokenSpaceGuid.PcdAcpiGnvsAddress|0|UINT64|0x4013
> 
> -  # gIntelPeiGraphicsVbtGuid =  {0x4ad46122, 0xffeb, 0x4a52, {0xbf, 0xb0,
> 0x51, 0x8c, 0xfc, 0xa0, 0x2d, 0xb0}}
>gBoardModuleTokenSpaceGuid.PcdGraphicsVbtGuid|{0x22, 0x61, 0xd4,
> 0x4a, 0xeb, 0xff, 0x52, 0x4a, 0xbf, 0xb0, 0x51, 0x8c, 0xfc, 0xa0, 0x2d,
> 0xb0}|VOID*|0x4014
> 
>  [PcdsDynamicEx]
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> new file mode 100644
> index 00..3e7f5c6b8a
> --- /dev/null
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> @@ -0,0 +1,385 @@
> +## @file
> +#  System 76 GalagoPro3 board description file.
> +#
> +# Copyright (c) 2019, Intel Corporation. All rights reserved.
> +#
> +# SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +##
> +[Defines]
> +  #
> +  # Set platform specific package/folder name, same as passed from
> PREBUILD script.
> +  # PLATFORM_PACKAGE would be the same as PLATFORM_NAME as well
> as package build folder
> +  # DEFINE only takes effect at R9 DSC and FDF.
> +  #
> +  DEFINE  PLATFORM_PACKAGE= MinPlatformPkg
> +  DEFINE  PLATFORM_SI_PACKAGE =
> KabylakeSiliconPkg
> +  DEFINE  PLATFORM_SI_BIN_PACKAGE =
> KabylakeSiliconBinPkg
> +  DEFINE  PLATFORM_FSP_BIN_PACKAGE=
> KabylakeFspBinPkg
> +  DEFINE  PLATFORM_BOARD_PACKAGE  =
> KabylakeOpenBoardPkg
> +  DEFINE  BOARD   = GalagoPro3
> +  DEFINE  PROJECT =
> $(PLATFORM_BOARD_PACKAGE)/$(BOARD)
> +
> +  #
> +  # Platform On/Off features are defined here
> +  #
> +  !include OpenBoardPkgConfig.dsc
> +
> +###
> #
> +#
> +# Defines Section - statements that will be processed to create a Makefile.
> +#
> +###
> #
> +[Defines]
> +  PLATFORM_NAME   = $(PLATFORM_PACKAGE)
> +  PLATFORM_GUID   =
> 7324F33D-4E96-4F8B-A550-544DE6162AB7
> +  PLATFORM_VERSION= 0.1
> +  DSC_SPECIFICATION   = 0x00010005
> +  OUTPUT_DIRECTORY= Build/$(PROJECT)
> +  SUPPORTED_ARCHITECTURES = IA32|X64
> +  BUILD_TARGETS   = DEBUG|RELEASE
> +  SKUID_IDENTIFIER= ALL
> +
> +
> +  FLASH_DEFINITION=
> $(PROJECT)/OpenBoardPkg.fdf
> +
> +  FIX_LOAD_TOP_MEMORY_ADDRESS = 0x0
> +  DEFINE   

[edk2-devel] [PATCH 0/1] Fix eMMC bus timing switch issue

2019-09-23 Thread Albecki, Mateusz
SD host controller specification section 3.9 recommends that controller's bus 
timing
should be switched after card's bus timing has been switched. In current eMMC
driver implementation every host controller switch has been done before call to
EmmcSwitchBusTiming which is causing issues on some eMMC controllers.

In HS200 switch sequence we removed stopping and starting the SD clock when
switching the host controller timing. Stopping the clock before bus timing
switch is only neccessary if preset value enable is set in host controller.
Current code doesn't check if this field is enabled or doesn't support
this feature for any other bus timing change so it has been removed.

Tests performed:
- eMMC enumeration and OS boot in HS400
- eMMC enumeration and OS boot in HS200
- eMMC enumeration and OS boot in high speed SDR 8bit @52MHz

Tests have been performed on 2 eMMC host controllers. One that has been failing
with old driver and one that has been passing with old driver. Both controllers
pass all tests with multiple eMMC devices used.

Note: We were unable to test DDR speed mode because on test machines both new 
flow
and old flow was failing with this speed. I suspect it is a hardware problem.

Cc: Hao A Wu 
Cc: Marcin Wojtas 

Albecki, Mateusz (1):
  MdeModulePkg/SdMmcPciHcDxe: Fix bus timing switch sequence

 MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c | 54 +++--
 1 file changed, 5 insertions(+), 49 deletions(-)

-- 
2.14.1.windows.1



Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial 
Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | 
Kapital zakladowy 200.000 PLN.

Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i 
moze zawierac informacje poufne. W razie przypadkowego otrzymania tej 
wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; 
jakiekolwiek
przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole 
use of the intended recipient(s). If you are not the intended recipient, please 
contact the sender and delete all copies; any review or distribution by
others is strictly prohibited.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47831): https://edk2.groups.io/g/devel/message/47831
Mute This Topic: https://groups.io/mt/34262001/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms][PATCH V1 07/12] KabylakeOpenBoardPkg: Add PeiSerialPortLibSpiFlash

2019-09-23 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Kubacki, Michael A 
> Sent: Saturday, September 21, 2019 2:40 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Sinha, Ankit ;
> Jeremy Soller 
> Subject: [edk2-platforms][PATCH V1 07/12] KabylakeOpenBoardPkg: Add
> PeiSerialPortLibSpiFlash
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207
> 
> PeiSerialPortLibSpiFlash is currently used for early boot closed chassis debug
> on production systems such as the System 76 Galago Pro laptop. This change
> moves the library to KabylakeOpenBoardPkg from ClevoOpenBoardPkg since
> the Clevo package is being removes for code consolidation.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Ankit Sinha 
> Cc: Jeremy Soller 
> Signed-off-by: Michael Kubacki 
> ---
>  Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec
> |   6 +
> 
> Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiS
> erialPortLibSpiFlash.inf |  50 +++
> 
> Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiS
> erialPortLibSpiFlash.c   | 320 
>  3 files changed, 376 insertions(+)
> 
> diff --git a/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec
> b/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec
> index 68977d081e..383c34537d 100644
> --- a/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec
> @@ -29,6 +29,8 @@ gBoardModuleTokenSpaceGuid=
> {0x72d1fff7, 0xa42a, 0x4219, {0xb9, 0x9
> 
>  gTianoLogoGuid=  {0x7BB28B99, 0x61BB,
> 0x11D5, {0x9A, 0x5D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D}}
> 
> +gSpiFlashDebugHobGuid =  {0xcaaaf418, 0x38a5,
> 0x4d49, {0xbe, 0x74, 0xe6, 0x06, 0xe4, 0x02, 0x6d, 0x25}}
> +
>  gTbtInfoHobGuid   =  {0x74a81eaa, 0x033c,
> 0x4783, {0xbe, 0x2b, 0x84, 0x85, 0x74, 0xa6, 0x97, 0xb7}}
> 
>  gPlatformModuleTokenSpaceGuid =  {0x69d13bf0, 0xaf91,
> 0x4d96, {0xaa, 0x9f, 0x21, 0x84, 0xc5, 0xce, 0x3b, 0xc0}}
> @@ -65,6 +67,10 @@
> gBoardModuleTokenSpaceGuid.PcdSwSmiDTbtEnumerate|0xF7|UINT8|0x000
> 000110
> 
> 
> gBoardModuleTokenSpaceGuid.PcdSmcExtSmiBitPosition|0x01|UINT8|0x900
> 00015
> 
> +gBoardModuleTokenSpaceGuid.PcdFlashNvDebugMessageBase|0x
> |UINT32
> +|0x9030
> +gBoardModuleTokenSpaceGuid.PcdFlashNvDebugMessageSize|0x
> |UINT32
> +|0x9031
> +gBoardModuleTokenSpaceGuid.PcdFlashNvDebugMessageOffset|0x00
> 00|UINT
> +32|0x9032
> +
>  [PcdsDynamic]
> 
>  # Board GPIO Table
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/Pei
> SerialPortLibSpiFlash.inf
> b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/Pe
> iSerialPortLibSpiFlash.inf
> new file mode 100644
> index 00..ed93d0785f
> --- /dev/null
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFla
> +++ sh/PeiSerialPortLibSpiFlash.inf
> @@ -0,0 +1,50 @@
> +### @file
> +# Component description file for Serial I/O Port library to write to SPI 
> flash.
> +#
> +# Copyright (c) 2019, Intel Corporation. All rights reserved. # #
> +SPDX-License-Identifier: BSD-2-Clause-Patent # ##
> +
> +[Defines]
> +  INF_VERSION= 0x00010005
> +  BASE_NAME  = PeiSerialPortLibFlash
> +  FILE_GUID  =
> 35A3BA89-04BE-409C-A3CA-DEF6B510F80F
> +  VERSION_STRING = 1.1
> +  MODULE_TYPE= PEIM
> +  LIBRARY_CLASS  = SerialPortLib|PEIM PEI_CORE
> +#
> +# The following information is for reference only and not required by the
> build tools.
> +#
> +# VALID_ARCHITECTURES = IA32 X64 IPF
> +#
> +
> +[LibraryClasses]
> +  BaseLib
> +  BaseMemoryLib
> +  HobLib
> +  PcdLib
> +  PeiServicesLib
> +  SpiLib
> +
> +[Packages]
> +  MdePkg/MdePkg.dec
> +  MdeModulePkg/MdeModulePkg.dec
> +  MinPlatformPkg/MinPlatformPkg.dec
> +  KabylakeSiliconPkg/SiPkg.dec
> +  KabylakeOpenBoardPkg/OpenBoardPkg.dec
> +
> +[Sources]
> +  PeiSerialPortLibSpiFlash.c
> +
> +[Ppis]
> +  gPchSpiPpiGuid
> +
> +[Guids]
> +  gSpiFlashDebugHobGuid
> +
> +[Pcd]
> +  gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaBaseAddress
> ## CONSUMES
> +  gBoardModuleTokenSpaceGuid.PcdFlashNvDebugMessageBase
> ## CONSUMES
> +  gBoardModuleTokenSpaceGuid.PcdFlashNvDebugMessageSize
> ## CONSUMES
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/Pei
> SerialPortLibSpiFlash.c
> b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/Pe
> iSerialPortLibSpiFlash.c
> new file mode 100644
> index 00..0230149a38
> --- /dev/null
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFla
> +++ sh/PeiSerialPortLibSpiFlash.c
> @@ -0,0 +1,320 @@
> +/** @file
> +  Serial I/O Port library implementation for output to SPI flash
> +
> +Copyright (c) 2019, Intel Corporation. All rights reserved.
> +SPDX-License-Identifier: 

Re: [edk2-devel] [edk2-platforms][PATCH V1 05/12] KabylakeOpenBoardPkg: Move EcCommands.h to KabylakeRvp3 board

2019-09-23 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Kubacki,
> Michael A
> Sent: Saturday, September 21, 2019 2:40 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Sinha, Ankit ;
> Jeremy Soller 
> Subject: [edk2-devel] [edk2-platforms][PATCH V1 05/12]
> KabylakeOpenBoardPkg: Move EcCommands.h to KabylakeRvp3 board
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207
> 
> EC command details may vary across Kaby Lake boards. This change moves
> this set of EC commands to the KabylakeRvp3 directory since these
> commands are specifically used by that board at this time.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Ankit Sinha 
> Cc: Jeremy Soller 
> Signed-off-by: Michael Kubacki 
> ---
>  Platform/Intel/KabylakeOpenBoardPkg/{ =>
> KabylakeRvp3}/Include/EcCommands.h | 0
>  1 file changed, 0 insertions(+), 0 deletions(-)
> 
> diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Include/EcCommands.h
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Include/EcCommand
> s.h
> similarity index 100%
> rename from Platform/Intel/KabylakeOpenBoardPkg/Include/EcCommands.h
> rename to
> Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Include/EcCommands.
> h
> --
> 2.16.2.windows.1
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47827): https://edk2.groups.io/g/devel/message/47827
Mute This Topic: https://groups.io/mt/34233773/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms PATCH v2] SimicsOpenBoardPkg: Always set the boot priority by default

2019-09-23 Thread Nate DeSimone
With the minor style changes noted by Michael fixed...

Reviewed-by: Nate DeSimone 

-Original Message-
From: Wei, David Y  
Sent: Monday, September 16, 2019 3:39 PM
To: devel@edk2.groups.io
Cc: Wu, Hao A ; Gao, Liming ; Sinha, 
Ankit ; Agyeman, Prince ; 
Kubacki, Michael A ; Desimone, Nathaniel L 
; Kinney, Michael D 
Subject: [edk2-platforms PATCH v2] SimicsOpenBoardPkg: Always set the boot 
priority by default

When running networks of multiple machines, Simics assigns different disk IDs 
to each disk created.this change the boot priority and can't boot from SATA HDD 
directly.
Clear boot priority in NVRAM can fix this issue.

Cc: Hao Wu 
Cc: Liming Gao 
Cc: Ankit Sinha 
Cc: Agyeman Prince 
Cc: Kubacki Michael A 
Cc: Nate DeSimone 
Cc: Michael D Kinney 

Signed-off-by: David Wei 
---
 .../Library/PlatformBootManagerLib/BdsPlatform.c   | 14 +++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git 
a/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c
 
b/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c
index 953a4a6c15..6644ce124e 100644
--- 
a/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/BdsPlatform.c
+++ b/Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/B
+++ dsPlatform.c
@@ -338,10 +338,18 @@ PlatformBootManagerBeforeConsole (
   VOID
   )
 {
-//  EFI_HANDLEHandle;
-//  EFI_STATUSStatus;
+  EFI_BOOT_MANAGER_LOAD_OPTION  *NvBootOptions;
+  UINTN NvBootOptionCount;
+  UINTN Index;
+  EFI_STATUSStatus;
+
+  DEBUG((DEBUG_INFO, "PlatformBootManagerBeforeConsole\n"));
+
+  NvBootOptions = EfiBootManagerGetLoadOptions(, 
+ LoadOptionTypeBoot);  for (Index = 0; Index < NvBootOptionCount; Index++) {
+Status = 
+ EfiBootManagerDeleteLoadOptionVariable(NvBootOptions[Index].OptionNumb
+ er, LoadOptionTypeBoot);  }
 
-  DEBUG ((EFI_D_INFO, "PlatformBootManagerBeforeConsole\n"));
   InstallDevicePathCallback ();
 
   VisitAllInstancesOfProtocol (,
--
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47826): https://edk2.groups.io/g/devel/message/47826
Mute This Topic: https://groups.io/mt/34170508/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-non-osi][PATCH V1 1/1] edk2-non-osi: Rename ClevoOpenBoardBinPkg to KabylakeOpenBoardBinPkg

2019-09-23 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

-Original Message-
From: Kubacki, Michael A  
Sent: Friday, September 20, 2019 11:40 AM
To: devel@edk2.groups.io
Cc: Desimone, Nathaniel L ; Sinha, Ankit 
; Jeremy Soller 
Subject: [edk2-non-osi][PATCH V1 1/1] edk2-non-osi: Rename ClevoOpenBoardBinPkg 
to KabylakeOpenBoardBinPkg

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207

 * Renames the package to align with removal of ClevoOpenBoardPkg.
 * Updates the KabylakeOpenBoardBinPkg maintainer list.

Cc: Nate DeSimone 
Cc: Ankit Sinha 
Cc: Jeremy Soller 
Signed-off-by: Michael Kubacki 
---
 Maintainers.txt
|   3 +--
 Platform/Intel/{ClevoOpenBoardBinPkg/N1xxWU => 
KabylakeOpenBoardBinPkg/GalagoPro3}/Gop/Vbt.bin | Bin
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/Maintainers.txt b/Maintainers.txt index 5759e4c..f72caa1 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -41,9 +41,8 @@ W: 
https://github.com/tianocore/tianocore.github.io/wiki/Security
 EDK II Packages:
 
 
-Platform/Intel/ClevoOpenBoardBinPkg
+Platform/Intel/KabylakeOpenBoardBinPkg
 M: Michael Kubacki 
-M: Ankit Sinha 
 M: Nate DeSimone 
 
 Platform/Intel/CoffeelakeSiliconBinPkg
diff --git a/Platform/Intel/ClevoOpenBoardBinPkg/N1xxWU/Gop/Vbt.bin 
b/Platform/Intel/KabylakeOpenBoardBinPkg/GalagoPro3/Gop/Vbt.bin
similarity index 100%
rename from Platform/Intel/ClevoOpenBoardBinPkg/N1xxWU/Gop/Vbt.bin
rename to Platform/Intel/KabylakeOpenBoardBinPkg/GalagoPro3/Gop/Vbt.bin
--
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47824): https://edk2.groups.io/g/devel/message/47824
Mute This Topic: https://groups.io/mt/34233755/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms][PATCH V1 04/12] KabylakeOpenBoardPkg: Move policy update libs to KabylakeRvp3 board

2019-09-23 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Kubacki,
> Michael A
> Sent: Saturday, September 21, 2019 2:40 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L
> ; Sinha, Ankit ;
> Jeremy Soller 
> Subject: [edk2-devel] [edk2-platforms][PATCH V1 04/12]
> KabylakeOpenBoardPkg: Move policy update libs to KabylakeRvp3 board
> 
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207
> 
> To prepare KabylakeOpenBoardPkg for multi-board support, the policy
> update libraries should be moved to the individual board directory.
> Prevously KabylakeOpenBoardPkg only supported the KabylakeRvp3 board
> and the policy update libraries were kept above the board directory level.
> 
> Cc: Chasel Chiu 
> Cc: Nate DeSimone 
> Cc: Ankit Sinha 
> Cc: Jeremy Soller 
> Signed-off-by: Michael Kubacki 
> ---
>  Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> | 6 +++---
>  Platform/Intel/KabylakeOpenBoardPkg/{ =>
> KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSiliconP
> olicyUpdateLibFsp.inf | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ =>
> KabylakeRvp3}/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSiliconPolicyUpd
> ateLib.inf   | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ =>
> KabylakeRvp3}/Policy/Library/PeiSiliconPolicyUpdateLib/PeiSiliconPolicyUpda
> teLib.inf   | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ =>
> KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiPchPolic
> yUpdate.h | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ =>
> KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSaPolicy
> Update.h  | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ =>
> KabylakeRvp3}/Policy/Library/DxeSiliconPolicyUpdateLib/DxeGopPolicyInit.h
> | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ =>
> KabylakeRvp3}/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSaPolicyInit.h
> | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ =>
> KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PcieDevice
> Table.c| 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ =>
> KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiFspMisc
> UpdUpdateLib.c | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ =>
> KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiFspPolic
> yUpdateLib.c  | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ =>
> KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiPchPolic
> yUpdate.c | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ =>
> KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiPchPolic
> yUpdatePreMem.c   | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ =>
> KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSaPolicy
> Update.c  | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ =>
> KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSaPolicy
> UpdatePreMem.c| 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ =>
> KabylakeRvp3}/Policy/Library/DxeSiliconPolicyUpdateLib/DxeGopPolicyInit.c
> | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ =>
> KabylakeRvp3}/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSaPolicyUpdate.
> c | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ =>
> KabylakeRvp3}/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSiliconPolicyUpd
> ateLib.c | 0
>  Platform/Intel/KabylakeOpenBoardPkg/{ =>
> KabylakeRvp3}/Policy/Library/PeiSiliconPolicyUpdateLib/PeiSiliconPolicyUpda
> teLib.c | 0
>  19 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> index 813ca040a1..7090852192 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
> @@ -127,13 +127,13 @@
>#
># Below library are used by FSP API mode
>#
> -
> SiliconPolicyUpdateLib|$(PLATFORM_BOARD_PACKAGE)/FspWrapper/Library/
> PeiSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf
> +
> + SiliconPolicyUpdateLib|$(PROJECT)/FspWrapper/Library/PeiSiliconPolicyU
> + pdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf
> 
> SiliconPolicyInitLib|$(PLATFORM_SI_PACKAGE)/Library/PeiSiliconPolicyInitLib
> Fsp/PeiSiliconPolicyInitLibFsp.inf
>  !else
>#
># Below library are used by FSP Dispatch mode and non-FSP build (EDK2
> build)
>#
> -
> SiliconPolicyUpdateLib|$(PLATFORM_BOARD_PACKAGE)/Policy/Library/PeiSili
> conPolicyUpdateLib/PeiSiliconPolicyUpdateLib.inf
> +
> + SiliconPolicyUpdateLib|$(PROJECT)/Policy/Library/PeiSiliconPolicyUpdat
> + eLib/PeiSiliconPolicyUpdateLib.inf
> 
> SiliconPolicyInitLib|$(PLATFORM_SI_PACKAGE)/Library/PeiSiliconPolicyInitLib
> Fsp/PeiSiliconPolicyInitLibFspAml.inf
>  !endif
> 
> @@ -196,7 +196,7 @@
> 
> 

Re: [edk2-devel] [edk2-platforms][PATCH V1 12/12] Add GalagoPro3 board details to global build and documentation

2019-09-23 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Kubacki, Michael 
A
Sent: Friday, September 20, 2019 11:41 AM
To: devel@edk2.groups.io
Cc: Chiu, Chasel ; Desimone, Nathaniel L 
; Sinha, Ankit ; Jeremy 
Soller 
Subject: [edk2-devel] [edk2-platforms][PATCH V1 12/12] Add GalagoPro3 board 
details to global build and documentation

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207

 * Updates maintainers for the System 76 GalagoPro3 board
 * Updated Readme.md with System 76 GalagoPro3 board details
 * Adds the ability to build the GalagoPro3 board to build.cfg

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Ankit Sinha 
Cc: Jeremy Soller 
Signed-off-by: Michael Kubacki 
---
 Maintainers.txt  |  3 ++
 Platform/Intel/Readme.md | 44 +---  Platform/Intel/build.cfg | 
 1 +
 3 files changed, 34 insertions(+), 14 deletions(-)

diff --git a/Maintainers.txt b/Maintainers.txt index a30ee2f602..1260c8d246 
100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -87,6 +87,9 @@ M: Chasel Chiu 
 M: Michael Kubacki 
 M: Nate DeSimone 
 
+Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3
+R: Jeremy Soller 
+
 Platform/Intel/MinPlatformPkg
 M: Michael Kubacki 
 M: Chasel Chiu 
diff --git a/Platform/Intel/Readme.md b/Platform/Intel/Readme.md index 
6a9b1d2e00..03fa4c2315 100644
--- a/Platform/Intel/Readme.md
+++ b/Platform/Intel/Readme.md
@@ -83,6 +83,15 @@ A UEFI firmware implementation using MinPlatformPkg is 
constructed using the fol  
||--||
 | Simics Quick Start Package| Nehalem  
  | SimicsOpenBoardPkg   | BoardX58Ich10  |
 
+ System 76
+
+***Galago Pro Laptop***
+
+| Machine Name  | Supported Chipsets   
  | BoardPkg | Board Name |
+||--||
+| galp2 | Kaby Lake
  | KabylakeOpenBoardPkg | GalagoPro3 |
+| galp3 & galp3-b   | Kaby Lake Refresh
  | KabylakeOpenBoardPkg | GalagoPro3 |
+
 ## Board Package Organization
 The board package follows the standard EDK II package structure with the 
following additional elements and guidelines:
 * Only code usable across more than one board at the root level.
@@ -217,28 +226,31 @@ return back to the minimum platform caller.
   |   || post-build, and clean 
functions.
   |   ||
   |   ||--KabylakeOpenBoardPkg
-  |   |||--KabylakeRvp3
-  |   ||  |---build_config.cfg: 
KabylakeRvp3 specific
-  |   ||  | build 
settings, environment variables.
-  |   ||  |---build_board.py: Optional 
board-specific pre-build, build
-  |   ||  and clean 
post-build functions.
+  |   ||   |--GalagoPro3
+  |   ||   |   |---build_config.cfg: System 76 
Galago Pro 3 specific build
+  |   ||   | settings 
environment variables.
+  |   ||   |--KabylakeRvp3
+  |   ||   |---build_config.cfg: KabylakeRvp3 
specific
+  |   ||   | build 
settings, environment variables.
+  |   ||   |---build_board.py: Optional 
board-specific pre-build, build
+  |   ||   and clean 
post-build functions.
   |   ||
   |   ||--PurleyOpenBoardPkg
   |   ||   |--BoardMtOlympus
-  |   |||---build_config.cfg: 
BoardMtOlympus specific
-  |   ||| build 
settings, environment variables.
-  |   |||---build_board.py: Optional 
board-specific pre-build,
-  |   ||build, 
post-build and clean functions.
+  |   ||   |---build_config.cfg: 
BoardMtOlympus specific
+  |   ||   | build 
settings, environment variables.
+  |   ||   |---build_board.py: Optional 
board-specific pre-build,
+  |   ||   build, 
post-build and clean functions.
   | 

Re: [edk2-devel] [edk2-platforms][PATCH V1 11/12] KabylakeOpenBoardPkg/GalagoPro3: Add build files

2019-09-23 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

-Original Message-
From: Kubacki, Michael A  
Sent: Friday, September 20, 2019 11:40 AM
To: devel@edk2.groups.io
Cc: Chiu, Chasel ; Desimone, Nathaniel L 
; Sinha, Ankit ; Jeremy 
Soller 
Subject: [edk2-platforms][PATCH V1 11/12] KabylakeOpenBoardPkg/GalagoPro3: Add 
build files

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207

 * Adds files required to build the GalagoPro3 board to the board
   directory.
 * Updates KabylakeOpenBoardPkg/OpenBoardPkg.dec to reference
   the new GalagoPro3 board directory.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Ankit Sinha 
Cc: Jeremy Soller 
Signed-off-by: Michael Kubacki 
---
 Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec   
|   4 +-
 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
| 385 +++
 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgBuildOption.dsc 
| 151 +
 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgConfig.dsc  
| 132 
 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc 
| 265 
 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Include/Fdf/FlashMapInclude.fdf 
|  48 ++
 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf
| 716 
 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg
|  33 +
 8 files changed, 1732 insertions(+), 2 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec 
b/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec
index 383c34537d..bdaf728af1 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec
+++ b/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec
@@ -1,5 +1,5 @@
 ## @file
-# Module describe the entire platform configuration.
+# Declaration file for Kaby Lake based boards.
 #
 # The DEC files are used by the utilities that parse DSC and
 # INF files to generate AutoGen.c and AutoGen.h files
@@ -20,6 +20,7 @@ PACKAGE_GUID = 0A8BA6E8-C8AC-4AC1-87AC-52772FA6AE5E
 
 [Includes]
 Include
+GalagoPro3/Include
 KabylakeRvp3/Include
 Features/Tbt/Include
 
@@ -303,7 +304,6 @@ 
gBoardModuleTokenSpaceGuid.PcdIoExpanderPresent|FALSE|BOOLEAN|0x00EC
 
   gBoardModuleTokenSpaceGuid.PcdAcpiGnvsAddress|0|UINT64|0x4013
 
-  # gIntelPeiGraphicsVbtGuid =  {0x4ad46122, 0xffeb, 0x4a52, {0xbf, 0xb0, 
0x51, 0x8c, 0xfc, 0xa0, 0x2d, 0xb0}}
   gBoardModuleTokenSpaceGuid.PcdGraphicsVbtGuid|{0x22, 0x61, 0xd4, 0x4a, 0xeb, 
0xff, 0x52, 0x4a, 0xbf, 0xb0, 0x51, 0x8c, 0xfc, 0xa0, 0x2d, 
0xb0}|VOID*|0x4014
 
 [PcdsDynamicEx]
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
new file mode 100644
index 00..3e7f5c6b8a
--- /dev/null
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
@@ -0,0 +1,385 @@
+## @file
+#  System 76 GalagoPro3 board description file.
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+[Defines]
+  #
+  # Set platform specific package/folder name, same as passed from PREBUILD 
script.
+  # PLATFORM_PACKAGE would be the same as PLATFORM_NAME as well as package 
build folder
+  # DEFINE only takes effect at R9 DSC and FDF.
+  #
+  DEFINE  PLATFORM_PACKAGE= MinPlatformPkg
+  DEFINE  PLATFORM_SI_PACKAGE = KabylakeSiliconPkg
+  DEFINE  PLATFORM_SI_BIN_PACKAGE = KabylakeSiliconBinPkg
+  DEFINE  PLATFORM_FSP_BIN_PACKAGE= KabylakeFspBinPkg
+  DEFINE  PLATFORM_BOARD_PACKAGE  = KabylakeOpenBoardPkg
+  DEFINE  BOARD   = GalagoPro3
+  DEFINE  PROJECT = 
$(PLATFORM_BOARD_PACKAGE)/$(BOARD)
+
+  #
+  # Platform On/Off features are defined here
+  #
+  !include OpenBoardPkgConfig.dsc
+
+
+#
+# Defines Section - statements that will be processed to create a Makefile.
+#
+
+[Defines]
+  PLATFORM_NAME   = $(PLATFORM_PACKAGE)
+  PLATFORM_GUID   = 7324F33D-4E96-4F8B-A550-544DE6162AB7
+  PLATFORM_VERSION= 0.1
+  DSC_SPECIFICATION   = 0x00010005
+  OUTPUT_DIRECTORY= Build/$(PROJECT)
+  SUPPORTED_ARCHITECTURES = IA32|X64
+  BUILD_TARGETS   = DEBUG|RELEASE
+  SKUID_IDENTIFIER= ALL
+
+
+  FLASH_DEFINITION= $(PROJECT)/OpenBoardPkg.fdf
+
+  FIX_LOAD_TOP_MEMORY_ADDRESS = 0x0
+  DEFINE   TOP_MEMORY_ADDRESS = 0x0
+
+  #
+  # Default value for OpenBoardPkg.fdf use
+  #
+  DEFINE BIOS_SIZE_OPTION = SIZE_60
+
+
+#
+# SKU Identification 

Re: [edk2-devel] [edk2-platforms][PATCH V1 10/12] KabylakeOpenBoardPkg/GalagoPro3: Add modules

2019-09-23 Thread Nate DeSimone
I would like us to re-evaluate whether an override of PlatformInitPreMem is 
really needed... but I understand that is not in scope for this patch series.

Reviewed-by: Nate DeSimone 

-Original Message-
From: Kubacki, Michael A  
Sent: Friday, September 20, 2019 11:40 AM
To: devel@edk2.groups.io
Cc: Chiu, Chasel ; Desimone, Nathaniel L 
; Sinha, Ankit ; Jeremy 
Soller 
Subject: [edk2-platforms][PATCH V1 10/12] KabylakeOpenBoardPkg/GalagoPro3: Add 
modules

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207

Adds the modules used for System 76 Galago Pro 3 board support.

This override should be removed in a future cleanup change. That is outside the 
scope of this change which is to move the contents from 
ClevoOpenBoardPkg/N1xxWU to KabylakeOpenBoardPkg/GalagoPro3.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Ankit Sinha 
Cc: Jeremy Soller 
Signed-off-by: Michael Kubacki 
---
 
Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
 |  67 ++
 
Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
   | 640 
 2 files changed, 707 insertions(+)

diff --git 
a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
 
b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
new file mode 100644
index 00..76dd67d1a8
--- /dev/null
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/I
+++ ntel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.
+++ inf
@@ -0,0 +1,67 @@
+### @file
+# Component information file for the Platform Init Pre-Memory PEI module.
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved. # # 
+SPDX-License-Identifier: BSD-2-Clause-Patent # ###
+
+[Defines]
+  INF_VERSION= 0x00010017
+  BASE_NAME  = PlatformInitPreMem
+  FILE_GUID  = 611D-F78F-4FB9-B868-55907F169280
+  VERSION_STRING = 1.0
+  MODULE_TYPE= PEIM
+  ENTRY_POINT= PlatformInitPreMemEntryPoint
+
+[LibraryClasses]
+  BaseMemoryLib
+  BoardInitLib
+  DebugLib
+  HobLib
+  IoLib
+  MemoryAllocationLib
+  MtrrLib
+  PeimEntryPoint
+  PeiServicesLib
+  ReportFvLib
+  TestPointCheckLib
+  TimerLib
+
+[Packages]
+  MinPlatformPkg/MinPlatformPkg.dec
+  MdeModulePkg/MdeModulePkg.dec
+  MdePkg/MdePkg.dec
+  UefiCpuPkg/UefiCpuPkg.dec
+
+[Pcd]
+  gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode  ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaBaseAddress## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize   ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit  ## CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit## CONSUMES
+
+[FixedPcd]
+  gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiAcpiReclaimMemorySize  ## 
CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiAcpiNvsMemorySize  ## 
CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiReservedMemorySize ## 
CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiRtDataMemorySize   ## 
CONSUMES
+  gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiRtCodeMemorySize   ## 
CONSUMES
+
+[Sources]
+  PlatformInitPreMem.c
+
+[Ppis]
+  gEfiPeiMemoryDiscoveredPpiGuid
+  gEfiPeiMasterBootModePpiGuid  ## PRODUCES
+  gEfiPeiBootInRecoveryModePpiGuid  ## PRODUCES
+  gEfiPeiReadOnlyVariable2PpiGuid
+  gPeiBaseMemoryTestPpiGuid
+  gPeiPlatformMemorySizePpiGuid
+
+[Guids]
+  gEfiMemoryTypeInformationGuid
+
+[Depex]
+  gEfiPeiReadOnlyVariable2PpiGuid
diff --git 
a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
 
b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.c
new file mode 100644
index 00..b784026c1b
--- /dev/null
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Override/Platform/I
+++ ntel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.
+++ c
@@ -0,0 +1,640 @@
+/** @file
+  Source code file for Platform Init Pre-Memory PEI module
+
+Copyright (c) 2019, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include  #include 
+ #include 
+
+EFI_STATUS
+EFIAPI
+MemoryDiscoveredPpiNotifyCallback (
+  IN CONST EFI_PEI_SERVICES  **PeiServices,
+  IN EFI_PEI_NOTIFY_DESCRIPTOR   *NotifyDescriptor,

Re: [edk2-devel] [edk2-platforms][PATCH V1 07/12] KabylakeOpenBoardPkg: Add PeiSerialPortLibSpiFlash

2019-09-23 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

-Original Message-
From: Kubacki, Michael A  
Sent: Friday, September 20, 2019 11:40 AM
To: devel@edk2.groups.io
Cc: Chiu, Chasel ; Desimone, Nathaniel L 
; Sinha, Ankit ; Jeremy 
Soller 
Subject: [edk2-platforms][PATCH V1 07/12] KabylakeOpenBoardPkg: Add 
PeiSerialPortLibSpiFlash

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207

PeiSerialPortLibSpiFlash is currently used for early boot closed chassis debug 
on production systems such as the System 76 Galago Pro laptop. This change 
moves the library to KabylakeOpenBoardPkg from ClevoOpenBoardPkg since the 
Clevo package is being removes for code consolidation.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Ankit Sinha 
Cc: Jeremy Soller 
Signed-off-by: Michael Kubacki 
---
 Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec   
   |   6 +
 
Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.inf
 |  50 +++
 
Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.c
   | 320 
 3 files changed, 376 insertions(+)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec 
b/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec
index 68977d081e..383c34537d 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec
+++ b/Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec
@@ -29,6 +29,8 @@ gBoardModuleTokenSpaceGuid=  {0x72d1fff7, 0xa42a, 
0x4219, {0xb9, 0x9
 
 gTianoLogoGuid=  {0x7BB28B99, 0x61BB, 0x11D5, {0x9A, 
0x5D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D}}
 
+gSpiFlashDebugHobGuid =  {0xcaaaf418, 0x38a5, 0x4d49, {0xbe, 
0x74, 0xe6, 0x06, 0xe4, 0x02, 0x6d, 0x25}}
+
 gTbtInfoHobGuid   =  {0x74a81eaa, 0x033c, 0x4783, {0xbe, 
0x2b, 0x84, 0x85, 0x74, 0xa6, 0x97, 0xb7}}
 
 gPlatformModuleTokenSpaceGuid =  {0x69d13bf0, 0xaf91, 0x4d96, {0xaa, 
0x9f, 0x21, 0x84, 0xc5, 0xce, 0x3b, 0xc0}}
@@ -65,6 +67,10 @@ 
gBoardModuleTokenSpaceGuid.PcdSwSmiDTbtEnumerate|0xF7|UINT8|0x00110
 
 gBoardModuleTokenSpaceGuid.PcdSmcExtSmiBitPosition|0x01|UINT8|0x9015
 
+gBoardModuleTokenSpaceGuid.PcdFlashNvDebugMessageBase|0x|UINT32
+|0x9030
+gBoardModuleTokenSpaceGuid.PcdFlashNvDebugMessageSize|0x|UINT32
+|0x9031
+gBoardModuleTokenSpaceGuid.PcdFlashNvDebugMessageOffset|0x|UINT
+32|0x9032
+
 [PcdsDynamic]
 
 # Board GPIO Table
diff --git 
a/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.inf
 
b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.inf
new file mode 100644
index 00..ed93d0785f
--- /dev/null
+++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFla
+++ sh/PeiSerialPortLibSpiFlash.inf
@@ -0,0 +1,50 @@
+### @file
+# Component description file for Serial I/O Port library to write to SPI flash.
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved. # # 
+SPDX-License-Identifier: BSD-2-Clause-Patent # ##
+
+[Defines]
+  INF_VERSION= 0x00010005
+  BASE_NAME  = PeiSerialPortLibFlash
+  FILE_GUID  = 35A3BA89-04BE-409C-A3CA-DEF6B510F80F
+  VERSION_STRING = 1.1
+  MODULE_TYPE= PEIM
+  LIBRARY_CLASS  = SerialPortLib|PEIM PEI_CORE
+#
+# The following information is for reference only and not required by the 
build tools.
+#
+# VALID_ARCHITECTURES = IA32 X64 IPF
+#
+
+[LibraryClasses]
+  BaseLib
+  BaseMemoryLib
+  HobLib
+  PcdLib
+  PeiServicesLib
+  SpiLib
+
+[Packages]
+  MdePkg/MdePkg.dec
+  MdeModulePkg/MdeModulePkg.dec
+  MinPlatformPkg/MinPlatformPkg.dec
+  KabylakeSiliconPkg/SiPkg.dec
+  KabylakeOpenBoardPkg/OpenBoardPkg.dec
+
+[Sources]
+  PeiSerialPortLibSpiFlash.c
+
+[Ppis]
+  gPchSpiPpiGuid
+
+[Guids]
+  gSpiFlashDebugHobGuid
+
+[Pcd]
+  gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaBaseAddress   ## CONSUMES
+  gBoardModuleTokenSpaceGuid.PcdFlashNvDebugMessageBase   ## CONSUMES
+  gBoardModuleTokenSpaceGuid.PcdFlashNvDebugMessageSize   ## CONSUMES
diff --git 
a/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.c
 
b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFlash/PeiSerialPortLibSpiFlash.c
new file mode 100644
index 00..0230149a38
--- /dev/null
+++ b/Platform/Intel/KabylakeOpenBoardPkg/Library/PeiSerialPortLibSpiFla
+++ sh/PeiSerialPortLibSpiFlash.c
@@ -0,0 +1,320 @@
+/** @file
+  Serial I/O Port library implementation for output to SPI flash
+
+Copyright (c) 2019, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+typedef struct {
+  PCH_SPI_PPI   *PchSpiPpi;
+  UINT32

Re: [edk2-devel] [edk2-platforms][PATCH V1 08/12] KabylakeOpenBoardPkg/GalagoPro3: Add headers

2019-09-23 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

-Original Message-
From: Kubacki, Michael A  
Sent: Friday, September 20, 2019 11:40 AM
To: devel@edk2.groups.io
Cc: Chiu, Chasel ; Desimone, Nathaniel L 
; Sinha, Ankit ; Jeremy 
Soller 
Subject: [edk2-platforms][PATCH V1 08/12] KabylakeOpenBoardPkg/GalagoPro3: Add 
headers

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207

Adds the Galago Pro 3 board ID header file.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Ankit Sinha 
Cc: Jeremy Soller 
Signed-off-by: Michael Kubacki 
---
 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Include/GalagoPro3Id.h | 13 
+
 1 file changed, 13 insertions(+)

diff --git 
a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Include/GalagoPro3Id.h 
b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Include/GalagoPro3Id.h
new file mode 100644
index 00..5999f18edf
--- /dev/null
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Include/GalagoPro3Id.h
@@ -0,0 +1,13 @@
+/** @file
+
+Copyright (c) 2019, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef _GALAGO_PRO_3_ID_H_
+#define _GALAGO_PRO_3_ID_H_
+
+#define BoardIdGalagoPro3 0x60
+
+#endif
-- 
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47818): https://edk2.groups.io/g/devel/message/47818
Mute This Topic: https://groups.io/mt/34233776/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms][PATCH V1 06/12] KabylakeOpenBoardPkg: Move flash map to board

2019-09-23 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

-Original Message-
From: Kubacki, Michael A  
Sent: Friday, September 20, 2019 11:40 AM
To: devel@edk2.groups.io
Cc: Chiu, Chasel ; Desimone, Nathaniel L 
; Sinha, Ankit ; Jeremy 
Soller 
Subject: [edk2-platforms][PATCH V1 06/12] KabylakeOpenBoardPkg: Move flash map 
to board

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207

The flash map currently in KabylakeOpenBoardPkg is only applicable to the 
KabylakeRvp3 board. This change moves the flash map to that board directory to 
prepare for other boards to reside in the package.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Ankit Sinha 
Cc: Jeremy Soller 
Signed-off-by: Michael Kubacki 
---
 Platform/Intel/KabylakeOpenBoardPkg/{ => 
KabylakeRvp3}/Include/Fdf/FlashMapInclude.fdf | 0
 Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf  
| 2 +-
 Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg  
| 2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/Platform/Intel/KabylakeOpenBoardPkg/Include/Fdf/FlashMapInclude.fdf 
b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Include/Fdf/FlashMapInclude.fdf
similarity index 100%
rename from Platform/Intel/KabylakeOpenBoardPkg/Include/Fdf/FlashMapInclude.fdf
rename to 
Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Include/Fdf/FlashMapInclude.fdf
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf 
b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
index 7267d478ad..2b8eab36a1 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf
@@ -8,7 +8,7 @@
 ##
 
 [Defines]
-   !include $(PLATFORM_BOARD_PACKAGE)/Include/Fdf/FlashMapInclude.fdf
+   !include $(PROJECT)/Include/Fdf/FlashMapInclude.fdf
 
 

 #
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg 
b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
index ab1a9a61c2..78f808bfaf 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
@@ -13,7 +13,7 @@ openssl_path =
 PLATFORM_BOARD_PACKAGE = KabylakeOpenBoardPkg  PROJECT = 
KabylakeOpenBoardPkg/KabylakeRvp3  BOARD = KabylakeRvp3 -FLASH_MAP_FDF = 
KabylakeOpenBoardPkg/Include/Fdf/FlashMapInclude.fdf
+FLASH_MAP_FDF = 
+KabylakeOpenBoardPkg/KabylakeRvp3/Include/Fdf/FlashMapInclude.fdf
 PROJECT_DSC = KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
 BOARD_PKG_PCD_DSC = KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.dsc
 ADDITIONAL_SCRIPTS = KabylakeOpenBoardPkg/KabylakeRvp3/build_board.py
--
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47816): https://edk2.groups.io/g/devel/message/47816
Mute This Topic: https://groups.io/mt/34233774/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms][PATCH V1 05/12] KabylakeOpenBoardPkg: Move EcCommands.h to KabylakeRvp3 board

2019-09-23 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Kubacki, Michael 
A
Sent: Friday, September 20, 2019 11:40 AM
To: devel@edk2.groups.io
Cc: Chiu, Chasel ; Desimone, Nathaniel L 
; Sinha, Ankit ; Jeremy 
Soller 
Subject: [edk2-devel] [edk2-platforms][PATCH V1 05/12] KabylakeOpenBoardPkg: 
Move EcCommands.h to KabylakeRvp3 board

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207

EC command details may vary across Kaby Lake boards. This change moves this set 
of EC commands to the KabylakeRvp3 directory since these commands are 
specifically used by that board at this time.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Ankit Sinha 
Cc: Jeremy Soller 
Signed-off-by: Michael Kubacki 
---
 Platform/Intel/KabylakeOpenBoardPkg/{ => KabylakeRvp3}/Include/EcCommands.h | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Include/EcCommands.h 
b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Include/EcCommands.h
similarity index 100%
rename from Platform/Intel/KabylakeOpenBoardPkg/Include/EcCommands.h
rename to Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Include/EcCommands.h
--
2.16.2.windows.1





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47815): https://edk2.groups.io/g/devel/message/47815
Mute This Topic: https://groups.io/mt/34233773/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms][PATCH V1 04/12] KabylakeOpenBoardPkg: Move policy update libs to KabylakeRvp3 board

2019-09-23 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Kubacki, Michael 
A
Sent: Friday, September 20, 2019 11:40 AM
To: devel@edk2.groups.io
Cc: Chiu, Chasel ; Desimone, Nathaniel L 
; Sinha, Ankit ; Jeremy 
Soller 
Subject: [edk2-devel] [edk2-platforms][PATCH V1 04/12] KabylakeOpenBoardPkg: 
Move policy update libs to KabylakeRvp3 board

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207

To prepare KabylakeOpenBoardPkg for multi-board support, the policy update 
libraries should be moved to the individual board directory.
Prevously KabylakeOpenBoardPkg only supported the KabylakeRvp3 board and the 
policy update libraries were kept above the board directory level.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Ankit Sinha 
Cc: Jeremy Soller 
Signed-off-by: Michael Kubacki 
---
 Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc  
 | 6 +++---
 Platform/Intel/KabylakeOpenBoardPkg/{ => 
KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf
 | 0
 Platform/Intel/KabylakeOpenBoardPkg/{ => 
KabylakeRvp3}/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSiliconPolicyUpdateLib.inf
   | 0
 Platform/Intel/KabylakeOpenBoardPkg/{ => 
KabylakeRvp3}/Policy/Library/PeiSiliconPolicyUpdateLib/PeiSiliconPolicyUpdateLib.inf
   | 0
 Platform/Intel/KabylakeOpenBoardPkg/{ => 
KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiPchPolicyUpdate.h
 | 0
 Platform/Intel/KabylakeOpenBoardPkg/{ => 
KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSaPolicyUpdate.h
  | 0
 Platform/Intel/KabylakeOpenBoardPkg/{ => 
KabylakeRvp3}/Policy/Library/DxeSiliconPolicyUpdateLib/DxeGopPolicyInit.h   
   | 0
 Platform/Intel/KabylakeOpenBoardPkg/{ => 
KabylakeRvp3}/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSaPolicyInit.h
   | 0
 Platform/Intel/KabylakeOpenBoardPkg/{ => 
KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PcieDeviceTable.c 
   | 0
 Platform/Intel/KabylakeOpenBoardPkg/{ => 
KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiFspMiscUpdUpdateLib.c
 | 0
 Platform/Intel/KabylakeOpenBoardPkg/{ => 
KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiFspPolicyUpdateLib.c
  | 0
 Platform/Intel/KabylakeOpenBoardPkg/{ => 
KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiPchPolicyUpdate.c
 | 0
 Platform/Intel/KabylakeOpenBoardPkg/{ => 
KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiPchPolicyUpdatePreMem.c
   | 0
 Platform/Intel/KabylakeOpenBoardPkg/{ => 
KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSaPolicyUpdate.c
  | 0
 Platform/Intel/KabylakeOpenBoardPkg/{ => 
KabylakeRvp3}/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSaPolicyUpdatePreMem.c
| 0
 Platform/Intel/KabylakeOpenBoardPkg/{ => 
KabylakeRvp3}/Policy/Library/DxeSiliconPolicyUpdateLib/DxeGopPolicyInit.c   
   | 0
 Platform/Intel/KabylakeOpenBoardPkg/{ => 
KabylakeRvp3}/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSaPolicyUpdate.c  
   | 0
 Platform/Intel/KabylakeOpenBoardPkg/{ => 
KabylakeRvp3}/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSiliconPolicyUpdateLib.c
 | 0
 Platform/Intel/KabylakeOpenBoardPkg/{ => 
KabylakeRvp3}/Policy/Library/PeiSiliconPolicyUpdateLib/PeiSiliconPolicyUpdateLib.c
 | 0
 19 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
index 813ca040a1..7090852192 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
@@ -127,13 +127,13 @@
   #
   # Below library are used by FSP API mode
   #
-  
SiliconPolicyUpdateLib|$(PLATFORM_BOARD_PACKAGE)/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf
+
+ SiliconPolicyUpdateLib|$(PROJECT)/FspWrapper/Library/PeiSiliconPolicyU
+ pdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf
   
SiliconPolicyInitLib|$(PLATFORM_SI_PACKAGE)/Library/PeiSiliconPolicyInitLibFsp/PeiSiliconPolicyInitLibFsp.inf
 !else
   #
   # Below library are used by FSP Dispatch mode and non-FSP build (EDK2 build)
   #
-  
SiliconPolicyUpdateLib|$(PLATFORM_BOARD_PACKAGE)/Policy/Library/PeiSiliconPolicyUpdateLib/PeiSiliconPolicyUpdateLib.inf
+
+ SiliconPolicyUpdateLib|$(PROJECT)/Policy/Library/PeiSiliconPolicyUpdat
+ eLib/PeiSiliconPolicyUpdateLib.inf
   
SiliconPolicyInitLib|$(PLATFORM_SI_PACKAGE)/Library/PeiSiliconPolicyInitLibFsp/PeiSiliconPolicyInitLibFspAml.inf
 !endif
 
@@ -196,7 +196,7 @@
   
BoardAcpiTableLib|$(PLATFORM_PACKAGE)/Acpi/Library/MultiBoardAcpiSupportLib/DxeMultiBoardAcpiSupportLib.inf
 
   

Re: [edk2-devel] [edk2-platforms][PATCH V1 03/12] ClevoOpenBoardPkg: Remove global files and references

2019-09-23 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Kubacki, Michael 
A
Sent: Friday, September 20, 2019 11:40 AM
To: devel@edk2.groups.io
Cc: Chiu, Chasel ; Desimone, Nathaniel L 
; Sinha, Ankit ; Jeremy 
Soller 
Subject: [edk2-devel] [edk2-platforms][PATCH V1 03/12] ClevoOpenBoardPkg: 
Remove global files and references

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207

Remove references to ClevoOpenBoardPkg external to the package since the 
package is now removed.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Ankit Sinha 
Cc: Jeremy Soller 
Signed-off-by: Michael Kubacki 
---
 Maintainers.txt  |  5 -
 Platform/Intel/Readme.md | 18 --
 Readme.md|  1 -
 3 files changed, 24 deletions(-)

diff --git a/Maintainers.txt b/Maintainers.txt index c04cc23680..a30ee2f602 
100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -82,11 +82,6 @@ Platform/Intel/UserInterfaceFeaturePkg
 M: Dandan Bi 
 R: Liming Gao 
 
-Platform/Intel/ClevoOpenBoardPkg
-M: Michael Kubacki 
-M: Ankit Sinha 
-M: Nate DeSimone 
-
 Platform/Intel/KabylakeOpenBoardPkg
 M: Chasel Chiu 
 M: Michael Kubacki  diff --git 
a/Platform/Intel/Readme.md b/Platform/Intel/Readme.md index 
2575d4ec52..6a9b1d2e00 100644
--- a/Platform/Intel/Readme.md
+++ b/Platform/Intel/Readme.md
@@ -53,7 +53,6 @@ A UEFI firmware implementation using MinPlatformPkg is 
constructed using the fol
 
 
 ## Board Support
-* The `ClevoOpenBoardPkg` contains board implementations for Clevo systems.
 * The `KabylakeOpenBoardPkg` contains board implementations for Kaby Lake 
systems.
 * The `PurleyOpenBoardPkg` contains board implementations for Purley systems.
 * The `SimicsOpenBoardPkg` contains board implementations for the Simics 
hardware simulator.
@@ -84,15 +83,6 @@ A UEFI firmware implementation using MinPlatformPkg is 
constructed using the fol  
||--||
 | Simics Quick Start Package| Nehalem  
  | SimicsOpenBoardPkg   | BoardX58Ich10  |
 
- System 76
-
-***Galago Pro Laptop***
-
-| Machine Name  | Supported Chipsets   
  | BoardPkg | Board Name |
-||--||
-| galp2 (Clevo N130BU)  | Kaby Lake
  | ClevoOpenBoardPkg| N1xxWU |
-| galp3 & galp3-b (Clevo N1xxWU series) | Kaby Lake Refresh
  | ClevoOpenBoardPkg| N1xxWU |
-
 ## Board Package Organization
 The board package follows the standard EDK II package structure with the 
following additional elements and guidelines:
 * Only code usable across more than one board at the root level.
@@ -226,11 +216,6 @@ return back to the minimum platform caller.
   |   ||--build_bios.py: Main build script. Generic 
pre-build, build,
   |   || post-build, and clean 
functions.
   |   ||
-  |   ||--ClevoOpenBoardPkg
-  |   |||--N1xxWU
-  |   |||---build_config.cfg: N1xxWU 
specific build
-  |   ||  settings 
environment variables.
-  |   ||
   |   ||--KabylakeOpenBoardPkg
   |   |||--KabylakeRvp3
   |   ||  |---build_config.cfg: 
KabylakeRvp3 specific
@@ -277,9 +262,6 @@ errors.
 
 ### **Known limitations**
 
-**ClevoOpenBoardPkg**
-1. The firmware project has not been tested on the Galago Pro 3B.
-
 **KabylakeOpenBoardPkg**
 1. This firmware project has only been tested for Microsoft Windows 10 x64 
boot with AHCI mode and Integrated Graphic
Device.
diff --git a/Readme.md b/Readme.md
index e4f211eee6..efdbe8523f 100644
--- a/Readme.md
+++ b/Readme.md
@@ -225,7 +225,6 @@ they will be documented with the platform.
 
 ## Intel
 ### [Minimum Platforms](Platform/Intel/Readme.md)
-* [Clevo](Platform/Intel/ClevoOpenBoardPkg)
 * [Kaby Lake](Platform/Intel/KabylakeOpenBoardPkg)
 * [Purley](Platform/Intel/PurleyOpenBoardPkg)
 * [Whiskey Lake](Platform/Intel/WhiskeylakeOpenBoardPkg)
--
2.16.2.windows.1





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47813): https://edk2.groups.io/g/devel/message/47813
Mute This Topic: https://groups.io/mt/34233770/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-test][Patch] uefi-sct/SctPkg: Fix invalid attribute combination

2019-09-23 Thread Eric Jin
Pushed at 93a98df2609763cc162191bd5395617a621747fe

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Eric Jin
Sent: Friday, September 20, 2019 11:10 AM
To: Liu, XianhuiX ; devel@edk2.groups.io
Cc: Oleksiy ; Supreeth Venkatesh 
Subject: Re: [edk2-devel] [edk2-test][Patch] uefi-sct/SctPkg: Fix invalid 
attribute combination

Reviewed-by: Eric Jin 

-Original Message-
From: Liu, XianhuiX 
Sent: Wednesday, September 18, 2019 10:38 AM
To: devel@edk2.groups.io
Cc: Oleksiy ; Supreeth Venkatesh 
; Jin, Eric 
Subject: [edk2-test][Patch] uefi-sct/SctPkg: Fix invalid attribute combination

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1942
avoid using EFI_VARIABLE_RUNTIME_ACCESS without EFI_VARIABLE_BOOTSERVICE_ACCESS 
in AttrArray.

Cc: Oleksiy 
Cc: Supreeth Venkatesh 
Cc: Eric Jin 
Signed-off-by: xianhui liu 
---
 .../BlackBoxTest/AuthVariableServicesBBTestConformance.c| 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/VariableServices/BlackBoxTest/AuthVariableServicesBBTestConformance.c
 
b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/VariableServices/BlackBoxTest/AuthVariableServicesBBTestConformance.c
index a1d1c4c3..23b00e35 100644
--- 
a/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/VariableServices/BlackBoxTest/AuthVariableServicesBBTestConformance.c
+++ b/uefi-sct/SctPkg/TestCase/UEFI/EFI/RuntimeServices/VariableServices
+++ /BlackBoxTest/AuthVariableServicesBBTestConformance.c
@@ -1,7 +1,7 @@
 /** @file
 
   Copyright 2006 - 2012 Unified EFI, Inc.
-  Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+  Copyright (c) 2010 - 2019, 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 @@ -160,19 +160,16 @@ AuthVariableDERConfTest (
 //  For 1 attribute.
 //
 EFI_VARIABLE_NON_VOLATILE,
-EFI_VARIABLE_RUNTIME_ACCESS,
 EFI_VARIABLE_BOOTSERVICE_ACCESS,
 EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS,
 
 //
 //  For 2 attributes.
 //
-EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS,
 EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
 EFI_VARIABLE_NON_VOLATILE | 
EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS,
 
 EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS,
-EFI_VARIABLE_RUNTIME_ACCESS | 
EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS,
 
 EFI_VARIABLE_BOOTSERVICE_ACCESS | 
EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS,
 
@@ -180,7 +177,6 @@ AuthVariableDERConfTest (
 //  For 3 attributes.
 //
 EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS | 
EFI_VARIABLE_BOOTSERVICE_ACCESS,
-EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_RUNTIME_ACCESS | 
EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS,
 EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | 
EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS,
 EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS | 
EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS,
 
--
2.14.1.windows.1





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47811): https://edk2.groups.io/g/devel/message/47811
Mute This Topic: https://groups.io/mt/34185463/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 3/3] MdeModulePkg/BM_UI: Add the new terminal types to related menu

2019-09-23 Thread Dandan Bi
Reviewed-by: Dandan Bi 

Thanks,
Dandan
> -Original Message-
> From: Gao, Zhichao
> Sent: Monday, September 23, 2019 12:32 PM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J ; Wu, Hao A ;
> Ni, Ray ; Bi, Dandan ; Gao, Liming
> 
> Subject: [PATCH V4 3/3] MdeModulePkg/BM_UI: Add the new terminal
> types to related menu
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2186
> 
> Add the new introduced terminal types to related setup menu to change the
> terminal type from setup. Most platforms would have its own configure
> setup menu and they need to change it to support these.
> The new introduced terminal types are Linux, XtermR6, VT400 and SCO.
> 
> Cc: Jian J Wang 
> Cc: Hao A Wu 
> Cc: Ray Ni 
> Cc: Dandan Bi 
> Cc: Liming Gao 
> Signed-off-by: Zhichao Gao 
> ---
>  .../BootMaintenanceManager.h  | 12 ---
>  .../BootMaintenanceManagerStrings.uni | 10 +-
>  .../ConsoleOption.c   | 36 ++-
>  .../BootMaintenanceManagerUiLib/Data.c| 16 ++---
>  4 files changed, 40 insertions(+), 34 deletions(-)
> 
> diff --git
> a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc
> eManager.h
> b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc
> eManager.h
> index ea3cdce794..67847d8bf3 100644
> ---
> a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc
> eManager.h
> +++
> b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc
> eMa
> +++ nager.h
> @@ -1,7 +1,7 @@
>  /** @file
>  Header file for boot maintenance module.
> 
> -Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
> +Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
>  SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> @@ -92,7 +92,11 @@ typedef enum _TYPE_OF_TERMINAL {
>TerminalTypeVt100,
>TerminalTypeVt100Plus,
>TerminalTypeVtUtf8,
> -  TerminalTypeTtyTerm
> +  TerminalTypeTtyTerm,
> +  TerminalTypeLinux,
> +  TerminalTypeXtermR6,
> +  TerminalTypeVt400,
> +  TerminalTypeSCO
>  } TYPE_OF_TERMINAL;
> 
>  //
> @@ -1301,12 +1305,12 @@ extern BM_MENU_OPTION
> ConsoleOutMenu;
>  extern BM_MENU_OPTION ConsoleErrMenu;
>  extern BM_MENU_OPTION DriverMenu;
>  extern BM_MENU_OPTION TerminalMenu;
> -extern UINT16 TerminalType[5];
> +extern UINT16 TerminalType[9];
>  extern COM_ATTR   BaudRateList[19];
>  extern COM_ATTR   DataBitsList[4];
>  extern COM_ATTR   ParityList[5];
>  extern COM_ATTR   StopBitsList[3];
> -extern EFI_GUID   TerminalTypeGuid[5];
> +extern EFI_GUID   TerminalTypeGuid[9];
>  extern EFI_DEVICE_PATH_PROTOCOL   EndDevicePath[];
>  extern UINT16 mFlowControlType[2];
>  extern UINT32 mFlowControlValue[2];
> diff --git
> a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc
> eManagerStrings.uni
> b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc
> eManagerStrings.uni
> index 2e67d27bd0..3d47473e6c 100644
> ---
> a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc
> eManagerStrings.uni
> +++
> b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanc
> eMa
> +++ nagerStrings.uni
> @@ -1,7 +1,7 @@
>  ///** @file
>  //  String definitions for Boot Maintenance Utility.
>  //
> -//  Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
> +//  Copyright (c) 2004 - 2019, Intel Corporation. All rights
> +reserved.
>  //  SPDX-License-Identifier: BSD-2-Clause-Patent  //  //**/ @@ -233,6
> +233,14 @@
> #language fr-FR  "VT_UTF8"
>  #string STR_COM_TYPE_4 #language en-US  "TTY_TERM"
> #language fr-FR  "TTY_TERM"
> +#string STR_COM_TYPE_5 #language en-US  "LINUX"
> +   #language fr-FR  "LINUX"
> +#string STR_COM_TYPE_6 #language en-US  "XTERM_R6"
> +   #language fr-FR  "XTERM_R6"
> +#string STR_COM_TYPE_7 #language en-US  "VT_400"
> +   #language fr-FR  "VT_400"
> +#string STR_COM_TYPE_8 #language en-US  "SCO"
> +   #language fr-FR  "SCO"
>  #string STR_RESET  #language en-US  "Reset System"
> #language fr-FR  "Reset System"
>  #string STR_FORM_GOTO_MAIN #language en-US  "Go Back To Main
> Page"
> diff --git
> a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c
> b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c
> index 7a53b58771..5d1c6d34e6 100644
> ---
> a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c
> +++
> b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c

Re: [edk2-devel] BaseTools --hash malfunction after migrate from stable201905 to stable201908

2019-09-23 Thread Steven Shi
Hi Derek,
Thank you to raise this issue. We will fix it and add back the --hash original 
functionality.


Thanks
Steven

From: Lin, Derek (HPS SW) [mailto:derek.l...@hpe.com]
Sent: Friday, September 20, 2019 2:54 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C ; Shi, Steven 
Subject: BaseTools --hash malfunction after migrate from stable201905 to 
stable201908

Hi BaseTools experts,

We saw the clean build performance improvement after updating from 
edk2-stable201905 to edk2-stable201908, which is promising.
But we found the incremental build time increase 25%~35%, which is not good.

We're building server platform. And we use --hash to speed up incremental build 
as described in https://github.com/BobCF/edk2/wiki/Incremental-Build
After upgrading to edk2-stable201908, none of AutoGen is skipped when I did an 
incremental build without any code change.

Dig into the issue, it is caused by commit 
https://github.com/tianocore/edk2/commit/0e7e7a264cd80ab71ea0f9e9da2d0617d4b539c4
>From the code change logic, it seems like it require both --hash and 
>--binary-source to perform cache based incremental build. However, when we 
>only have --hash in build flag, it is not functional.


Here's a build time log retrieved from -y report.log.

201905 incremental |  201908 
incremental |  201905 clean | 201908 clean
Build Duration:00:03:4400:04:40 
   00:07:12 00:06:19
AutoGen Duration:  00:02:4000:03:15 
   00:04:28 00:03:09
Make Duration:00:00:3600:00:39  
  00:01:21 00:01:34
GenFds Duration: 00:00:2700:00:28   
 00:01:22 00:01:18

We could see the AutoGen Duration has almost no change between clean and 
incremental build in 201908.

Could we fix this?

Thanks,
Derek


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47809): https://edk2.groups.io/g/devel/message/47809
Mute This Topic: https://groups.io/mt/34227864/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms][PATCH V1 01/12] Platform/Intel: Remove N1xxWU board build option

2019-09-23 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Kubacki, Michael 
A
Sent: Friday, September 20, 2019 11:40 AM
To: devel@edk2.groups.io
Cc: Chiu, Chasel ; Desimone, Nathaniel L 
; Sinha, Ankit ; Jeremy 
Soller 
Subject: [edk2-devel] [edk2-platforms][PATCH V1 01/12] Platform/Intel: Remove 
N1xxWU board build option

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207

The N1xxWU board contents will be moved to KabylakeOpenBoardPkg to reduce code 
duplication between ClevoOpenBoardPkg and KabylakeOpenBoardPkg.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Ankit Sinha 
Cc: Jeremy Soller 
Signed-off-by: Michael Kubacki 
---
 Platform/Intel/build.cfg | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Platform/Intel/build.cfg b/Platform/Intel/build.cfg index 
75cb446aa5..04e8f4fa64 100644
--- a/Platform/Intel/build.cfg
+++ b/Platform/Intel/build.cfg
@@ -55,6 +55,4 @@ NUMBER_OF_PROCESSORS = 0  BoardMtOlympus = 
PurleyOpenBoardPkg/BoardMtOlympus/build_config.cfg
 BoardX58Ich10 = SimicsOpenBoardPkg/BoardX58Ich10/build_config.cfg
 KabylakeRvp3 = KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
-N1xxWU = ClevoOpenBoardPkg/N1xxWU/build_config.cfg
 WhiskeylakeURvp = WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.cfg
-
--
2.16.2.windows.1





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47808): https://edk2.groups.io/g/devel/message/47808
Mute This Topic: https://groups.io/mt/34233769/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms][PATCH V1 1/1] ClevoOpenBoardPkg/N1xxWU: Enable Synaptics touchpad support in OS

2019-09-23 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Kubacki, Michael 
A
Sent: Thursday, September 19, 2019 7:16 PM
To: devel@edk2.groups.io
Cc: Sinha, Ankit ; Desimone, Nathaniel L 

Subject: [edk2-devel] [edk2-platforms][PATCH V1 1/1] ClevoOpenBoardPkg/N1xxWU: 
Enable Synaptics touchpad support in OS

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2068

Adds the ACPI device for the Synaptics touchpad. With this change, the touchpad 
device is functional in the OS.

Cc: Ankit Sinha 
Cc: Nate DeSimone 
Signed-off-by: Michael Kubacki 
---
 
Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardAcpiLib/DxeN1xxWUAcpiTableLib.c
 | 2 +-
 Platform/Intel/ClevoOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/LpcB.asl   
  | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardAcpiLib/DxeN1xxWUAcpiTableLib.c
 
b/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardAcpiLib/DxeN1xxWUAcpiTableLib.c
index 96a3232fe5..d309bf4e1d 100644
--- 
a/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardAcpiLib/DxeN1xxWUAcpiTableLib.c
+++ b/Platform/Intel/ClevoOpenBoardPkg/N1xxWU/Library/BoardAcpiLib/DxeN1
+++ xxWUAcpiTableLib.c
@@ -54,7 +54,7 @@ N1xxWUUpdateGlobalNvs (
   //
   mGlobalNvsArea.Area->LowPowerS0Idle = PcdGet8 (PcdLowPowerS0Idle);
 
-  mGlobalNvsArea.Area->Ps2MouseEnable = FALSE;
+  mGlobalNvsArea.Area->Ps2MouseEnable = PcdGet8 (PcdPs2KbMsEnable);
   mGlobalNvsArea.Area->Ps2KbMsEnable  = PcdGet8 (PcdPs2KbMsEnable);
 }
 
diff --git a/Platform/Intel/ClevoOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/LpcB.asl 
b/Platform/Intel/ClevoOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/LpcB.asl
index 6fbaf3a97f..3ef9aed1e6 100644
--- a/Platform/Intel/ClevoOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/LpcB.asl
+++ b/Platform/Intel/ClevoOpenBoardPkg/Acpi/BoardAcpiDxe/Dsdt/LpcB.asl
@@ -55,10 +55,10 @@ scope (\_SB.PCI0.LPCB) {
 
   }
 
-  Device(PS2M)// PS/2 Mouse
+  Device(SYNM)// Synaptics Mouse
   {
-Name(_HID,"MSFT0003")
-Name(_CID,EISAID("PNP0F03"))
+Name(_HID,"SYN1221")
+Name(_CID,EISAID("PNP0F13"))
 
 Method(_STA)
 {
--
2.16.2.windows.1





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47807): https://edk2.groups.io/g/devel/message/47807
Mute This Topic: https://groups.io/mt/34207602/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] DebugFeaturePkg: Remove white space and update the ending format

2019-09-23 Thread Zhang, Shenglei
For this patch, I'll update the file format of AcpiDebug.c to Dos format when 
pushing the patch.

Thanks,
Shenglei

> -Original Message-
> From: Dong, Eric
> Sent: Monday, September 9, 2019 8:36 AM
> To: Zhang, Shenglei ; devel@edk2.groups.io
> Cc: Gao, Liming 
> Subject: RE: [PATCH v2] DebugFeaturePkg: Remove white space and update
> the ending format
> 
> Reviewed-by: Eric Dong 
> 
> > -Original Message-
> > From: Zhang, Shenglei
> > Sent: Saturday, September 7, 2019 1:16 AM
> > To: devel@edk2.groups.io
> > Cc: Dong, Eric ; Gao, Liming 
> > Subject: [PATCH v2] DebugFeaturePkg: Remove white space and update
> the
> > ending format
> >
> > Remove white space in AcpiDebug.c.
> > The original end of last line in DebugFeaturePkg.dsc is '/r'.
> > Now update it to '/r/n'.
> >
> > Cc: Eric Dong 
> > Cc: Liming Gao 
> > Signed-off-by: Shenglei Zhang 
> > ---
> > v2: In v1 the patch remove the '/r'. In v2 it is updated to '/r/n'.
> > The v1 patch is "DebugFeaturePkg: Remove white space and white
> ending
> > line".
> >
> >  Platform/Intel/DebugFeaturePkg/AcpiDebug/AcpiDebug.c | 3 +--
> >  Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dsc   | 2 +-
> >  2 files changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/Platform/Intel/DebugFeaturePkg/AcpiDebug/AcpiDebug.c
> > b/Platform/Intel/DebugFeaturePkg/AcpiDebug/AcpiDebug.c
> > index f9cd8bcb..5ad8d259 100644
> > --- a/Platform/Intel/DebugFeaturePkg/AcpiDebug/AcpiDebug.c
> > +++ b/Platform/Intel/DebugFeaturePkg/AcpiDebug/AcpiDebug.c
> > @@ -487,7 +487,7 @@ InitializeAcpiDebugSmm (
> >if (EFI_ERROR (Status)) {
> >  return Status;
> >}
> > -
> > +
> >Status = SmmBase2->InSmm (SmmBase2, );
> >ASSERT_EFI_ERROR (Status);
> >if (EFI_ERROR (Status)) {
> > @@ -519,4 +519,3 @@ InitializeAcpiDebugSmm (
> >
> >return Status;
> >  }
> > -
> > diff --git a/Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dsc
> > b/Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dsc
> > index 30f57d5d..8e5ff4c9 100644
> > --- a/Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dsc
> > +++ b/Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dsc
> > @@ -98,4 +98,4 @@
> >DebugFeaturePkg/AcpiDebug/AcpiDebugSmm.inf
> >
> >  [BuildOptions]
> > -  *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES \ No
> > newline at end of file
> > +  *_*_*_CC_FLAGS = -D DISABLE_NEW_DEPRECATED_INTERFACES
> > --
> > 2.18.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#47806): https://edk2.groups.io/g/devel/message/47806
Mute This Topic: https://groups.io/mt/33169036/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-