On 4/30/20 10:47 AM, Andrei Warkentin wrote:
Mostly strings and documentation, but also fixes a dumb bug
I introduced when I added SD block write validation back
in RaspberryPiPkg (which broke eMMC support, even though
I could have tested it with a discrete eMMC media on regular
Pies)

Signed-off-by: Andrei Warkentin <andrey.warken...@gmail.com>

Hi Andrei,

Can we please not put bug fixes and documentation updates in the same patch?


---
  Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni |  8 ++++----
  Platform/RaspberryPi/Drivers/MmcDxe/MmcBlockIo.c        |  1 +
  Platform/RaspberryPi/RPi3/Readme.md                     | 19 
++++++++++++-------
  3 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni 
b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni
index 26d803f7..07660072 100644
--- a/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni
+++ b/Platform/RaspberryPi/Drivers/ConfigDxe/ConfigDxeHii.uni
@@ -53,8 +53,8 @@
  #string STR_MMC_FORM_TITLE       #language en-US "SD/MMC Configuration"
  #string STR_MMC_FORM_SUBTITLE    #language en-US "Note: UEFI only, OS may override 
settings."
-#string STR_MMC_SD_PROMPT #language en-US "uSD Routing"
-#string STR_MMC_SD_HELP          #language en-US "Choose host controller to drive 
uSD slot"
+#string STR_MMC_SD_PROMPT        #language en-US "uSD/eMMC Routing"
+#string STR_MMC_SD_HELP          #language en-US "Choose host controller to drive 
local flash storage"
  #string STR_MMC_SD_EMMC2         #language en-US "eMMC2 SDHCI"
  #string STR_MMC_SD_SDHOST        #language en-US "Broadcom SDHOST"
  #string STR_MMC_SD_ARASAN        #language en-US "Arasan SDHCI"
@@ -65,12 +65,12 @@
  #string STR_MMC_DISMULTI_Y       #language en-US "Single-block transfers"
#string STR_MMC_FORCE1BIT_PROMPT #language en-US "uSD Max Bus Width"
-#string STR_MMC_FORCE1BIT_HELP   #language en-US "Tweak for bad media"
+#string STR_MMC_FORCE1BIT_HELP   #language en-US "Tweak for bad media (N/A for 
eMMC)"
  #string STR_MMC_FORCE1BIT_Y      #language en-US "1 Bit Mode"
  #string STR_MMC_FORCE1BIT_N      #language en-US "4 Bit Mode"
#string STR_MMC_FORCEDS_PROMPT #language en-US "uSD Force Default Speed"
-#string STR_MMC_FORCEDS_HELP     #language en-US "Tweak for bad media"
+#string STR_MMC_FORCEDS_HELP     #language en-US "Tweak for bad media (N/A for 
eMMC)"
  #string STR_MMC_FORCEDS_Y        #language en-US "Force Default Speed"
  #string STR_MMC_FORCEDS_N        #language en-US "Allow High Speed"
diff --git a/Platform/RaspberryPi/Drivers/MmcDxe/MmcBlockIo.c b/Platform/RaspberryPi/Drivers/MmcDxe/MmcBlockIo.c
index 29a9fd7d..8a2f7f42 100644
--- a/Platform/RaspberryPi/Drivers/MmcDxe/MmcBlockIo.c
+++ b/Platform/RaspberryPi/Drivers/MmcDxe/MmcBlockIo.c
@@ -47,6 +47,7 @@ ValidateWrittenBlockCount (
      /*
       * Not on MMC.
       */
+    *TransferredBlocks = Count;
      return EFI_SUCCESS;
    }
diff --git a/Platform/RaspberryPi/RPi3/Readme.md b/Platform/RaspberryPi/RPi3/Readme.md
index 3484c92c..b756013b 100644
--- a/Platform/RaspberryPi/RPi3/Readme.md
+++ b/Platform/RaspberryPi/RPi3/Readme.md
@@ -21,6 +21,10 @@ The RPi3 target supports Pi revisions based on the BCM2837 
SoC:
  - Raspberry Pi 3A+
  - Raspberry Pi 3B
  - Raspberry Pi 3B+
+- Raspberry Pi CM3
+
+Note: a CM3L, lacking eMMC and thus similar to the 3B, will probably work as 
well, but just
+has not been tested.
Please see the RPi4 target for BCM2711-based variants, such as the Raspberry Pi 4B. @@ -148,20 +152,21 @@ This should allow you to set whatever date/time you want using the Shell date an
  time commands. While in UEFI or HLOS, the time will tick forward.
  `RtcEpochSeconds` is not updated on reboots.
-## uSD
+## uSD (and eMMC for CM3)
-UEFI supports both the Arasan SDHCI and the Broadcom SDHost controllers to access the uSD slot.
-You can use either. The other controller gets routed to the SDIO card. The 
choice made will
+UEFI supports both the Arasan SDHCI and the Broadcom SDHost controllers to 
access the flash
+media (eMMC on CM3, and uSD slot on everything else). You can use either. The 
other controller
+gets routed to the SDIO WiFi card (N/A to models without WiFi). The choice 
made will
  impact ACPI OSes booted (e.g. Windows 10). Arasan, being an SDIO controller, 
is usually used
-with the WiFi adapter where available. SDHost cannot be used with SDIO. In 
UEFI setup screen:
+with the WiFi adapter (where available). SDHost cannot be used with SDIO. In 
UEFI setup screen:
  - go to `Device Manager`
  - go to `Raspberry Pi Configuration`
-- go to `Chipset`
-- configure `Boot uSD Routing`
+- go to `SD/MMC Configuration`
+- configure `uSD/eMMC Routing`
Known issues:
  - Arasan HS/4bit support is missing.
-- No 8 bit mode support for (e)MMC (irrelevant for the Pi 3).
+- No 8 bit mode support for (e)MMC (slow UEFI file I/O on CM3).
  - Hacky (e)MMC support (no HS).
  - No card removal/replacement detection, tons of timeouts and slow down 
during boot without an uSD card present.


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

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

Reply via email to