OvmfPkg: Fix the wild pointer in Fdt16550SerialProtHookLib
There was a wild pointer in Fdt16550SerialProtHookLib which pointed to an unknown space, which was very wrong and has been fixed. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Chao Li <lichao@loongson.cn>
This commit is contained in:
parent
b92e16d5c3
commit
5dc6f19b38
|
@ -26,13 +26,13 @@ PlatformHookSerialPortInitialize (
|
|||
VOID
|
||||
)
|
||||
{
|
||||
UINT64 *UartBase;
|
||||
UINT64 UartBase;
|
||||
|
||||
if (PcdGet64 (PcdSerialRegisterBase) != 0) {
|
||||
return RETURN_SUCCESS;
|
||||
}
|
||||
|
||||
*UartBase = CsrRead (LOONGARCH_CSR_KS1);
|
||||
UartBase = CsrRead (LOONGARCH_CSR_KS1);
|
||||
|
||||
return (RETURN_STATUS)PcdSet64S (PcdSerialRegisterBase, (UINTN)*UartBase);
|
||||
return (RETURN_STATUS)PcdSet64S (PcdSerialRegisterBase, (UINTN)UartBase);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue