From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by mx.groups.io with SMTP id smtpd.web11.19424.1598536652262066661 for ; Thu, 27 Aug 2020 06:57:32 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=VWBtyHNo; spf=pass (domain: nuviainc.com, ip: 209.85.128.66, mailfrom: leif@nuviainc.com) Received: by mail-wm1-f66.google.com with SMTP id q9so3070431wmj.2 for ; Thu, 27 Aug 2020 06:57:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=WAfmo4dxlpNBopRtgPiHu5ZGejoNT5+n5xR51sILmtY=; b=VWBtyHNocRjNNvlSyS08RU95vzeSXvjzCfZsl0z9YLJ/NufQDCku2ONSQ8KRGUUHhP XBtLMNnH6wvuK0pqkJmE1oD/RzSM61Zgr0JNnCzs/XyV68RHPUaMzpTmrJOq9M3kVrih gXMSuwqdf50RadIrdTVxKTy1RpECflUdKHADL6Vhq8MFgrVYJs94ieChZiZB7jm7x8xg ToSkQocjRNqyux0EUVGjISYAhd6BV46uFiEiAzk87Wuibj9f/2l1UMhmv/24ODrRlwop UDuIb8pNBSBcE+5HSh17PHCwSbvIE8g8UWELcJCtlldrFrQ8UYlUXhWnJ63eTYmy0oId MJ/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=WAfmo4dxlpNBopRtgPiHu5ZGejoNT5+n5xR51sILmtY=; b=OIuVCgSmexaPh58nQGF7jVMIIyKJt1kGilEu0yo+K+/5/xHR0ZFo3/3c591OL/k/0/ O1Y5HHjZe8k9rxs8Du7dqpa4mZgQs91gWfzkEx7w7BPARAJP2NIwKB0wUnoFGDS3w4VK pHDVle/GFaVmh+dk7mDZ5pnnFT/tHei19///ZzxAV04sR6Hu5E+XBnUktjkszU4VezK9 REeIo6eQSkv46hNOCmBS+l6HZBQ985HdiuS72jj0/bLymQVN+yd0SEXd3v86RE2kvPu+ hD1A0ZNrc/iabUX5blgRl9hSqJbNInFg7AI44tLuw/dnde3qAdYN2z4fgJO8F19jrnhD TrLg== X-Gm-Message-State: AOAM531FaA294xkghLRXdAeCXvQ0BpKTtDRH/p5Y7sjN+A7RbrJy9ztb N/ZhTrHff9wHDdOq76eLeYYphg== X-Google-Smtp-Source: ABdhPJzlXh62/aChrIJli3iYtW20NRW7zatiduFjrefqlWEJq/Nciv35YSGVhYXQEcSQ6B0zEtFbWA== X-Received: by 2002:a7b:c15a:: with SMTP id z26mr11733727wmi.35.1598536650585; Thu, 27 Aug 2020 06:57:30 -0700 (PDT) Return-Path: Received: from vanye ([2001:470:1f09:12f0:b26e:bfff:fea9:f1b8]) by smtp.gmail.com with ESMTPSA id 5sm5439351wmg.32.2020.08.27.06.57.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Aug 2020 06:57:29 -0700 (PDT) Date: Thu, 27 Aug 2020 14:57:26 +0100 From: "Leif Lindholm" To: Graeme Gregory Cc: devel@edk2.groups.io, tanmay.jagdale@linaro.org Subject: Re: [edk2-plaforms PATCH 1/1] SbsaQemu: Fix CPUID generation in SSDT Message-ID: <20200827135726.GW1191@vanye> References: <20200827131715.234476-1-graeme@nuviainc.com> MIME-Version: 1.0 In-Reply-To: <20200827131715.234476-1-graeme@nuviainc.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > --- > 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 >