* [Patch][edk2-platforms/devel-IntelAtomProcessorE3900] UP2 PCIe NIC.
@ 2018-08-15 5:08 zwei4
0 siblings, 0 replies; only message in thread
From: zwei4 @ 2018-08-15 5:08 UTC (permalink / raw)
To: edk2-devel; +Cc: David Wei, Mike Wu, Mang Guo
Disable PCIe root port 1 of UP2, which is connected to a onboard RealTek PCIe NIC. If this PCIe NIC is enabled, Windows 10 installation will fail. This patch is a temporary solution.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: David Wei <david.wei@intel.com>
CC: Mike Wu <mike.wu@intel.com>
CC: Mang Guo <mang.guo@intel.com>
---
.../Board/UP2/BoardInitDxe/BoardInitDxe.c | 42 +++++++++++++++++++++-
.../Board/UP2/BoardInitDxe/BoardInitDxe.h | 1 +
2 files changed, 42 insertions(+), 1 deletion(-)
diff --git a/Platform/BroxtonPlatformPkg/Board/UP2/BoardInitDxe/BoardInitDxe.c b/Platform/BroxtonPlatformPkg/Board/UP2/BoardInitDxe/BoardInitDxe.c
index 3b5c5ac566..662d8f1991 100644
--- a/Platform/BroxtonPlatformPkg/Board/UP2/BoardInitDxe/BoardInitDxe.c
+++ b/Platform/BroxtonPlatformPkg/Board/UP2/BoardInitDxe/BoardInitDxe.c
@@ -17,6 +17,7 @@
#include "BoardInitDxe.h"
GET_BOARD_NAME mUp2GetBoardNamePtr = Up2GetBoardName;
+SYSTEM_CONFIGURATION mSystemConfiguration;
CHAR16*
EFIAPI
@@ -37,7 +38,44 @@ Up2GetBoardName (
}
}
-
+EFI_STATUS
+UpdateSetupVariable (
+ VOID
+ )
+{
+ UINTN VarSize;
+ UINT32 VariableAttributes;
+ EFI_STATUS Status;
+
+ //
+ // Update default value of Setup Variable for PCIe W/A.
+ // PCIe RealTek NIC on root port #1 blocks Windows 10 installation.
+ //
+
+ VarSize = sizeof (SYSTEM_CONFIGURATION);
+ Status = gRT->GetVariable (
+ L"Setup",
+ &gEfiSetupVariableGuid,
+ &VariableAttributes,
+ &VarSize,
+ &mSystemConfiguration
+ );
+ ASSERT_EFI_ERROR (Status);
+
+ if (Status == EFI_SUCCESS) {
+ mSystemConfiguration.PcieRootPortEn[3]= (UINT8) 0;
+ Status = gRT->SetVariable (
+ L"Setup",
+ &gEfiSetupVariableGuid,
+ VariableAttributes,
+ VarSize,
+ &mSystemConfiguration
+ );
+ ASSERT_EFI_ERROR (Status);
+ }
+
+ return Status;
+}
/**
Set PCDs for board specific functions
@@ -62,6 +100,8 @@ Up2BoardInitDxeConstructor (
}
PcdSet64 (PcdGetBoardNameFunc, (UINT64) mUp2GetBoardNamePtr);
+
+ UpdateSetupVariable();
return EFI_SUCCESS;
}
diff --git a/Platform/BroxtonPlatformPkg/Board/UP2/BoardInitDxe/BoardInitDxe.h b/Platform/BroxtonPlatformPkg/Board/UP2/BoardInitDxe/BoardInitDxe.h
index 61e66978ac..82e976e7ef 100644
--- a/Platform/BroxtonPlatformPkg/Board/UP2/BoardInitDxe/BoardInitDxe.h
+++ b/Platform/BroxtonPlatformPkg/Board/UP2/BoardInitDxe/BoardInitDxe.h
@@ -27,6 +27,7 @@
#include <Library/PcdLib.h>
#include <Library/PrintLib.h>
#include <Guid/PlatformInfo_Aplk.h>
+#include <Guid/SetupVariable.h>
CHAR16*
EFIAPI
--
2.14.1.windows.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-08-15 5:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-15 5:08 [Patch][edk2-platforms/devel-IntelAtomProcessorE3900] UP2 PCIe NIC zwei4
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox