Skip to content

Commit

Permalink
OvmfPkg: RiscVVirt: Add missing SerialPortInitialize to Sec
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrei Warkentin <[email protected]>
Reviewed-by: Sunil V L <[email protected]>
Reviewed-by: Michael D Kinney <[email protected]>
  • Loading branch information
andreiw authored and mergify[bot] committed May 17, 2023
1 parent 45da4e3 commit 0abfb0b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion OvmfPkg/RiscVVirt/Sec/SecMain.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @file
RISC-V SEC phase module for Qemu Virt.
Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2008 - 2023, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2022, Ventana Micro Systems Inc. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
Expand Down Expand Up @@ -57,6 +57,8 @@ SecStartup (
UINT64 StackBase;
UINT32 StackSize;

SerialPortInitialize ();

//
// Report Status Code to indicate entering SEC core
//
Expand Down
1 change: 1 addition & 0 deletions OvmfPkg/RiscVVirt/Sec/SecMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <Library/PrePiLib.h>
#include <Library/PlatformInitLib.h>
#include <Library/PrePiHobListPointerLib.h>
#include <Library/SerialPortLib.h>
#include <Register/RiscV64/RiscVImpl.h>

/**
Expand Down
1 change: 1 addition & 0 deletions OvmfPkg/RiscVVirt/Sec/SecMain.inf
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
FdtLib
MemoryAllocationLib
HobLib
SerialPortLib

[Ppis]
gEfiTemporaryRamSupportPpiGuid # PPI ALWAYS_PRODUCED
Expand Down

0 comments on commit 0abfb0b

Please sign in to comment.