summaryrefslogtreecommitdiffstats
path: root/ArmVirtPkg/FdtClientDxe
Commit message (Collapse)AuthorAgeFilesLines
* ArmVirtPkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-092-14/+2
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/FdtClientDxe: take DT node 'status' properties into accountArd Biesheuvel2018-11-261-5/+33
| | | | | | | | | | | | DT has a [pseudo-]standardized 'status' property that can be set on any node, and which signifies that a node should be treated as absent unless it is set to 'ok' or 'okay'. So take this into account when iterating over nodes. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* ArmVirtPkg/FdtClientDxe: honor memory DT node 'status' propertyArd Biesheuvel2017-04-041-0/+8
| | | | | | | | | | | | | | In some cases, (e.g., when running QEMU with TrustZone emulation), the DT may contain memory nodes whose status is set to 'secure'. Similarly, the status may be set to 'disabled' if the consumer of the DT image is expected to treat it as if it weren't there. So check whether a 'status' property is present, and if so, ignore the node if the status is not 'okay'. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/FdtClientDxe: install DT as sysconfig table in protocol notifyLaszlo Ersek2017-03-282-12/+97
| | | | | | | | | | | | Replace the dependency on PcdPureAcpiBoot with a Platform Has Device Tree notification callback. Move the sysconfig table installation from the entry point function to the callback. 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>
* Revert "ArmVirtPkg/FdtClientDxe: install DT configuration table at ReadyToBoot"Laszlo Ersek2017-03-282-41/+9
| | | | | | | | | | | | | | | | | | | This reverts commit 18f6d4df9ece8b91b86511bcdd1cf7da478c3627. We realized that DXE drivers that are independent of AcpiPlatformDxe (that is, independent of QEMU's ACPI generation), such as RamDiskDxe and BootGraphicsResourceTableDxe, may produce and/or manipulate ACPI tables, at driver dispatch or even at Ready To Boot. This makes it unsafe for us to check for ACPI presence in the UEFI system config table in a Ready To Boot callback, in order to decide about exposing the DT. 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>
* Revert "ArmVirtPkg/FdtClientDxe: make DT table installation !ACPI dependent"Laszlo Ersek2017-03-282-13/+8
| | | | | | | | | | | | | | | | | | | This reverts commit 78c41ff519b187d8979cda7074f007a6323f9acd. We realized that DXE drivers that are independent of AcpiPlatformDxe (that is, independent of QEMU's ACPI generation), such as RamDiskDxe and BootGraphicsResourceTableDxe, may produce and/or manipulate ACPI tables, at driver dispatch or even at Ready To Boot. This makes it unsafe for us to check for ACPI presence in the UEFI system config table in a Ready To Boot callback, in order to decide about exposing the DT. 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>
* ArmVirtPkg/FdtClientDxe: make DT table installation !ACPI dependentArd Biesheuvel2017-03-092-8/+13
| | | | | | | | | | | | Instead of having a build time switch to prevent the FDT configuration table from being installed, make this behavior dependent on whether we are passing ACPI tables to the OS. This is done by looking for the ACPI 2.0 configuration table, and only installing the FDT one if the ACPI one cannot be found. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/FdtClientDxe: install DT configuration table at ReadyToBootArd Biesheuvel2017-03-092-9/+41
| | | | | | | | | | | | Defer FDT configuration table installation until ReadyToBoot is signaled. This allows any driver to make modifications in the mean time, and will also allow us to defer the decision of whether to install it in the first place to later on in the boot. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/FdtClientDxe: supplement missing EFIAPI calling conv specifiersLaszlo Ersek2017-03-091-0/+3
| | | | | | | | | | | | Add missing EFIAPI calling convention specifiers to STATIC function that are exposed via the FdtClientProtocol interface. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
* ArmVirtPkg/FdtClientDxe: add methods to iterate over memory nodesArd Biesheuvel2016-09-151-0/+75
| | | | | | | | | | | Add high level methods to iterate over all 'reg' properties of all DT nodes whose device_type properties have the value "memory". Since we are modifying the FdtClient protocol, update the protocol and the only existing implementation at the same time. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/FdtClientDxe: report address and size cell count directlyArd Biesheuvel2016-09-151-2/+4
| | | | | | | | | | | | | | | The FDT client protocol methods dealing with "reg" properties return the size of a "reg" element. Currently, we have hardcoded this as '8', since #address-cells == #size-cells == 2 in most cases. However, for different values, have a single 'reg' element size is not unambiguous, since - however unlikely - if #address-cells != #size-cells, we do not know which is which. So before adding more methods to the protocol, fix up this oversight. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/FdtClientDxe: fix check for size of "reg" propertiesArd Biesheuvel2016-09-151-1/+1
| | | | | | | | | | | Currently, the code in FdtClientDxe assumes #address-cells/#size-cells values of <2>. Since DT "reg" properties always consist of <base, size> tuples, this means the size of the entire property should always be a multiple of 16 bytes (i.e, 4 * sizeof(UINT32), not 8. So fix this. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* ArmVirtPkg/VirtFdtDxe: move FDT config table installation to FdtClientDxeArd Biesheuvel2016-04-132-0/+15
| | | | | | | | | | 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>
* ArmVirtPkg/FdtClientDxe: implement new driverArd Biesheuvel2016-04-112-0/+304
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>