Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CHERRY-PICK] ArmPlatformPkg: Initialize Serial Port Before Writing
PrePeiCore and Sec directly write the firmware version to the serial port. They relies on another component to initialize the serial port, however in certain configurations (such as release builds that don't use a DebugLib that initializes the serial port), the serial port can be uninitialized at this point, causing a crash when SerialPortWrite is called here. This patch updates PrePeiCore and Sec to call SerialPortInitialize before calling SerialPortWrite directly, which follows the pattern of other serial port writes. It is accepted to call the initialization routine multiple times, it is supposed to dump out if the serial port is already initialized. Signed-off-by: Oliver Smith-Denny <[email protected]>
- Loading branch information