Age | Commit message (Collapse) | Author |
|
The interface to PL011UartInitializePort has changed in
ArmPlatformPkg/Drivers/PL011Uart with the title:
"ArmPlatformPkg: Add support to configure PL011 UART clock"
This patch updates the calls to PL011UartInitializePort(), in line with
that change, adding a parameter value using the PCD previously used
directly by the driver.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
ArmVirtPkg's Platform BDS has never had a progress bar. We can easily add
one, by copying the PlatformBootManagerWaitCallback() function verbatim
from
Nt32Pkg/Library/PlatformBootManagerLib/PlatformBootManager.c
It can be tested by passing the following option to QEMU (5 seconds):
-boot menu=on,splash-time=5000
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
|
In the course of porting ArmVirtPkg to the MdeModulePkg BDS, commit
1f73aef50c5e
ArmVirtPkg/PlatformBootManagerLib: add EnableQuietBoot & DisableQuietBoot
open-coded the EnableQuietBoot() function (and its dependencies / friends)
from IntelFrameworkModulePkg BDS.
This code duplication can be avoided; the functionality is available from
the following three libraries in MdeModulePkg:
- BootLogoLib: provides the BootLogoEnableLogo() function. It does not
provide the internal ConvertBmpToGopBlt() function -- that one is
delegated to ImageDecoderLib (function DecodeImage()).
- ImageDecoderLib: a general library that registers decoder plugins for
specific image formats, and provides the generic DecodeImage() on top.
- BmpImageDecoderLib: one of said decoder plugins, for handling BMP images
(which is the format of our logo).
In this patch, we revert 1f73aef50c5e, and atomically incorporate the
above libraries. This is inspired by Nt32Pkg commit 859e75c4fc42:
Nt32Pkg: Use BootLogoLib for logo and progress bar drawing.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
|
This completes the transition to the new BDS.
The FILE_GUID in "QemuBootOrderLib.inf" is intentionally not changed.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gary Ching-Pang Lin <glin@suse.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
|
|
With OvmfPkg's original QemuBootOrderLib (and USE_OLD_BDS) gone, we no
longer need the BootOptionList parameter in the SetBootOrderFromQemu()
prototype. Update the library class header file (including the function's
documentation), and adapt the library instance and the call sites.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gary Ching-Pang Lin <glin@suse.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
|
|
To support UEFI Secure Boot and the Linux persistent store with UEFI
variables, set PcdMaxVariableSize to 0x2000 bytes as is done in OvmfPkg.
For reference, the related Ovmf commits: 8cee3de7 2d441ca9
Also increase the maximum size for Authenticated variables in order to
handle a larger Signature List size as is done in OvmfPkg. Related Ovmf
commit: f5404a3e
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Linn Crosetto <linn@hpe.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
This library instance is no longer referenced.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@Intel.com>
|
|
Based on OvmfPkg commit 79c098b6d25d.
Unlike in OVMF, no USE_OLD_BDS fallback is introduced; I think that
ArmVirtPkg is less widely used by non-developers than OvmfPkg.
ArmVirtXen is not modified, as it uses PlatformIntelBdsLib from
ArmPlatformPkg.
About this patch:
- DxeServicesLib and SortLib are resolved generally (they have broad
client module type lists).
- ReportStatusCodeLib is resolved for UEFI_APPLICATION modules.
- GenericBdsLib and PlatformBdsLib are replaced with UefiBootManagerLib
and PlatformBootManagerLib, and resolved from under MdeModulePkg and
ArmVirtPkg, respectively.
- QemuBootOrderLib is pointed to the QemuNewBootOrderLib instance.
- FileExplorerLib no longer depends on SECURE_BOOT_ENABLE, it is nedeed by
BootMaintenanceManagerUiLib, which we link into UiApp.
- PcdBootManagerMenuFile carries the FILE_GUID of
"MdeModulePkg/Application/UiApp/UiApp.inf". The default PCD value from
"MdeModulePkg/MdeModulePkg.dec" points to
"MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf",
which, according to the commit that introduced it (a382952f8255), only
'provides a very simple UI showing all the boot options recorded by
"BootOrder" and user can select any of them to boot'.
- Include the new core BDS driver, and include the boot manager
application, with the usual main menu entries.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Fixes: https://github.com/tianocore/edk2/issues/83
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@Intel.com>
|
|
UefiBootManagerLib does not provide these functions, we have to implement
them. (EnableQuietBoot() puts up the nice TianoCore logo.)
OvmfPkg commits 817fb3ac2a78 and 8e8fd3037788 have extracted these
functions already,
- from "IntelFrameworkModulePkg/Library/GenericBdsLib/BdsConsole.c"
- to "OvmfPkg/Library/PlatformBootManagerLib/QuietBoot.c".
Copy the latter file, with minimal changes.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@Intel.com>
|
|
QemuBootOrderLib can only filter out and reorder boot options; it cannot
create boot options. It relies on Platform BDS to auto-generate all
possible boot options first (for example, for new virtual devices that
have been configured since the last run of the virtual machine). Then it
will decide, case-by-case, whether each of those auto-generated boot
options should be preserved (and at what position), or removed.
Thus far, the only implementation of SetBootOrderFromQemu(), used in
connection with IntelFrameworkModulePkg BDS, has expected said complete
boot option list as an input parameter:
BdsEntry() [IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c]
// create empty list
InitializeListHead (
&BootOptionList
)
PlatformBdsPolicyBehavior( [ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c]
BootOptionList
)
BdsLibConnectAll()
BdsLibEnumerateAllBootOption(
BootOptionList
)
// at this point, BootOptionList starts with the preexistent boot
// options, and ends with the auto-generated options
SetBootOrderFromQemu( [OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c]
BootOptionList
)
// write out changed boot order to UEFI variables
// The "BootOrder" variable may have changed. Refresh BootOptionList
// from it, and return it to BdsEntry().
With MdeModulePkg BDS, a BootOptionList is not propagated from BdsEntry()
to SetBootOrderFromQemu() and back. All processing is based directly on
the underlying "BootOrder" and "Boot####" variables.
In OvmfPkg, commit d27ec22d1189 introduced a new instance of
QemuBootOrderLib, called QemuNewBootOrderLib. It is based on
UefiBootManagerLib, and rather than taking a complete BootOptionList as a
parameter, it expects that the "BootOrder" and "Boot####" variables are
complete in the above sense.
Rebase the boot order manipulation to UefiBootManagerLib and
QemuNewBootOrderLib, while keeping the requirement satisfied, like this:
BdsEntry() [MdeModulePkg/Universal/BdsDxe/BdsEntry.c]
PlatformBootManagerAfterConsole() [ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c]
EfiBootManagerConnectAll()
EfiBootManagerRefreshAllBootOption()
// at this point all auto-generated options exist at the end of
// "BootOrder"
SetBootOrderFromQemu() [OvmfPkg/Library/QemuNewBootOrderLib/QemuBootOrderLib.c]
// read boot options from "BootOrder" and "Boot####", then
// manipulate them
This patch parallels OvmfPkg commit 04fe914ba53e.
Once the USE_OLD_BDS fallback is removed from OvmfPkg, the parameter list
of the SetBootOrderFromQemu() prototype can be updated to VOID.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@Intel.com>
|
|
This patch parallels OvmfPkg commit fed691a6f913.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@Intel.com>
|
|
Namely,
- PlatformBdsBootSuccess,
- PlatformBdsBootFail,
- PlatformBdsLockNonUpdatableFlash.
This patch parallels OvmfPkg commit 7f89929f7fb2.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@Intel.com>
|
|
Register the Enter key as the continue key (hot key to skip the boot
timeout). Map the F2 and ESC keys to the UI. Register the memory-mapped
Shell boot option.
The patch parallels OvmfPkg commit 07dd96e82032. The
PlatformRegisterFvBootOption() and PlatformRegisterOptionsAndKeys()
functions are copied almost verbatim. The only changes are: internal
linkage for these functions (i.e., STATIC), and mentioning the ESC key in
the comments.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@Intel.com>
|
|
MdeModulePkg/BDS doesn't launch the UI (Boot Manager Menu) from the
platform side. The platform is expected to store the boot timeout only, in
PcdPlatformBootTimeOut. This is usually done in
PlatformBootManagerBeforeConsole().
(ArmVirtXen is not modified, as it uses PlatformIntelBdsLib from
ArmPlatformPkg, not ArmVirtPkg.)
The patch parallels OvmfPkg commit 8dc0f0a6aab0.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@Intel.com>
|
|
With IntelFrameworkModulePkg BDS, the platform code is responsible for
updating console variables (e.g., with BdsLibUpdateConsoleVariable()), and
then connecting them (e.g., with BdsLibConnectAllDefaultConsoles()). This
is usually (although not necessarily) done in PlatformBdsPolicyBehavior().
With MdeModulePkg BDS, the platform is responsible for updating the
console variables in PlatformBootManagerBeforeConsole(). When that
function returns, BdsEntry() will automatically connect the consoles; the
platform is not responsible for the connection.
IntelFrameworkModulePkg MdeModulePkg
BdsEntry BdsEntry
PlatformBdsInit PlatformBootManagerBeforeConsole
+----> EfiBootManagerUpdateConsoleVariable
|
dispatch Driver#### | dispatch Driver####
| +> connect consoles
| |
PlatformBdsPolicyBehavior | | PlatformBootManagerAfterConsole
BdsLibUpdateConsoleVariable <--+ |
BdsLibConnectAllDefaultConsoles <+
display splash screen display splash screen
Thus, move the console variable massaging from the beginning of
PlatformBootManagerAfterConsole() (originally PlatformBdsPolicyBehavior())
to the end of PlatformBootManagerBeforeConsole(), and drop the explicit
BdsLibConnectAllDefaultConsoles() call.
This patch parallels OvmfPkg commit e9e9ad644fab.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@Intel.com>
|
|
The general BDS helper functions are now provided by MdeModulePkg's
UefiBootManagerLib, and no longer by IntelFrameworkModulePkg's
GenericBdsLib.
This patch parallels OvmfPkg commit 2b23b8d45b62.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@Intel.com>
|
|
In this rather mechanical patch, we replace the calls to GenericBdsLib's
BdsLibUpdateConsoleVariable() with calls to UefiBootManagerLib's
EfiBootManagerUpdateConsoleVariable(), which has the same purpose.
The latter uses CONSOLE_TYPE enum constants from
"MdeModulePkg/Include/Library/UefiBootManagerLib.h", for identifying the
console type / underlying UEFI variable in the first parameter.
This patch parallels OvmfPkg commit 9dc08ec6574b.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@Intel.com>
|
|
"IntelFrameworkModulePkg/Include/Library/PlatformBdsLib.h" declares the
following interfaces:
- PlatformBdsInit
- PlatformBdsPolicyBehavior
- PlatformBdsBootFail
- PlatformBdsBootSuccess
- PlatformBdsLockNonUpdatableFlash
- LockKeyboards
From these, we've been using PlatformBdsInit() and
PlatformBdsPolicyBehavior().
"MdeModulePkg/Include/Library/PlatformBootManagerLib.h" declares the three
interfaces below:
- PlatformBootManagerBeforeConsole
- PlatformBootManagerAfterConsole
- PlatformBootManagerWaitCallback
Comparing the BdsEntry() functions between
- "IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c" and
- "MdeModulePkg/Universal/BdsDxe/BdsEntry.c",
we can establish the following mapping:
IntelFrameworkModulePkg MdeModulePkg
BdsEntry() BdsEntry()
PlatformBdsInit() <--------------> PlatformBootManagerBeforeConsole()
dispatch Driver#### <--------------> dispatch Driver####
connect consoles
PlatformBdsPolicyBehavior() <------> PlatformBootManagerAfterConsole()
The difference in connecting the consoles will be addressed in a later
patch, now we just rename the functions according to the mapping above,
and copy the call site comments from MdeModulePkg's BdsEntry().
For the third interface, PlatformBootManagerWaitCallback(), add an empty
implementation (and copy the comment from the library class header).
Platform BDS can use this callback to draw a progress bar, for example.
This patch parallels OvmfPkg commit a7566234e92c.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@Intel.com>
|
|
Create a copy of PlatformIntelBdsLib under the name
PlatformBootManagerLib, with the following initial changes:
- replace PlatformBdsLib references with PlatformBootManagerLib in
comments,
- replace "IntelBdsPlatform" with "PlatformBm" in file names and their
references,
- generate a new FILE_GUID.
PlatformBootManagerLib will be linked into the BDS driver from
MdeModulePkg.
This patch parallels OvmfPkg commit 305418818959.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@Intel.com>
|
|
Now that we have moved the handling of the xen,xen DT node to XenioFdtDxe,
remove its handling from VirtFdtDxe. Since the only functionality that
remains is handling the virtio,mmio DT node, rename VirtFdtDxe to
VirtioFdtDxe to reflect that. Also update the platforms that use this
driver.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
Now that the only functionality that remains in VirtFdtDxe is enumerating
the respective virtual I/O buses, it no longer makes sense to have a driver
that is shared between Xen domU and QEMU. So move the Xen I/O DT node
handling to a new driver, and update ArmVirtXen to switch to it.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
Now that FdtClientDxe is the core driver that takes ownership of the host
supplied FDT, it makes sense to put it in charge of installing the FDT
configuration table as well.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
This type is not used in the code, so drop the definitions.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
We no longer care when VirtFdtDxe executes, since
- the driver sets no dynamic PCDs any longer, and
- the only remaining functionality centers on VirtioMmioInstallDevice()
and XenIoMmioInstall() function calls and FDT configuration table
installation.
So drop the A PRIORI declaration.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
The RTC driver no longer relies on VirtFdtDxe to set the pl031 RTC base
address in a dynamic PCD, so drop the handling altogether.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
This moves QEMU based platforms to ArmVirtPL031FdtClientLib, so that we no
longer have to rely on VirtFdtDxe to execute first and set the PL031 base
address in a dynamic PCD.
The only driver which [transitively] depends on this PcdPL031RtcBase PCD is
EmbeddedPkg/RealTimeClockRuntimeDxe, so this conversion cannot affect any
other users and is thus safe.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
This implements a library ArmVirtPL031FdtClientLib which is intended to
be incorporated into RealTimeClockRuntimeDxe via NULL library class
resolution. This allows us to make RealTimeClockRuntimeDxe depend on the
FDT client protocol, and discover the PL031 base address from the device tree
directly rather than relying on VirtFdtDxe to set the dynamic PCDs.
The NULL library class resolution approach to strictly order production and
consumption of dynamic PCDs is not generally safe in cases such as this one,
where the producer and the consumer of the PCD are both libraries. However,
since the PCD is produced in this library's constructor, and the consumer
library's constructor 'LibRtcInitialize' is not a 'true' constructor (it is
invoked explicitly by RealTimeClockRuntimeDxe), this case is guaranteed to
be safe after all.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
Commit 03b6bed17ea6 ArmVirtPkg/XenRelocatablePlatformLib: rewrite DTB
memory node retrieval in C") introduced a FindMemNode () C function
that takes pointers to system memory base and size as arguments, but the
calling code passes them in the wrong order.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
Now that the PCI host bridge driver parses the DT node that describes
the PCI host bridge directly via the FDT client protocol, we can drop the
handling from VirtFdtDxe completely.
This means some PCI related PCDs are no longer set, such as PcdPciBusMin,
PcdPciBusMax, PcdPciIoBase, PcdPciIoSize, PcdPciIoTranslation,
PcdPciMmio32Base and PcdPciMmio32Size. Since these PCDs are specific to
ARM (and declared in ArmPlatformPkg), and not used anywhere else by the
ArmVirtPkg platforms, we can simply stop populating them, and drop all
references to them.
It also means that we can no longer rely on PcdPciDisableBusEnumeration
to be set before it is consumed by PciBusDxe and QemuFwCfgAcpiPlatformDxe,
so make those depend on FdtPciPcdProducerLib explicitly via NULL library
class resolution.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
Instead of relying on VirtFdtDxe to populate various dynamic PCDs with
information retrieved from the host-provided device tree, perform the
PCI ECAM related DT node parsing directly in PciHostBridgeDxe.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
Make BaseCachingPciExpressLib depend on PciPcdProducerLib, so that we
have a chance to populate PcdPciExpressBaseAddress based on the contents
of the device tree.
Also update the platforms under ArmVirtPkg that support PCI to use the
special MAX_UINT64 value as the build time default for
PcdPciExpressBaseAddress.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
This implements a library FdtPciPcdProducerLib which is intended to
be incorporated into modules that consume the PCI related dynamic PCDs
PcdPciExpressBaseAddress and PcdPciDisableBusEnumeration, either via NULL
library class resolution or via a direct dependency (for other libraries
or modules in ArmVirtPkg). This allows us to make them depend on the FDT
client protocol, and populate these PCDs based on the presence and the
contents of a 'pci-host-ecam-generic' DT node.
This also overloads the meaning of PcdPciExpressBaseAddress, which we will
set to MAX_UINT64 to signify that the actual values of these two PCDs have
not been assigned yet.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
Remove the handling of the fw_cfg DT node from VirtFdtDxe now that the
fw_cfg client library has been moved to the FDT client protocol, and no
longer relies on VirtFdtDxe to pass this information via dynamic PCDs.
Since the PCDs in question are now no longer used, remove them from the
various DEC and DSC files as well.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
Make this library depend on the FDT client protocol to access the
host supplied device tree directly rather than depending on VirtFdtDxe
to set them using dynamic PCDs.
Since this library is used by several drivers (BdsDxe, SmbiosPlatformDxe,
SmbiosDxe and QemuFwCfgAcpiPlatformDxe), we will end up parsing the device
tree and the fwcfg node at least four times. However, no dynamic PCDs are
involved anymore, and will even be removed completely in a subsequent
patch. So the conversion is not optimal, but guaranteed to be safe.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
The timer code no longer relies on VirtFdtDxe to set the PCDs, so remove
the handling of the timer node and the references to those PCDs.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
Move to the new dedicated ArmVirtTimerFdtClientLib to populate the
various timer related PCDs at driver load time rather than relying on
VirtFdtDxe to do it. Since ArmPkg/TimerDxe is the only consumer of these
PCDs, which is the DXE driver ArmVirtTimerFdtClientLib is intended to
complement, this conversion is guaranteed to be safe.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
This implements a library ArmVirtTimerFdtClientLib which is intended to
be incorporated into TimerDxe via NULL library class resolution. This
allows us to make TimerDxe depend on the FDT client protocol, and
discover the timer interrupts from the device tree directly rather than
relying on VirtFdtDxe to set the dynamic PCDs.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
The detection of the PSCI method has been moved to the EfiResetSystemLib
implementation, so drop the handling from VirtFdtDxe. Since no users
remain of gArmVirtTokenSpaceGuid.PcdArmPsciMethod, remove that as well.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
Instead of relying on VirtFdtDxe to detect the PSCI method, move our
EfiResetSystemLib to the FDT client protocol to interrogate the device
tree directly.
Since this library is only consumed by EmbeddedPkg/ResetRuntimeDxe, and
considering that the PCD is no longer set, and even removed completely in a
subsequent patch, this conversion is guaranteed to be safe.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
Now that we moved the GIC discovery to our ArmGicArchLib implementation,
we can remove it from VirtFdtDxe, since it is no longer used. Remove the
PcdArmGicRevision declaration and definitions as well: VirtFdtDxe no longer
sets it, and no other drivers consume its value.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
Instead of relying on VirtFdtDxe to populate the GIC related PCDs, move
this handling to our implementation of ArmGicArchLib, and retrieve the
required DT info using the new FDT client protocol.
This removes one of the reasons we need to load VirtFdtDxe first using
an 'A PRIORI' declaration in the platform FDF.
As Laszlo kindly confirms:
So, ultimately, the only user of this library instance is
"ArmPkg/Drivers/ArmGic/ArmGicDxe.inf". ... Indeed, checking the build
report file for ArmVirtQemu (AARCH64), I find ArmVirtGicArchLib (and
ArmGicLib too) only under "ArmPkg/Drivers/ArmGic/ArmGicDxe.inf".
which means that the constructor is only invoked once, and so the dynamic
PCDs are set in time for ArmGicDxe to consume them, and never afterwards.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
Add FdtClientDxe to the various platforms under ArmVirtPkg, so that the
drivers we will update to depend on the FDT client protocol in subsequent
patches will remain in working order.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
This implements a new DXE driver FdtClientDxe to produce the FDT client
protocol based on a device tree image supplied by the virt host.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
This introduces the FdtClientProtocol, which will be used to expose the
device tree provided by the host to other DXE drivers.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
Now that FatPkg is open source (and therefore can be included in the
EDK II tree) we build and use it directly.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
|
|
The PcdPeim dynamic PCD driver is dispatched explicitly via an 'A PRIORI'
declaration in the platform DSC. Without that declaration, the PEI module
can never be dispatched since it transitively (via PeiPcdLib) depends on
a PPI it produces itself. So use the NULL PcdLib explicitly only for
this driver.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
The PcdDxe dynamic PCD driver is dispatched explicitly via an 'A PRIORI'
declaration in the platform DSC. Without that declaration, the DXE driver
can never be dispatched since it transitively (via DxePcdLib) depends on
protocols it produces itself. So use the NULL PcdLib explicitly only for
this driver.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
Nothing we use on any of the ArmVirtPkg platforms depends on the
ArmPlatformSecExtraActionLib library class, so drop the resolution
from ArmVirt.dsc.inc
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Suggested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
The built in Linux loader was a temporary solution to boot ARM Linux
without EFI support in the OS. Now that EFI support is merged in the
upstream v4.5 release, we no longer need it. So drop it.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
|
|
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
|