]> xenbits.xensource.com Git - ovmf.git/commitdiff
OvmfPkg: RiscVVirt: Add missing SerialPortInitialize to Sec
authorAndrei Warkentin <andrei.warkentin@intel.com>
Wed, 1 Mar 2023 16:48:17 +0000 (10:48 -0600)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 17 May 2023 23:47:20 +0000 (23:47 +0000)
If the SerialPortLib had any initialization needed, this
would be skipped in the RiscVVirt Sec. Follow the example
seen elsewhere (ArmVirtPkg PrePi).

Seen with BaseSerialPortLibRiscVSbiLibRam not using DBCN in Sec,
yet using DBCN elsewhere.

Cc: Daniel Schaefer <git@danielschaefer.me>
Signed-off-by: Andrei Warkentin <andrei.warkentin@intel.com>
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
OvmfPkg/RiscVVirt/Sec/SecMain.c
OvmfPkg/RiscVVirt/Sec/SecMain.h
OvmfPkg/RiscVVirt/Sec/SecMain.inf

index b0520481782ee5692f8dc275112aa67961339856..6db39b94015966594adbbb8e9fde4f3cbe498867 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   RISC-V SEC phase module for Qemu Virt.\r
 \r
-  Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2008 - 2023, Intel Corporation. All rights reserved.<BR>\r
   Copyright (c) 2022, Ventana Micro Systems Inc. All rights reserved.<BR>\r
 \r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
@@ -57,6 +57,8 @@ SecStartup (
   UINT64                      StackBase;\r
   UINT32                      StackSize;\r
 \r
+  SerialPortInitialize ();\r
+\r
   //\r
   // Report Status Code to indicate entering SEC core\r
   //\r
index 83a8058efe40d44e18fd1e427756d6e5f0793301..7c7650f0d29847ba742caaf1f5e2068e376cf3be 100644 (file)
@@ -29,6 +29,7 @@
 #include <Library/PrePiLib.h>\r
 #include <Library/PlatformInitLib.h>\r
 #include <Library/PrePiHobListPointerLib.h>\r
+#include <Library/SerialPortLib.h>\r
 #include <Register/RiscV64/RiscVImpl.h>\r
 \r
 /**\r
index aed35d3af596516cd2cfbc1e16d3e0f693b5da12..0e2a5785e8a44fee7ab7653f01a25517a93b3919 100644 (file)
@@ -48,6 +48,7 @@
   FdtLib\r
   MemoryAllocationLib\r
   HobLib\r
+  SerialPortLib\r
 \r
 [Ppis]\r
   gEfiTemporaryRamSupportPpiGuid                # PPI ALWAYS_PRODUCED\r