summaryrefslogtreecommitdiffstats
path: root/ArmVirtPkg/Library/ArmVirtGicArchLib
Commit message (Collapse)AuthorAgeFilesLines
* ArmVirtPkg: fix ASSERT in ArmVirtGicArchLib with virtualization=onLeif Lindholm2020-03-171-1/+6
| | | | | | | | | | | | | | | | | | | ArmVirtGicArchLib was originally implemented before virtualization emulation was implemented in QEMU, and the GICv2 model implemented only the physical copy of control registers. Enabling virtualization emulation to QEMU adds also the virtual copy, doubling the RegSize returned by FindCompatibleNodeReg () in ArmVirtGicArchLibConstructor (). This triggered an ASSERT when running QEMU with -M virt,virtualization=on. Address this by testing for both possible valid values of RegSize. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2588 Cc: Laszlo Ersek <lersek@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Leif Lindholm <leif@nuviainc.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
* 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/ArmVirtGicArchLib: eliminate unchecked PcdSetXX() callsLaszlo Ersek2016-10-251-4/+9
| | | | | | | | | | | | | | | | These are deprecated / disabled under the DISABLE_NEW_DEPRECATED_INTERFACES feature test macro. Introduce a variable called PcdStatus, and use it to assert the success of these operations (there is no reason for them to fail here). Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=165 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> # RVCT Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
* ArmVirtPkg/ArmVirtGicArchLib: adapt ASSERT()s to 64-bit base addressesDennis Chen2016-10-211-4/+4
| | | | | | | | | | | | Since All the GIC base address variables has been aligned to 64-bit, it doesn't make sense to continue use MAX_UINT32 in ASSERT() statement, so this patch uses MAX_UINTN to adapt to this kind of change. Contributed-under: TianoCore Contribution Agreement 1.0 Cc: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Dennis Chen <dennis.chen@arm.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/FdtClientDxe: report address and size cell count directlyArd Biesheuvel2016-09-151-3/+6
| | | | | | | | | | | | | | | 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>
* ArmPkg ArmPlatformPkg ArmVirtPkg: ARM GICv2/v3 Base Address width fix-upDennis Chen2016-09-081-4/+4
| | | | | | | | | | | According to the ACPI 6.0/6.1 spec, the physical base address of GICC, GICD, GICR and GIC ITS is 64-bit. So change the type of the various GIC base address PCDs to 64-bit, and fix up all users. Contributed-under: TianoCore Contribution Agreement 1.0 Cc: Leif Lindholm <leif.lindholm@linaro.org> Signed-off-by: Dennis Chen <dennis.chen@arm.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
* ArmVirtPkg/ArmGicArchLib: move to FdtClient protocolArd Biesheuvel2016-04-112-8/+85
| | | | | | | | | | | | | | | | | | | | | | | 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>
* ArmVirtPkg: implement DT-based ArmGicArchLibArd Biesheuvel2015-07-282-0/+115
Since it is arguably incorrect to infer the GIC revision from CPU ID and GIC feature registers on platforms that describe the GIC in the device tree, this implements the library class ArmGicArchLib tailored for such platforms. The supported GIC revision is retrieved from the dynamic PCD that is set based on the GIC DT node. This means this library can only execute post DXE core, but this is not a problem for any of the virt platforms. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Tested-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18102 6f19259b-4bc3-4df7-8a09-765794883524