From: "Pete Batard" <pete@akeo.ie>
To: devel@edk2.groups.io
Cc: ard.biesheuvel@arm.com, leif@nuviainc.com, awarkentin@vmware.com,
Andrei Warkentin <andrey.warkentin@gmail.com>
Subject: [edk2-platforms][PATCH 2/3] Platform/RPi/DualSerialPortLib: Fix miniUART serial divisor computation
Date: Mon, 4 May 2020 12:15:47 +0100 [thread overview]
Message-ID: <20200504111548.11112-3-pete@akeo.ie> (raw)
In-Reply-To: <20200504111548.11112-1-pete@akeo.ie>
From: Andrei Warkentin <andrey.warkentin@gmail.com>
Fix for https://github.com/raspberrypi/firmware/issues/1376.
For the Pi 3, to properly configure miniUART, we need the core clock,
which can be vary between VideoCore firmare release or config.txt options.
Unfortunately, it's painful to get - it's only available via the mailbox
interface. Additionally, SerialLib is a very limited environment, even
when linked in a DXE-mode component, because as part of a DebugLib
implementation it ends being the base prerequisite of everything.
That means a "normal" mailbox implementation like the one from
RpiFirmwareDxe (with dependencies on DmaLib) is out of the question.
Using a basic implementation such as the one in PlatformLib doesn't work
either because it operates in both environments with MMU on (DXE phase)
and MMU off (SEC/PrePi).
Ideally, we read the value via mbox exactly once at boot (PlatformLib),
and then somehow stash it. A GUID Hob sounds appropriate, yet when
SerialPortLib operates in DXE components, we can't use the HobLib to
*locate* the Hob list itself (remember, SerialPortLib initializes
before any of HobLib's dependencies, like UeflLib...).
FORTUNATELY, there is a way out - we can use PrePeiGetHobList to cut
through to the HOB list pointer stashed by PrePi without dealing with
any of the libraries meant for DXE.
Once we have the Hob list pointer, we can use the regular DXE HobLib
routines safely (so long as they are the ones taking a HobList pointer
as a parameter). So we can link DualSerialPortLib with whatever HobLib
that is appropriate for the environment - just need to also link in
PrePiHobListPointerLib.
gSerialLibCoreClockFreq is always externally set when DualSerialPortLib
run as part of PrePi. So - if gSerialLibCoreClockFreq is not set, then
we must be in the DXE phase and can fetch the Hob list via
PrePeiGetHobList. The GUID Hob is registered as part of a Pi-customized
PlatformPeiLib.
For the Pi 4, the situation is a bit different, as the system clock used
to compute the baud rate is not derived directly from the core clock, but
instead from a fixed clock (current 1 GHz) to which a 12.12 fixed point
divisor is applied. But even though we don't use it, we still initialize
gSerialLibCoreClockFreq a.k.a. the VPU core frequency, as this can be
useful to have.
As a result of the above, the PcdSerialClockRate values in the .dsc are
also updated, so that it can be used as a fallback to the default core
frequency in case of the Pi 3, and as the fixed frequency to which the
fixed point divisor is applied in case of the Pi 4.
Co-authored-by: Pete Batard <pete@akeo.ie>
Co-authored-by: Andrei Warkentin <andrey.warkentin@gmail.com>
Signed-off-by: Pete Batard <pete@akeo.ie>
---
Platform/RaspberryPi/Include/Guid/DualSerialPortLibHobGuid.h | 22 ++++
Platform/RaspberryPi/Library/DualSerialPortLib/DualSerialPortLib.c | 106 +++++++++++++++++---
Platform/RaspberryPi/Library/DualSerialPortLib/DualSerialPortLib.inf | 6 ++
Platform/RaspberryPi/Library/PlatformLib/AArch64/RaspberryPiHelper.S | 23 +++++
Platform/RaspberryPi/Library/PlatformPeiLib/PlatformPeiLib.c | 33 ++++++
Platform/RaspberryPi/Library/PlatformPeiLib/PlatformPeiLib.inf | 47 +++++++++
Platform/RaspberryPi/RPi3/RPi3.dsc | 8 +-
Platform/RaspberryPi/RPi4/RPi4.dsc | 9 +-
Platform/RaspberryPi/RaspberryPi.dec | 1 +
9 files changed, 234 insertions(+), 21 deletions(-)
diff --git a/Platform/RaspberryPi/Include/Guid/DualSerialPortLibHobGuid.h b/Platform/RaspberryPi/Include/Guid/DualSerialPortLibHobGuid.h
new file mode 100644
index 000000000000..82864eb33268
--- /dev/null
+++ b/Platform/RaspberryPi/Include/Guid/DualSerialPortLibHobGuid.h
@@ -0,0 +1,22 @@
+/** @file
+*
+* Copyright (c) 2020, Pete Batard <pete@akeo.ie>
+* Copyright (c) 2020, Andrei Warkentin <andrey.warkentin@gmail.com>
+*
+* SPDX-License-Identifier: BSD-2-Clause-Patent
+*
+**/
+
+#ifndef _DUAL_SERIAL_PORT_LIB_HOB_GUID_H_
+#define _DUAL_SERIAL_PORT_LIB_HOB_GUID_H_
+
+#define DUAL_SERIAL_PORT_LIB_HOB_GUID \
+ { 0x1CB0EB5B, 0x4F73, 0x4308, { 0xA3, 0x33, 0x1D, 0x95, 0xBE, 0x5F, 0x30, 0xB5 } }
+
+extern GUID gDualSerialPortLibHobGuid;
+
+typedef struct {
+ UINT32 CoreClockFreq;
+} DUAL_SERIAL_PORT_LIB_VARS;
+
+#endif /* _DUAL_SERIAL_PORT_LIB_HOB_GUID_H_ */
diff --git a/Platform/RaspberryPi/Library/DualSerialPortLib/DualSerialPortLib.c b/Platform/RaspberryPi/Library/DualSerialPortLib/DualSerialPortLib.c
index 05e12f383785..77b5f586b6c5 100644
--- a/Platform/RaspberryPi/Library/DualSerialPortLib/DualSerialPortLib.c
+++ b/Platform/RaspberryPi/Library/DualSerialPortLib/DualSerialPortLib.c
@@ -1,6 +1,7 @@
/** @file
16550 and PL011 Serial Port library functions for Raspberry Pi
+ Copyright (c) 2020, Andrei Warkentin <andrey.warkentin@gmail.com>
Copyright (c) 2020, Pete Batard <pete@akeo.ie>
Copyright (c) 2018, AMD Incorporated. All rights reserved.<BR>
Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>
@@ -12,7 +13,8 @@
**/
-#include <Base.h>
+#include <Uefi.h>
+#include <Guid/DualSerialPortLibHobGuid.h>
#include <IndustryStandard/Bcm2836.h>
#include <IndustryStandard/Bcm2836Gpio.h>
#include <Library/BaseLib.h>
@@ -21,9 +23,21 @@
#include <Library/PL011UartClockLib.h>
#include <Library/PL011UartLib.h>
#include <Library/SerialPortLib.h>
+//
+// The order of the following includes should not be altered
+//
+#include <Library/PrePiHobListPointerLib.h>
+#include <Pi/PiMultiPhase.h>
+#include <Library/HobLib.h>
-BOOLEAN UsePl011Uart = FALSE;
-BOOLEAN UsePl011UartSet = FALSE;
+STATIC BOOLEAN UsePl011Uart = FALSE;
+STATIC BOOLEAN UsePl011UartSet = FALSE;
+UINT32 gSerialLibCoreClockFreq = 0;
+//
+// Set by ArmPlatformPeiBootAction to skip PrePeiGetHobList,
+// as it won't be initialized and could return garbage.
+//
+UINT32 gSerialLibCoreSkipHob = 0;
#define PL011_UART_REGISTER_BASE BCM2836_PL011_UART_BASE_ADDRESS
#define MINI_UART_REGISTER_BASE (BCM2836_MINI_UART_BASE_ADDRESS + 0x40)
@@ -152,26 +166,86 @@ SerialPortGetDivisor (
UINT32 SerialBaudRate
)
{
- UINT64 BaseClockRate;
- UINT32 Divisor;
+ UINT64 BaseSerialClockFreq;
+ UINT32 Divisor;
+
+#if (RPI_MODEL == 3)
+ VOID *HobList;
+ EFI_HOB_GUID_TYPE *GuidHob;
+ DUAL_SERIAL_PORT_LIB_VARS *Vars;
+
+ //
+ // For the Pi 3, the base serial clock is the VPU core clock.
+ //
+ // Unfortunately, it's painful to get - it's only available via
+ // the mailbox interface. Additionally, SerialLib is a very
+ // limited environment, even when linked in a DXE-mode component, because
+ // as part of a DebugLib implementation it ends being the base prerequisite
+ // of /everything/. That means a "normal" mailbox implementation like
+ // the one im RpiFirmwareDxe (with dependencies on DmaLib) is out
+ // of the question. Using a basic implementation such as the one
+ // in PlatformLib doesn't work either because operate in both
+ // environments with MMU on (DXE phase) and MMU off (SEC/PrePi).
+ //
+ // Ideally, we read the value via mbox exactly once (PlatformLib),
+ // then somehow stash it. A GUID Hob sounds pretty nice, but
+ // we can't use the DXE HobLib to *locate* the Hob list itself
+ // (remember, SerialPortLib initializes before any of HobLib's
+ // dependencies, like UeflLib).
+ //
+ // FORTUNATELY, there is a way out - we can use PrePeiGetHobList
+ // to cut through to the HOB list pointer stashed by PrePi without.
+ // Once we have the Hob list pointer, we can use the DXE HobLib routines
+ // safely (so long as they are the ones taking a HobList pointer
+ // as a parameter).
+ //
+ // gSerialLibCoreClockFreq is always externally set when we run
+ // as part of PrePi. So - if gSerialLibCoreClockFreq is not set,
+ // then we must be in the DXE phase and can fetch the Hob list
+ // via our little hack.
+ //
+ if (gSerialLibCoreClockFreq == 0 && !gSerialLibCoreSkipHob) {
+ HobList = PrePeiGetHobList ();
+ if (HobList != NULL) {
+ GuidHob = (EFI_HOB_GUID_TYPE *) GetNextGuidHob (&gDualSerialPortLibHobGuid,
+ HobList);
+ if (GuidHob != NULL) {
+ Vars = (DUAL_SERIAL_PORT_LIB_VARS *) GET_GUID_HOB_DATA (GuidHob);
+ gSerialLibCoreClockFreq = Vars->CoreClockFreq;
+ gSerialLibCoreSkipHob = 1;
+ }
+ }
+ }
//
- // On the Raspberry Pi, the clock to use for the 16650-compatible UART
- // is the base clock divided by the 12.12 fixed point VPU clock divisor.
+ // Fall back to PCD if we have a nonsensical value.
+ //
+ if (gSerialLibCoreClockFreq < 10000000) {
+ gSerialLibCoreClockFreq = PcdGet32 (PcdSerialClockRate);
+ }
+ BaseSerialClockFreq = (UINT64) gSerialLibCoreClockFreq;
+#else
//
- BaseClockRate = (UINT64)PcdGet32 (PcdSerialClockRate) * 4;
- Divisor = MmioRead32(BCM2836_CM_BASE + BCM2836_CM_VPU_CLOCK_DIVISOR) & 0xFFFFFF;
- if (Divisor != 0)
- BaseClockRate = (BaseClockRate << 12) / Divisor;
+ // For the Pi 4, the base serial clock is not derived from the VPU
+ // core clock, but from a fixed clock (currently 1 GHz) to which a
+ // variable 12.12 fixed point clock divisor is applied.
+ //
+ BaseSerialClockFreq = (UINT64) PcdGet32 (PcdSerialClockRate);
+ Divisor = MmioRead32 (BCM2836_CM_BASE + BCM2836_CM_VPU_CLOCK_DIVISOR) & 0xFFFFFF;
+ if (Divisor != 0) {
+ BaseSerialClockFreq = (BaseSerialClockFreq << 12) / Divisor;
+ }
+#endif
//
- // Now calculate divisor for baud generator
- // Ref_Clk_Rate / Baud_Rate / 16
+ // As per the BCM2xxx datasheets:
+ // baudrate = system_clock_freq / (8 * (divisor + 1)).
//
- Divisor = (UINT32)BaseClockRate / (SerialBaudRate * 16);
- if (((UINT32)BaseClockRate % (SerialBaudRate * 16)) >= SerialBaudRate * 8) {
- Divisor++;
+ Divisor = (UINT32)BaseSerialClockFreq / (SerialBaudRate * 8);
+ if (Divisor != 0) {
+ Divisor--;
}
+
return Divisor;
}
diff --git a/Platform/RaspberryPi/Library/DualSerialPortLib/DualSerialPortLib.inf b/Platform/RaspberryPi/Library/DualSerialPortLib/DualSerialPortLib.inf
index af1e6b026fe6..7430eede18db 100644
--- a/Platform/RaspberryPi/Library/DualSerialPortLib/DualSerialPortLib.inf
+++ b/Platform/RaspberryPi/Library/DualSerialPortLib/DualSerialPortLib.inf
@@ -22,17 +22,23 @@ [Packages]
EmbeddedPkg/EmbeddedPkg.dec
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
+ Platform/RaspberryPi/RaspberryPi.dec
Silicon/Broadcom/Bcm283x/Bcm283x.dec
[LibraryClasses]
IoLib
+ HobLib
PcdLib
PL011UartClockLib
PL011UartLib
+ PrePiHobListPointerLib
[Sources]
DualSerialPortLib.c
+[Guids]
+ gDualSerialPortLibHobGuid
+
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterAccessWidth ## SOMETIMES_CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio ## CONSUMES
diff --git a/Platform/RaspberryPi/Library/PlatformLib/AArch64/RaspberryPiHelper.S b/Platform/RaspberryPi/Library/PlatformLib/AArch64/RaspberryPiHelper.S
index 91dfe1bb981e..83a3511d3507 100644
--- a/Platform/RaspberryPi/Library/PlatformLib/AArch64/RaspberryPiHelper.S
+++ b/Platform/RaspberryPi/Library/PlatformLib/AArch64/RaspberryPiHelper.S
@@ -85,6 +85,16 @@ ASM_FUNC (ArmPlatformPeiBootAction)
adr x2, mBoardRevision
str w0, [x2]
+ run .Lclkinfo_buffer
+
+ ldr w0, .Lfrequency
+ adr x2, gSerialLibCoreClockFreq
+ str w0, [x2]
+ adr x2, gSerialLibCoreSkipHob
+ //
+ // Any non-zero value will do.
+ //
+ str w0, [x2]
ret
.align 4
@@ -127,6 +137,19 @@ ASM_FUNC (ArmPlatformPeiBootAction)
.long 0 // end tag
.set .Lrevinfo_size, . - .Lrevinfo_buffer
+ .align 4
+.Lclkinfo_buffer:
+ .long .Lclkinfo_size
+ .long 0x0
+ .long RPI_MBOX_GET_CLOCK_RATE
+ .long 8 // buf size
+ .long 4 // input len
+ .long 4 // clock id: 0x04 = Core/VPU
+.Lfrequency:
+ .long 0 // frequency
+ .long 0 // end tag
+ .set .Lclkinfo_size, . - .Lclkinfo_buffer
+
//UINTN
//ArmPlatformGetPrimaryCoreMpId (
// VOID
diff --git a/Platform/RaspberryPi/Library/PlatformPeiLib/PlatformPeiLib.c b/Platform/RaspberryPi/Library/PlatformPeiLib/PlatformPeiLib.c
new file mode 100644
index 000000000000..367a32bd4ca7
--- /dev/null
+++ b/Platform/RaspberryPi/Library/PlatformPeiLib/PlatformPeiLib.c
@@ -0,0 +1,33 @@
+/** @file
+*
+* Copyright (c) 2011-2014, ARM Limited. All rights reserved.
+*
+* SPDX-License-Identifier: BSD-2-Clause-Patent
+*
+**/
+
+#include <PiPei.h>
+
+#include <Library/ArmPlatformLib.h>
+#include <Library/HobLib.h>
+#include <Library/PcdLib.h>
+#include <Library/DebugLib.h>
+#include <Guid/DualSerialPortLibHobGuid.h>
+
+extern UINT32 gSerialLibCoreClockFreq, gSerialLibCoreSkipHob;
+
+static DUAL_SERIAL_PORT_LIB_VARS mUartLibVars;
+
+EFI_STATUS
+EFIAPI
+PlatformPeim (
+ VOID
+ )
+{
+ BuildFvHob (PcdGet64 (PcdFvBaseAddress), PcdGet32 (PcdFvSize));
+
+ mUartLibVars.CoreClockFreq = gSerialLibCoreClockFreq;
+ BuildGuidDataHob (&gDualSerialPortLibHobGuid, &mUartLibVars, sizeof(mUartLibVars));
+
+ return EFI_SUCCESS;
+}
diff --git a/Platform/RaspberryPi/Library/PlatformPeiLib/PlatformPeiLib.inf b/Platform/RaspberryPi/Library/PlatformPeiLib/PlatformPeiLib.inf
new file mode 100644
index 000000000000..8e2bab14a89a
--- /dev/null
+++ b/Platform/RaspberryPi/Library/PlatformPeiLib/PlatformPeiLib.inf
@@ -0,0 +1,47 @@
+#/** @file
+#
+# Copyright (c) 2011-2012, ARM Limited. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+#**/
+
+[Defines]
+ INF_VERSION = 0x0001001A
+ BASE_NAME = ArmPlatformPeiLib
+ FILE_GUID = 49d37060-70b5-11e0-aa2d-0002a5d5c51b
+ MODULE_TYPE = SEC
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = PlatformPeiLib
+
+[Sources]
+ PlatformPeiLib.c
+
+[Packages]
+ ArmPkg/ArmPkg.dec
+ ArmPlatformPkg/ArmPlatformPkg.dec
+ MdePkg/MdePkg.dec
+ EmbeddedPkg/EmbeddedPkg.dec
+ MdeModulePkg/MdeModulePkg.dec
+ Platform/RaspberryPi/RaspberryPi.dec
+
+[LibraryClasses]
+ ArmPlatformLib
+ DebugLib
+ HobLib
+
+[Guids]
+ gDualSerialPortLibHobGuid
+
+[Ppis]
+ gEfiPeiMasterBootModePpiGuid # PPI ALWAYS_PRODUCED
+ gEfiPeiBootInRecoveryModePpiGuid # PPI SOMETIMES_PRODUCED
+
+[FixedPcd]
+ gArmTokenSpaceGuid.PcdFdBaseAddress
+ gArmTokenSpaceGuid.PcdFdSize
+ gArmTokenSpaceGuid.PcdFvBaseAddress
+ gArmTokenSpaceGuid.PcdFvSize
+
+[Depex]
+ TRUE
diff --git a/Platform/RaspberryPi/RPi3/RPi3.dsc b/Platform/RaspberryPi/RPi3/RPi3.dsc
index 563fb891b841..efebf1f823b3 100644
--- a/Platform/RaspberryPi/RPi3/RPi3.dsc
+++ b/Platform/RaspberryPi/RPi3/RPi3.dsc
@@ -77,6 +77,10 @@ [LibraryClasses.common]
UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
+ #
+ # PrePiHobListPointerLib is necessary for DualSerialPortLib.
+ #
+ PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
@@ -174,7 +178,7 @@ [LibraryClasses.common.SEC]
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
MemoryInitPeiLib|Platform/RaspberryPi/Library/MemoryInitPeiLib/MemoryInitPeiLib.inf
- PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf
+ PlatformPeiLib|Platform/RaspberryPi/Library/PlatformPeiLib/PlatformPeiLib.inf
ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
@@ -409,7 +413,7 @@ [PcdsFixedAtBuild.common]
gArmPlatformTokenSpaceGuid.PL011UartClkInHz|48000000
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|TRUE
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride|4
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate|500000000
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate|250000000
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl|0x27
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialExtendedTxFifoSize|8
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|115200
diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc b/Platform/RaspberryPi/RPi4/RPi4.dsc
index 4deccd9d3ecc..4dc9b493cf79 100644
--- a/Platform/RaspberryPi/RPi4/RPi4.dsc
+++ b/Platform/RaspberryPi/RPi4/RPi4.dsc
@@ -75,6 +75,10 @@ [LibraryClasses.common]
UefiLib|MdePkg/Library/UefiLib/UefiLib.inf
HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf
+ #
+ # PrePiHobListPointerLib is necessary for DualSerialPortLib.
+ #
+ PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
UefiRuntimeServicesTableLib|MdePkg/Library/UefiRuntimeServicesTableLib/UefiRuntimeServicesTableLib.inf
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
UefiBootServicesTableLib|MdePkg/Library/UefiBootServicesTableLib/UefiBootServicesTableLib.inf
@@ -182,12 +186,11 @@ [LibraryClasses.common.SEC]
PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
MemoryInitPeiLib|Platform/RaspberryPi/Library/MemoryInitPeiLib/MemoryInitPeiLib.inf
- PlatformPeiLib|ArmPlatformPkg/PlatformPei/PlatformPeiLib.inf
+ PlatformPeiLib|Platform/RaspberryPi/Library/PlatformPeiLib/PlatformPeiLib.inf
ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib/PrePiExtractGuidedSectionLib.inf
LzmaDecompressLib|MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
PrePiLib|EmbeddedPkg/Library/PrePiLib/PrePiLib.inf
HobLib|EmbeddedPkg/Library/PrePiHobLib/PrePiHobLib.inf
- PrePiHobListPointerLib|ArmPlatformPkg/Library/PrePiHobListPointerLib/PrePiHobListPointerLib.inf
MemoryAllocationLib|EmbeddedPkg/Library/PrePiMemoryAllocationLib/PrePiMemoryAllocationLib.inf
[LibraryClasses.common.DXE_CORE]
@@ -420,7 +423,7 @@ [PcdsFixedAtBuild.common]
gArmPlatformTokenSpaceGuid.PL011UartClkInHz|48000000
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio|TRUE
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterStride|4
- gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate|500000000
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSerialClockRate|1000000000
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialFifoControl|0x27
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialExtendedTxFifoSize|8
gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|115200
diff --git a/Platform/RaspberryPi/RaspberryPi.dec b/Platform/RaspberryPi/RaspberryPi.dec
index 66ef6186644b..a915387fc822 100644
--- a/Platform/RaspberryPi/RaspberryPi.dec
+++ b/Platform/RaspberryPi/RaspberryPi.dec
@@ -26,6 +26,7 @@ [Guids]
gRaspberryPiTokenSpaceGuid = {0xCD7CC258, 0x31DB, 0x11E6, {0x9F, 0xD3, 0x63, 0xB0, 0xB8, 0xEE, 0xD6, 0xB5}}
gRaspberryPiEventResetGuid = {0xCD7CC258, 0x31DB, 0x11E6, {0x9F, 0xD3, 0x63, 0xB4, 0xB4, 0xE4, 0xD4, 0xB4}}
gConfigDxeFormSetGuid = {0xCD7CC258, 0x31DB, 0x22E6, {0x9F, 0x22, 0x63, 0xB0, 0xB8, 0xEE, 0xD6, 0xB5}}
+ gDualSerialPortLibHobGuid = { 0x1CB0EB5B, 0x4F73, 0x4308, { 0xA3, 0x33, 0x1D, 0x95, 0xBE, 0x5F, 0x30, 0xB5 } }
[PcdsFixedAtBuild.common]
#
--
2.21.0.windows.1
next prev parent reply other threads:[~2020-05-04 11:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-04 11:15 [edk2-platforms][PATCH 0/3] Platform/RPi: Fix compatibility with recent start.elf Pete Batard
2020-05-04 11:15 ` [edk2-platforms][PATCH 1/3] Platform/RPi: Fortify mailbox code Pete Batard
2020-05-06 12:39 ` Ard Biesheuvel
2020-05-04 11:15 ` Pete Batard [this message]
2020-05-05 10:05 ` [edk2-platforms][PATCH 2/3] Platform/RPi/DualSerialPortLib: Fix miniUART serial divisor computation Ard Biesheuvel
2020-05-05 11:54 ` Pete Batard
2020-05-05 12:05 ` Ard Biesheuvel
2020-05-05 12:09 ` Pete Batard
2020-05-04 11:15 ` [edk2-platforms][PATCH 3/3] Platform/RPi: Report core clock frequency during early init Pete Batard
2020-05-04 11:37 ` [edk2-devel] " Philippe Mathieu-Daudé
2020-05-05 6:04 ` Andrei Warkentin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200504111548.11112-3-pete@akeo.ie \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox