From 4f60b6a439df0da38543f30365a3f34f2eb92527 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Tue, 3 Jan 2017 21:29:13 -0600 Subject: [PATCH] BdsPlatform: generate SMM events to put eMMC/SD in proper mode For Baytrail devices, coreboot leaves the eMMC/SD in PCI mode to enable detection by Tianocore, so put into ACPI mode before OS boots. Fixes booting on Baytrail devices. Signed-off-by: Matt DeVillier --- CorebootModulePkg/Library/CorebootBdsLib/BdsPlatform.c | 5 +++++ CorebootModulePkg/Library/CorebootBdsLib/BdsPlatform.h | 1 + 2 files changed, 6 insertions(+) diff --git a/CorebootModulePkg/Library/CorebootBdsLib/BdsPlatform.c b/CorebootModulePkg/Library/CorebootBdsLib/BdsPlatform.c index 011c2df0bf..583487c3bc 100644 --- a/CorebootModulePkg/Library/CorebootBdsLib/BdsPlatform.c +++ b/CorebootModulePkg/Library/CorebootBdsLib/BdsPlatform.c @@ -1265,6 +1265,11 @@ Returns: Status = gBS->SetTimer (UserInputDurationTime, TimerRelative, 20000000); ASSERT (Status == EFI_SUCCESS); + // + // invoke SMM handler to put eMMC/SD devices into ACPI mode for OS + // + IoWrite8(0xb2, 0xcd); + // // To give the User a chance to enter Setup here, if user set TimeOut is 0. // BDS should still give user a chance to enter Setup diff --git a/CorebootModulePkg/Library/CorebootBdsLib/BdsPlatform.h b/CorebootModulePkg/Library/CorebootBdsLib/BdsPlatform.h index d447f77747..f9416e602a 100644 --- a/CorebootModulePkg/Library/CorebootBdsLib/BdsPlatform.h +++ b/CorebootModulePkg/Library/CorebootBdsLib/BdsPlatform.h @@ -42,6 +42,7 @@ Abstract: #include #include #include +#include #include