From: maobibo@loongson.cn
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: devel@edk2.groups.io
Subject: one possible issue with ovmf fvb
Date: Thu, 25 Nov 2021 17:43:20 +0800 [thread overview]
Message-ID: <444f3f42-cc2c-f255-389e-504b31789fcd@loongson.cn> (raw)
Hi Gerd,
I am porting Loongarch Qemu uefi bios, and I want to use reuse ovmf code. And I encounter one problem
when using OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.c
here is piece of code:
-----------------------------------------------------------
Initialize = TRUE;
if (PcdGet64 (PcdEmuVariableNvStoreReserved) != 0) {
Ptr = (VOID*)(UINTN) PcdGet64 (PcdEmuVariableNvStoreReserved);
DEBUG ((
DEBUG_INFO,
"EMU Variable FVB: Using pre-reserved block at %p\n",
Ptr
));
Status = ValidateFvHeader (Ptr);
if (!EFI_ERROR (Status)) {
DEBUG ((DEBUG_INFO, "EMU Variable FVB: Found valid pre-existing FV\n"));
Initialize = FALSE;
}
} else {
Ptr = AllocateRuntimePages (EFI_SIZE_TO_PAGES (EMU_FVB_SIZE));
}
mEmuVarsFvb.BufferPtr = Ptr;
//
// Initialize the main FV header and variable store header
//
if (Initialize) {
SetMem (Ptr, EMU_FVB_SIZE, ERASED_UINT8);
InitializeFvAndVariableStoreHeaders (Ptr);
}
PcdStatus = PcdSet64S (PcdFlashNvStorageVariableBase64, (UINT32)(UINTN) Ptr);
ASSERT_RETURN_ERROR (PcdStatus);
On my tcg vm, Ptr will be 64-bit physical address if memory exceeds 4G, I do not know whether there is similar issue on x64 ovmf.
ditto for the following PcdFlashNvStorageFtwSpareBase/PcdFlashNvStorageFtwWorkingBase
Can uefi bios manage memory beyond 4G?
regards
bibo, mao
next reply other threads:[~2021-11-25 9:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-25 9:43 maobibo [this message]
2021-11-25 10:38 ` one possible issue with ovmf fvb Gerd Hoffmann
2021-11-26 2:37 ` [edk2-devel] " maobibo
2021-11-27 19:45 ` Andrew Fish
2021-11-29 9:50 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=444f3f42-cc2c-f255-389e-504b31789fcd@loongson.cn \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox