Branch: refs/heads/master Home: https://github.com/tianocore/edk2 Commit: b38068f9f6f38df747466c16da82ec15d6f9abcd https://github.com/tianocore/edk2/commit/b38068f9f6f38df747466c16da82ec15d6f9abcd Author: Neil Jones <neil.jo...@blaize.com> Date: 2023-06-01 (Thu, 01 Jun 2023)
Changed paths: M ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c Log Message: ----------- ArmPkg: Fix GicV2 BaseAddress types The GIC v2 base addresses can be 64bit, don't limit to 32 on 64bit machines. Signed-off-by: Neil Jones <neil.jo...@blaize.com> Reviewed-by: Pedro Falcato <pedro.falc...@gmail.com> Reviewed-by: Sami Mujawar <sami.muja...@arm.com> Commit: 4ec9a6f6cd2eb236c5dc135aa41a073edfa56901 https://github.com/tianocore/edk2/commit/4ec9a6f6cd2eb236c5dc135aa41a073edfa56901 Author: Sami Mujawar <sami.muja...@arm.com> Date: 2023-06-01 (Thu, 01 Jun 2023) Changed paths: M ArmPkg/Drivers/ArmGic/ArmGicCommonDxe.c M ArmPkg/Drivers/ArmGic/ArmGicLib.c M ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c M ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c M ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c M ArmPkg/Include/Library/ArmGicLib.h Log Message: ----------- ArmPkg: Fix data type used for GicDistributorBase The data type used by variables representing the GicDistributorBase has been inconsistently used in the ArmGic driver and the library. The PCD defined for the GIC Distributor base address is UINT64. However, the data types for the variables used is UINTN, INTN, and at some places UINT32. Therefore, update the data types to use UINTN and add necessary typecasts when reading values from the PCD. This should then be consistent across AArch32 and AArch64 builds. Signed-off-by: Sami Mujawar <sami.muja...@arm.com> Commit: a44fef7de3454cb0cb32a65a5fca16bec0b9416d https://github.com/tianocore/edk2/commit/a44fef7de3454cb0cb32a65a5fca16bec0b9416d Author: Sami Mujawar <sami.muja...@arm.com> Date: 2023-06-01 (Thu, 01 Jun 2023) Changed paths: M ArmPkg/Drivers/ArmGic/ArmGicLib.c M ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c M ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2NonSecLib.c M ArmPkg/Include/Library/ArmGicLib.h Log Message: ----------- ArmPkg: Fix data type used for GicInterruptInterfaceBase The data type used by variables representing the GicInterruptInterfaceBase has been inconsistently used in the ArmGic driver and the library. The PCD defined for the GIC Interrupt interface base address is UINT64. However, the data types for the variables used is UINTN, INTN, and at some places UINT32. Therefore, update the data types to use UINTN and add necessary typecasts when reading values from the PCD. This should then be consistent across AArch32 and AArch64 builds. Signed-off-by: Sami Mujawar <sami.muja...@arm.com> Reviewed-by: Ard Biesheuvel <a...@kernel.org> Commit: ea522a12b35852728a5fdbaa484bdb7425402f5b https://github.com/tianocore/edk2/commit/ea522a12b35852728a5fdbaa484bdb7425402f5b Author: Sami Mujawar <sami.muja...@arm.com> Date: 2023-06-01 (Thu, 01 Jun 2023) Changed paths: M ArmPkg/Drivers/ArmGic/ArmGicLib.c M ArmPkg/Include/Library/ArmGicLib.h Log Message: ----------- ArmPkg: Fix ArmGicSendSgiTo() parameters The Software Generated Interrupt Register (GICD_SGIR) is a 32 bit register with the following bit assignment: TargetListFilter, bits [25:24] CPUTargetList, bits [23:16] NSATT, bit [15] SGIINTID, bits [3:0] Therefore, modify the TargetListFilter, CPUTargetList, SGI Interrupt ID parameters of the ArmGicSendSgiTo () to use UINT8 instead of INTN. Signed-off-by: Sami Mujawar <sami.muja...@arm.com> Commit: ed132ef8aea6a8202cf4ee96a542b3d7be72b5d9 https://github.com/tianocore/edk2/commit/ed132ef8aea6a8202cf4ee96a542b3d7be72b5d9 Author: Sami Mujawar <sami.muja...@arm.com> Date: 2023-06-01 (Thu, 01 Jun 2023) Changed paths: M ArmPkg/Drivers/ArmGic/ArmGicNonSecLib.c Log Message: ----------- ArmPkg: Fix Non-Boolean comparison in ArmGicEnableDistributor According to edk2 coding standard specification, Non-Boolean comparisons must use a compare operator (==, !=, >, < >=, <=). See Section 5.7.2.1 at https://edk2-docs.gitbook.io/ edk-ii-c-coding-standards-specification/5_source_files/ 57_c_programming Therefore, fix the comparison in ArmGicEnableDistributor() Signed-off-by: Sami Mujawar <sami.muja...@arm.com> Commit: 937fbe48780478ace3de8499de038e9b60179563 https://github.com/tianocore/edk2/commit/937fbe48780478ace3de8499de038e9b60179563 Author: Sami Mujawar <sami.muja...@arm.com> Date: 2023-06-01 (Thu, 01 Jun 2023) Changed paths: M ArmPkg/Drivers/ArmGic/ArmGicLib.c M ArmPkg/Include/Library/ArmGicLib.h Log Message: ----------- ArmPkg: Fix return type for ArmGicGetInterfaceIdentification The CPU Interface Identification Register (GICC_IIDR) is a 32-bit register. Since ArmGicGetInterfaceIdentification () returns the value read from the GICC_IIDR register, update the return type for this function to UINT32. Signed-off-by: Sami Mujawar <sami.muja...@arm.com> Commit: 7f198321eec0f520373261a15b6d0922906d06bc https://github.com/tianocore/edk2/commit/7f198321eec0f520373261a15b6d0922906d06bc Author: Sami Mujawar <sami.muja...@arm.com> Date: 2023-06-01 (Thu, 01 Jun 2023) Changed paths: M ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c M ArmPkg/Drivers/ArmGic/GicV3/ArmGicV3Dxe.c Log Message: ----------- ArmPkg: Make variables used for GicInterrupt UINTN Although the maximum interrupt ID on GicV2 is 10bit and for GicV3/4 is 24bit, and that the IAR and EOIR registers of the Gic CPU interface are 32 bit; the typedef HARDWARE_INTERRUPT_SOURCE is defined as UINTN in EmbeddedPkg\Include\Protocol\HardwareInterrupt.h Therefore, use UINTN for Gic Interrupt variables and use appropriate typecasts wherever needed. Signed-off-by: Sami Mujawar <sami.muja...@arm.com> Commit: 08a08129ae134e2906e7478037cc2e1ddadad129 https://github.com/tianocore/edk2/commit/08a08129ae134e2906e7478037cc2e1ddadad129 Author: Sami Mujawar <sami.muja...@arm.com> Date: 2023-06-01 (Thu, 01 Jun 2023) Changed paths: M ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Lib.c Log Message: ----------- ArmPkg: Typecast IntID to UINT32 in ArmGicV2EndOfInterrupt The EIOR register of the Gic CPU interface is a 32 bit register. However, the HARDWARE_INTERRUPT_SOURCE used to represent the interrupt source (Interrupt ID) is typedefed as UINTN, see EmbeddedPkg\Include\Protocol\HardwareInterrupt.h Therfore, typecast the interrupt ID (Source) value to UINT32 before setting the EOIR register. Also, add an assert to check that the value does not exceed 32 bits. Signed-off-by: Sami Mujawar <sami.muja...@arm.com> Commit: cfb4a10d76e2ef47438e7fa5b71d5f87d09c3dcd https://github.com/tianocore/edk2/commit/cfb4a10d76e2ef47438e7fa5b71d5f87d09c3dcd Author: Sami Mujawar <sami.muja...@arm.com> Date: 2023-06-01 (Thu, 01 Jun 2023) Changed paths: M ArmPkg/Drivers/ArmGic/ArmGicCommonDxe.c Log Message: ----------- ArmPkg: Remove unused function declarations The IrqInterruptHandler () and ExitBootServicesEvent () function declarations were unused. Therefore, remove these declarations. Signed-off-by: Sami Mujawar <sami.muja...@arm.com> Commit: 8da2b97392f245f3e3f6bb5b1b0d05c670b82bca https://github.com/tianocore/edk2/commit/8da2b97392f245f3e3f6bb5b1b0d05c670b82bca Author: Sami Mujawar <sami.muja...@arm.com> Date: 2023-06-01 (Thu, 01 Jun 2023) Changed paths: M ArmPkg/Drivers/ArmGic/ArmGicLib.c Log Message: ----------- ArmPkg: Prevent SgiId from setting RES0 bits of GICD_SGIR GICD_SGIR is a 32-bit register, of which INTID is bits [3:0] and Bits [14:4] is RES0. Since SgiId parameter in the function ArmGicSendSgiTo () is UINT8, mask unused bits of SgiId before writing to the GICD_SGIR register to prevent accidental setting of the RES0 bits. Signed-off-by: Sami Mujawar <sami.muja...@arm.com> Reviewed-by: Ard Biesheuvel <a...@kernel.org> Commit: 8bcddbcce2fa9eaa2e2e1ee2bb469189f76b7cbd https://github.com/tianocore/edk2/commit/8bcddbcce2fa9eaa2e2e1ee2bb469189f76b7cbd Author: Sami Mujawar <sami.muja...@arm.com> Date: 2023-06-01 (Thu, 01 Jun 2023) Changed paths: M ArmPkg/Drivers/ArmGic/ArmGicLib.c M ArmPkg/Drivers/ArmGic/GicV2/ArmGicV2Dxe.c Log Message: ----------- ArmPkg: Adjust variable type and cast for RegShift & RegOffset According to the GIC architecture version 3 and 4 specification, the maximum number of INTID bits supported in the CPU interface is 24. Considering this the RegShift variable is not required to be more than 8 bits. Therefore, make the RegShift variable type to UINT8. Also add necessary typecasts when calculating the RegOffset and RegShift values. Signed-off-by: Sami Mujawar <sami.muja...@arm.com> Commit: ded1d5414b5a0161de8fcf234b7fb200fb59fb2c https://github.com/tianocore/edk2/commit/ded1d5414b5a0161de8fcf234b7fb200fb59fb2c Author: Sami Mujawar <sami.muja...@arm.com> Date: 2023-06-01 (Thu, 01 Jun 2023) Changed paths: M ArmPkg/Drivers/ArmGic/ArmGicLib.c Log Message: ----------- ArmPkg: Fix ArmGicAcknowledgeInterrupt () for GICv3 The ArmGicAcknowledgeInterrupt () returns the value returned by the Interrupt Acknowledge Register and the InterruptID separately in an out parameter. The function documents the following: 'InterruptId is returned separately from the register value because in the GICv2 the register value contains the CpuId and InterruptId while in the GICv3 the register value is only the InterruptId.' This function skips setting the InterruptId in the out parameter for GICv3. Although the return value from the function is the InterruptId for GICv3, this breaks the function usage model as the caller expects the InterruptId in the out parameter for the function. e.g. The caller may end up using the InterruptID which could potentially be an uninitialised variable value. Therefore, set the InterruptID in the function out parameter for GICv3 as well. Signed-off-by: Sami Mujawar <sami.muja...@arm.com> Reviewed-by: Ard Biesheuvel <a...@kernel.org> Compare: https://github.com/tianocore/edk2/compare/15f83fa36442...ded1d5414b5a _______________________________________________ edk2-commits mailing list edk2-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-commits