On Thu, Aug 27, 2020 at 14:17:15 +0100, Graeme Gregory wrote:
> The SBSAQEMU_ACPI_ITOA contains a typo that puts invalid characters in
> the ASL for any number of CPUs > 10.
Whoops.
However, looking at where this is actually used, in SbsaQemuAcpiDxe.c,
that looks like an accident waiting to happen.
Could you possibly rewrite it using PrintLib AsciiSPrint, and drop
this macro?
/
Leif
> Signed-off-by: Graeme Gregory <[email protected]>
> ---
> Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h
> b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h
> index 1a7d9dda2b99..0f79d8a9c3c8 100644
> --- a/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h
> +++ b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuAcpi.h
> @@ -51,7 +51,7 @@
> #define SBSAQEMU_ACPI_CPU_DEV_NAME { 'C', '0', '0', '0' }
>
> // Macro to convert Integer to Character
> -#define SBSAQEMU_ACPI_ITOA(Byte) (0x30 + (Byte > 9 ? (Byte + 1) :
> Byte))
> +#define SBSAQEMU_ACPI_ITOA(Byte) (0x30 + (Byte > 9 ? (Byte + 7) :
> Byte))
>
> #define SBSAQEMU_ACPI_CPU_HID {
> \
> AML_NAME_OP, AML_NAME_CHAR__, 'H', 'I', 'D',
> \
> --
> 2.25.1
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#64688): https://edk2.groups.io/g/devel/message/64688
Mute This Topic: https://groups.io/mt/76451015/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-