From nobody Sun Feb 8 22:07:11 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+58410+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+58410+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1588236481; cv=none; d=zohomail.com; s=zohoarc; b=i5Nb6BpBsezIeATRBXLDf1meeSQpYYIR2SFswqEljt7Obj51uhAYf2GHw0jHS2kuKxpKOYM39se93e+luefNn8QMhh4UjPLq8xAqXCOzfttugr4haWXq0C+NhL/WCogmEVUmlWnLcaSBHwR0TOk0e2ZuuDFz2YGDTRqtsVfrxa8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588236481; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=bQIQ3DxW53ZWE22r/8SL0qt6khnlhBvTC5ROZxhScqs=; b=AW981HKU8aL6r19cn8XMSRk+w+RuhLJIoKqPI8OGXMhBAqxGYMOqy2BUX7xZDu73jOelVW+X8RjK383mmLVTs8X0I4NM+6KhLxp+N6VO9JqZg0puEcN/Ala+kAxvpwxJot+pCh6AP13/jHL37HX61Bc3gPSk/24gICn+e5glAE4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+58410+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1588236481885832.2255477605405; Thu, 30 Apr 2020 01:48:01 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id t6cSYY1788612xnRaPuUeHP8; Thu, 30 Apr 2020 01:48:01 -0700 X-Received: from mail-qk1-f194.google.com (mail-qk1-f194.google.com [209.85.222.194]) by mx.groups.io with SMTP id smtpd.web10.3388.1588236481045832531 for ; Thu, 30 Apr 2020 01:48:01 -0700 X-Received: by mail-qk1-f194.google.com with SMTP id l78so4901243qke.7 for ; Thu, 30 Apr 2020 01:48:00 -0700 (PDT) X-Gm-Message-State: BmBY3nAnnyYmu3FbOWuIJ4qQx1787277AA= X-Google-Smtp-Source: APiQypK2vy32OFJV79iCOKJfq3wVj+TYueketFbfUxIfKUHXtlIm3/94TBnYUqWpxFUdVBO402++hg== X-Received: by 2002:a37:bc81:: with SMTP id m123mr2427626qkf.287.1588236479956; Thu, 30 Apr 2020 01:47:59 -0700 (PDT) X-Received: from localhost.localdomain (c-98-214-99-181.hsd1.il.comcast.net. [98.214.99.181]) by smtp.gmail.com with ESMTPSA id f130sm1419553qke.22.2020.04.30.01.47.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2020 01:47:59 -0700 (PDT) From: "Andrei Warkentin" To: devel@edk2.groups.io Cc: ard.biesheuvel@arm.com, leif@nuviainc.com, pete@akeo.ie, philmd@redhat.com Subject: [edk2-devel] [edk2-platforms][PATCH 3/4] RPi3: add support for Compute Module 3. Date: Thu, 30 Apr 2020 01:47:45 -0700 Message-Id: <20200430084746.51455-4-andrey.warkentin@gmail.com> In-Reply-To: <20200430084746.51455-1-andrey.warkentin@gmail.com> References: <20200430084746.51455-1-andrey.warkentin@gmail.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: <27952.devel.edk2.groups.io> Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,andrey.warkentin@gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1588236481; bh=dj/Ity0HMr5NGAepzm/q5y7i0d/2WwzIONnaWLsu7bY=; h=Cc:Date:From:Reply-To:Subject:To; b=eAcpHt1G+7eIp53AgSpRoeCVm4cjzj+e38VbEESVDcDo1qvPsjB8Utq1mEOUVCi3m4K mv+7aPrCE2dalrFMPvMnuvOe67rDOtftbDLVdoGENbcxU0gAqqSFQAixlvHa/t/jJm6Nx uA1vyY1PlOOdXbD2Fmk6JeIBoCdLDKzag1M= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 --- 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/Plat= form/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." =20 -#string STR_MMC_SD_PROMPT #language en-US "uSD Routing" -#string STR_MMC_SD_HELP #language en-US "Choose host controller t= o 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 t= o 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" =20 #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" =20 #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" =20 diff --git a/Platform/RaspberryPi/Drivers/MmcDxe/MmcBlockIo.c b/Platform/Ra= spberryPi/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 =3D Count; return EFI_SUCCESS; } =20 diff --git a/Platform/RaspberryPi/RPi3/Readme.md b/Platform/RaspberryPi/RPi= 3/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 BCM28= 37 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. =20 Please see the RPi4 target for BCM2711-based variants, such as the Raspber= ry Pi 4B. =20 @@ -148,20 +152,21 @@ This should allow you to set whatever date/time you w= ant using the Shell date an time commands. While in UEFI or HLOS, the time will tick forward. `RtcEpochSeconds` is not updated on reboots. =20 -## uSD +## uSD (and eMMC for CM3) =20 -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 controlle= r, 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` =20 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 du= ring boot without an uSD card present. =20 --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#58410): https://edk2.groups.io/g/devel/message/58410 Mute This Topic: https://groups.io/mt/73371477/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-