public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH edk2-platforms 0/5] Platform/RaspberryPi: fix serialportlib dependency hell
@ 2020-05-05 14:50 Ard Biesheuvel
  2020-05-05 14:50 ` [PATCH edk2-platforms 1/5] Platform/RaspberryPi/DualSerialPortLib: split up to ease reuse Ard Biesheuvel
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Ard Biesheuvel @ 2020-05-05 14:50 UTC (permalink / raw)
  To: devel; +Cc: leif, pete, andrey.warkentin, Ard Biesheuvel

This proposes an alternative approach to the issue described in
https://github.com/raspberrypi/firmware/issues/1376.

Instead of fiddling with HobLib internals and relying on headers being
included in the correct order, this replaces all DEBUG uses of SerialPortLib
with an implementation that doesn't reprogram the UART at all (and so does
not need to know the value of the base clock), and updates the two remaining
users to query the firmware for the correct value before touching the h/w.

NOTE: build tested only.

Ard Biesheuvel (5):
  Platform/RaspberryPi/DualSerialPortLib: split up to ease reuse
  Platform/RaspberryPi: introduce DebugDualSerialPortLib
  Platform/RaspberryPi: fix 16550 divisor calculation logic
  Platform/RaspberryPi3: query firmware for 16550 input clock at boot
  Platform/RaspberryPi: create DXE phase SerialPortLib version for RPi3

 Platform/RaspberryPi/RPi3/RPi3.dsc            |  16 +-
 Platform/RaspberryPi/RPi4/RPi4.dsc            |  14 +-
 .../DebugDualSerialPortLib.inf                |  46 ++++
 ...alPortLib.inf => DualSerialPortDxeLib.inf} |  30 ++-
 .../DualSerialPortLib/DualSerialPortLib.inf   |   5 +-
 .../DualSerialPortLib/DualSerialPortLib.h     |  82 ++++++
 .../DebugDualSerialPortLib.c                  |  28 ++
 .../DualSerialPortLib/DualSerialPortLib.c     | 243 +-----------------
 .../DualSerialPortLibCommon.c                 | 218 ++++++++++++++++
 .../DualSerialPortLibConstructor.c            |  40 +++
 .../PlatformLib/AArch64/RaspberryPiHelper.S   |  25 +-
 11 files changed, 494 insertions(+), 253 deletions(-)
 create mode 100644 Platform/RaspberryPi/Library/DualSerialPortLib/DebugDualSerialPortLib.inf
 copy Platform/RaspberryPi/Library/DualSerialPortLib/{DualSerialPortLib.inf => DualSerialPortDxeLib.inf} (69%)
 create mode 100644 Platform/RaspberryPi/Library/DualSerialPortLib/DualSerialPortLib.h
 create mode 100644 Platform/RaspberryPi/Library/DualSerialPortLib/DebugDualSerialPortLib.c
 create mode 100644 Platform/RaspberryPi/Library/DualSerialPortLib/DualSerialPortLibCommon.c
 create mode 100644 Platform/RaspberryPi/Library/DualSerialPortLib/DualSerialPortLibConstructor.c

-- 
2.17.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2020-05-06 16:16 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-05 14:50 [PATCH edk2-platforms 0/5] Platform/RaspberryPi: fix serialportlib dependency hell Ard Biesheuvel
2020-05-05 14:50 ` [PATCH edk2-platforms 1/5] Platform/RaspberryPi/DualSerialPortLib: split up to ease reuse Ard Biesheuvel
2020-05-06 10:18   ` Pete Batard
2020-05-05 14:50 ` [PATCH edk2-platforms 2/5] Platform/RaspberryPi: introduce DebugDualSerialPortLib Ard Biesheuvel
2020-05-06 10:18   ` Pete Batard
2020-05-05 14:50 ` [PATCH edk2-platforms 3/5] Platform/RaspberryPi: fix 16550 divisor calculation logic Ard Biesheuvel
2020-05-05 18:10   ` Ard Biesheuvel
2020-05-06 10:18     ` [edk2-devel] " Pete Batard
2020-05-06 10:25       ` Ard Biesheuvel
2020-05-05 14:50 ` [PATCH edk2-platforms 4/5] Platform/RaspberryPi3: query firmware for 16550 input clock at boot Ard Biesheuvel
2020-05-05 18:11   ` Ard Biesheuvel
2020-05-06 10:18     ` [edk2-devel] " Pete Batard
2020-05-06 10:31       ` Ard Biesheuvel
2020-05-06 10:38         ` Pete Batard
2020-05-05 14:50 ` [PATCH edk2-platforms 5/5] Platform/RaspberryPi: create DXE phase SerialPortLib version for RPi3 Ard Biesheuvel
2020-05-06 10:19   ` Pete Batard
2020-05-06 16:16 ` [PATCH edk2-platforms 0/5] Platform/RaspberryPi: fix serialportlib dependency hell Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox