From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.117.1592257418620815147 for ; Mon, 15 Jun 2020 14:43:38 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: samer.el-haj-mahmoud@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9C1571042 for ; Mon, 15 Jun 2020 14:43:37 -0700 (PDT) Received: from localhost.localdomain (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7DCD53F6CF for ; Mon, 15 Jun 2020 14:43:37 -0700 (PDT) From: "Samer El-Haj-Mahmoud" To: devel@edk2.groups.io Subject: [edk2-platform][PATCH v2 2/2] Platforms/RaspberryPi: Add RPi3 settings to Readme Date: Mon, 15 Jun 2020 17:43:31 -0400 Message-Id: <20200615214331.12949-3-Samer.El-Haj-Mahmoud@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200615214331.12949-1-Samer.El-Haj-Mahmoud@arm.com> References: <20200615214331.12949-1-Samer.El-Haj-Mahmoud@arm.com> Add a section to the the RPi3 readme for 'Configuration Settings', with instructions on scripting from the UEFI Shell. Signed-off-by: Samer El-Haj-Mahmoud --- Platform/RaspberryPi/RPi3/Readme.md | 61 ++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/Platform/RaspberryPi/RPi3/Readme.md b/Platform/RaspberryPi/RPi3/Readme.md index 075ea199a0d9..9080cff15841 100644 --- a/Platform/RaspberryPi/RPi3/Readme.md +++ b/Platform/RaspberryPi/RPi3/Readme.md @@ -201,3 +201,64 @@ install a kernel that relies on Device Tree rather than ACPI. - SPCR hardcodes UART type to miniUART, and thus will not expose correct (PL011) UART on CM3 and Pi2B or if DT overlays to switch UART are used on Pi 3B/3B+/3A+. + +# Configuration Settings +The Raspberry Pi UEFI configuration settings can be viewed and changed using both the UI configuration menu (under `Device Manager` -> `Raspberry Pi Configuration`), as well as the UEFI Shell. To configure using the UEFI Shell, use `setvar` command to read/write the UEFI variables with GUID = `CD7CC258-31DB-22E6-9F22-63B0B8EED6B5`. + +The syntax to read a setting is: +``` +setvar -guid CD7CC258-31DB-22E6-9F22-63B0B8EED6B5 +``` + +The syntax to write a setting is: +``` +setvar -guid CD7CC258-31DB-22E6-9F22-63B0B8EED6B5 -bs -rt -nv = +``` + +For string-type settings (e.g. Asset Tag), the syntax to write is: +``` +setvar -guid CD7CC258-31DB-22E6-9F22-63B0B8EED6B5 -bs -rt -nv =L"" =0x0000 +``` + +UEFI Setting | NAME | VALUE +-----------------------------|-----------------------|----------------------------- +**CPU Configuration** | +CPU Clock | `CpuClock` | Low = `0x00000000`
Default = `0x00000001` (default)
Max = `0x00000002`
Custom = `0x00000003` +CPU Clock Rate (MHz) | `CustomCpuClock` | Hex numeric value, 4-bytes
(e.g. `0x000005DC` for 1500 MHz) +**Display Configuration** | +Virtual 640x480 | `DisplayEnableScaledVModes` | Checked = Bit 0 set (i.e. ` \| 0x01`) +Virtual 800x600 | `DisplayEnableScaledVModes` | Checked = Bit 1 set (i.e. ` \| 0x02`) +Virtual 1024x768 | `DisplayEnableScaledVModes` | Checked = Bit 2 set (i.e. ` \| 0x04`) +Virtual 720p | `DisplayEnableScaledVModes` | Checked = Bit 3 set (i.e. ` \| 0x08`) +Virtual 1080p | `DisplayEnableScaledVModes` | Checked = Bit 4 set (i.e. ` \| 0x10`) +Native resolution | `DisplayEnableScaledVModes` | Checked = Bit 5 set (i.e. ` \| 0x20`) (default) +Screenshot support | `DisplayEnableSShot` | Control-Alt-F12 = `0x00000001` (default)
Not Enabled = `0x00000000` +**Advanced Configuration** | +System Table Selection | `SystemTableMode`| ACPI = `0x00000000`
ACPI + Devicetree = `0x00000001` (default)
Devicetree = `0x00000002` +Asset Tag | `AssetTag` | String, 32 characters or less (e.g. `L"ABCD123"`)
(default `L""`) +**SD/MMC Configuration** | +uSD/eMMC Routing | `SdIsArasan` | Arasan SDHC = `0x00000001`
Broadcom SDHOST = `0x00000000` (default) +Multi-Block Support | `MmcDisableMulti` | Multi-block transfers = `0x00000000` (default)
Single block transfers = `0x00000001` +uSD Max Bus Width | `MmcForce1Bit` | 4-bit Mode = `0x00000000` (default)
1-bit Mode = `0x00000001` +uSD Force Default Speed | `MmcForceDefaultSpeed` | Allow High Speed = `0x00000000` (default)
Force Default Speed = `0x00000001` +SD Default Speed (MHz) | `MmcSdDefaultSpeedMHz` | Hex numeric value, 4-bytes (e.g. `0x00000019` for 25 MHz)
(default 25) +SD High Speed (MHz) | `MmcSdHighSpeedMHz` | Hex numeric value, 4-bytes (e.g. `0x00000032` for 50 MHz)
(default 50) +**Debugging Configuration** | +JTAG Routing | `DebugEnableJTAG` | Enable JTAG via GPIO = `0x00000001`
Disable JTAG= `0x00000000` (default) + +**Examples:** + +- To read the 'System Table Selection' setting : +``` +setvar SystemTableMode -guid CD7CC258-31DB-22E6-9F22-63B0B8EED6B5 +``` + +- To change the 'System Table Selection' setting to 'Devicetree' : +``` +setvar SystemTableMode -guid CD7CC258-31DB-22E6-9F22-63B0B8EED6B5 -bs -rt -nv =0x00000002 +``` + +- To change the Asset Tag to the string "ASSET-TAG-123" : +``` +setvar AssetTag -guid CD7CC258-31DB-22E6-9F22-63B0B8EED6B5 -bs -rt -nv =L"ASSET-TAG-123" =0x0000 +``` -- 2.17.1