]> git.proxmox.com Git - mirror_edk2.git/commitdiff
DynamicTablesPkg: Fix Boot arch flag width
authorSami Mujawar <sami.mujawar@arm.com>
Tue, 9 Jul 2019 14:04:45 +0000 (15:04 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sun, 29 Mar 2020 16:53:35 +0000 (16:53 +0000)
The ArmBootArch field of the FADT table is 16-bit wide. The
VS2017 compiler reports 'warning C4244: '=': conversion from
'UINT32' to 'UINT16', possible loss of data' when assigning the
CM_ARM_BOOT_ARCH_INFO.BootArchFlags value as the width of this
field in CM_ARM_BOOT_ARCH_INFO is 32-bit wide.

To fix this warning, update the CM_ARM_BOOT_ARCH_INFO struct
to make the  BootArchFlags field 16-bit wide. This also makes
it compatible with the ACPI FADT specification.

Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
DynamicTablesPkg/Include/ArmNameSpaceObjects.h

index 2874938b663c33edf5bdaac9f41495f75abfc945..2f326960313c1d7658029205e5cb09b89b0cdd88 100644 (file)
@@ -68,7 +68,7 @@ typedef struct CmArmBootArchInfo {
   /** This is the ARM_BOOT_ARCH flags field of the FADT Table\r
       described in the ACPI Table Specification.\r
   */\r
-  UINT32  BootArchFlags;\r
+  UINT16  BootArchFlags;\r
 } CM_ARM_BOOT_ARCH_INFO;\r
 \r
 /** A structure that describes the\r