Hi Marcin:
W dniu 17.05.2024 o 09:17, Chao Li via groups.io pisze:
This library is copied from ArmVirtPkg, in the Arm version, the value of
PcdFlashNvStorageVariableBase, PcdFlashNvStorageFtwWorkingBase and
PcdFlashNvStorageFtwSpareBase are hardcoded in INC file.
This version will calculate them from FDT resource and using the set PCD
to store when the NorFlashInitialise is called. By default, the first
available flash(not used for storage UEFI code) as NV variable storage
medium.
In this way, UEFI can better handle the change of flash base address,
which is suitable for different cpu architecture board implementation.
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=4770
Cc: Ard Biesheuvel<ardb+tianoc...@kernel.org>
Cc: Leif Lindholm<quic_llind...@quicinc.com>
Cc: Sami Mujawar<sami.muja...@arm.com>
Cc: Gerd Hoffmann<kra...@redhat.com>
Cc: Jiewen Yao<jiewen....@intel.com>
Signed-off-by: Chao Li<lic...@loongson.cn>
Signed-off-by: Xianglai Li<lixiang...@loongson.cn>
Can you split it into driver itself and part which uses DT data to
setup parameters?
This way driver can be used on other platforms as well, despite do
they hardcode flash data, read it via Firmware Handoff protocol, SMC
calls to embedded controller or have other way to keep flash data.
This lib is provided for resolving pfalsh base addresses for virtual
machines emulated by qemu.
The pfash base address of the arm and riscv architectures emulated by
qemu is hardcoded in UEFI.
After this lib is committed, arm and riscv can easily use this lib by
modifying the dsc and VarStore.fdf.inc files.
Later, we will send out the patch of arm and riscv, then arm and riscv
will also be realized by resolving the pflash base address through fdt.
So, what other qemu emulation platforms do you think will hard-code fdt
base addresses?:-)
Or are there specific scenarios that require hard-coded pflash base
addresses?:-)
I admit that there is more flexibility, but do we really need to do
that?:-)
Thanks!
Xianglai.
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119271): https://edk2.groups.io/g/devel/message/119271
Mute This Topic: https://groups.io/mt/106149595/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-