From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by mx.groups.io with SMTP id smtpd.web12.5974.1592295213172900155 for ; Tue, 16 Jun 2020 01:13:33 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=kDZg+Rcq; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.128.66, mailfrom: pete@akeo.ie) Received: by mail-wm1-f66.google.com with SMTP id c71so1943920wmd.5 for ; Tue, 16 Jun 2020 01:13:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=i797gYxLMwx+P8jPfiU2LNsPzQiS0PJkyoXWxWJCHwY=; b=kDZg+RcqWT6QQ07V4iaxFyI8eIx0VyDhNaMnHDmgJEIzbWygwcxMaro3OG5rkHBXxU ASuzeBK0xbwaWueQJ5Hu6wafBPZmmumns9l/F8IkfgBjX6UumMirvgGSFdPxtfwrabrW elZAG9m81AMWZlNfL4cOROwIWAs4Utp8wHiw2tTsU9VykwqDUpPsLwBqigl5TYXS4eU+ moVUEgNmYNuB+EoUxtG28Sv17bxe9z9eVIWvs5l0q6b2Spt5PQqE+dwkh7ntrZPFazPk O/hCdNgbJPU6OIYwNHWfSzzNDrMSDt4JJvUybIYfuEcQh2CG+M3/yR6shGbVseswNgdd Q1kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=i797gYxLMwx+P8jPfiU2LNsPzQiS0PJkyoXWxWJCHwY=; b=XEC9Tj1qp4YZxZy53AWxEfAyrMBwSjOfnuZdeDh3dBshtl4sH6Z37bHu0STls+iujd d5Eq4s10X5EtrvHSq8s/peGI0cSRwSlU6RV1MlOv99pc08MeXh+VvbsjomRVgPyi5p++ zNVyotFQGRWYsJILX7hmk0ICCB2STamOGbDZwrZLYX9JhiMZJwbTlbYGcYl0F/nMumW4 KhNPxq9GelCy4nihqSibDpkwsmou/5EVuojYTT2q3WhkFm9jw537fPQCYTkHDPosbNIH /vSeKIs+lbAKJqXUxkhJce/JMLsFo5w1EoFj8G6bsNWQ8SB74RY3KyKqkwAj2S7tnxmP bUJg== X-Gm-Message-State: AOAM533ohkg8HwU88HiJ2ZieSiZ8Xz8sYMMUsUAL3UX+pRA6CIG8u7J7 IcFVsqk+j8qbr6Qc+E5uNpq4GQ== X-Google-Smtp-Source: ABdhPJy4m11E8pQSI/UnJQe58bAB9+YC0Q0wn4AU6+AyvgN9zuj/fkLRUdVs+4AxUwLOJ6ypxckphQ== X-Received: by 2002:a1c:7c0e:: with SMTP id x14mr1841099wmc.1.1592295211574; Tue, 16 Jun 2020 01:13:31 -0700 (PDT) Return-Path: Received: from [10.0.0.122] ([84.203.48.247]) by smtp.googlemail.com with ESMTPSA id l17sm2662747wmi.16.2020.06.16.01.13.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 Jun 2020 01:13:30 -0700 (PDT) Subject: Re: [edk2-platform][PATCH v2 1/2] Platforms/RaspberryPi: Add RPi4 settings to Readme To: Samer El-Haj-Mahmoud , devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Andrei Warkentin References: <20200615214331.12949-1-Samer.El-Haj-Mahmoud@arm.com> <20200615214331.12949-2-Samer.El-Haj-Mahmoud@arm.com> From: "Pete Batard" Message-ID: Date: Tue, 16 Jun 2020 09:13:29 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <20200615214331.12949-2-Samer.El-Haj-Mahmoud@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit On 2020.06.15 22:43, Samer El-Haj-Mahmoud wrote: > Add a section to the the RPi4 Readme for 'Configuration Settings', with > instructions on scripting from the UEFI Shell. > > Cc: Leif Lindholm > Cc: Ard Biesheuvel > Cc: Pete Batard > Cc: Andrei Warkentin > Signed-off-by: Samer El-Haj-Mahmoud > --- > Platform/RaspberryPi/RPi4/Readme.md | 74 +++++++++++++++++++- > 1 file changed, 73 insertions(+), 1 deletion(-) > > diff --git a/Platform/RaspberryPi/RPi4/Readme.md b/Platform/RaspberryPi/RPi4/Readme.md > index 03eb6c391aca..98388e3caba1 100644 > --- a/Platform/RaspberryPi/RPi4/Readme.md > +++ b/Platform/RaspberryPi/RPi4/Readme.md > @@ -143,4 +143,76 @@ all functionality may be available. > > - Network booting via onboard NIC. > - SPCR hardcodes type to PL011, and thus will not expose correct > - (miniUART) UART if DT overlays to switch UART are used on Pi 4B. > \ No newline at end of file > + (miniUART) UART if DT overlays to switch UART are used on Pi 4B. > + > +# 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** | > +Limit RAM to 3 GB | `RamLimitTo3GB` | Disable = `0x00000000`
Enabled= `0x00000001` (default) > +System Table Selection | `SystemTableMode`| ACPI = `0x00000000` (default)
ACPI + Devicetree = `0x00000001`
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` (default)
eMMC2 SDHCI = `0x00000000` > +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 read the 'Limit RAM to 3 GB' setting: > +``` > +setvar RamLimitTo3GB -guid CD7CC258-31DB-22E6-9F22-63B0B8EED6B5 > +``` > + > +- To change the 'Limit RAM to 3 GB' setting to 'Disabled': > +``` > +setvar RamLimitTo3GB -guid CD7CC258-31DB-22E6-9F22-63B0B8EED6B5 -bs -rt -nv =0x00000000 > +``` > + > +- 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 > +``` > Reviewed-by: Pete Batard