]> git.proxmox.com Git - mirror_edk2.git/commit
ArmPkg/ArmScmiDxe: Fix ASSERT error in SCMI DXE
authorGirish Pathak <girish.pathak@arm.com>
Tue, 19 Jun 2018 13:53:52 +0000 (14:53 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 22 Jun 2018 06:21:30 +0000 (08:21 +0200)
commit889cf68c3cd67617e274526822e553bfb07cd231
tree77c841d775bf227763ea1e5fc245bae8556b68da
parent09ef8e92580caddc24f8f1db6ea0e8223890085f
ArmPkg/ArmScmiDxe: Fix ASSERT error in SCMI DXE

This change fixes a bug in the SCMI DXE which is observed with the
upcoming release of the SCP firmware.

The PROTOCOL_ID_MASK (0xF) which is used to generate an index in
the ProtocolInitFxns is wrong because protocol ids can be
anywhere in 0x10 - 15 or 0x80 - FF range. This mask generates
the same index for two different protocols e.g. for protocol ids
0x10 and 0x90, which causes duplicate initialization of a protocol
resulting in a failure.

This change removes the use of PROTOCOL_ID_MASK and instead
uses a list of protocol ids and their initialization functions
to identify a supported protocol and initialize it.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Girish Pathak <girish.pathak@arm.com>
Tested-by: Sudeep Holla <sudeep.holla@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
ArmPkg/Drivers/ArmScmiDxe/ScmiDxe.c
ArmPkg/Drivers/ArmScmiDxe/ScmiDxe.h