On Thu, 28 Nov 2019 at 14:40, Leif Lindholm <leif.lindh...@linaro.org> wrote: > > On Thu, Nov 28, 2019 at 14:39:23 +0100, Ard Biesheuvel wrote: > > On Thu, 28 Nov 2019 at 14:37, Leif Lindholm <leif.lindh...@linaro.org> > > wrote: > > > > > > On Wed, Nov 27, 2019 at 19:44:38 +0100, Ard Biesheuvel wrote: > > > > Use the more precise Cortex-A57 based compatible strings to describe > > > > the CPUs and the PMUs in the device tree. > > > > > > > > Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> > > > > --- > > > > Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c | 4 ++-- > > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > > > diff --git > > > > a/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c > > > > b/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c > > > > index e723e77c7965..091d151ac722 100644 > > > > --- a/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c > > > > +++ b/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c > > > > @@ -405,7 +405,7 @@ PrepareFdt ( > > > > ArmCoreInfoTable[Index].CoreId); > > > > MpId = cpu_to_fdt64 (MpId); > > > > fdt_setprop (Fdt, CpuNode, "reg", &MpId, sizeof (MpId)); > > > > - fdt_setprop_string (Fdt, CpuNode, "compatible", "arm,armv8"); > > > > + fdt_setprop_string (Fdt, CpuNode, "compatible", "arm,cortex-a57"); > > > > fdt_setprop_string (Fdt, CpuNode, "device_type", "cpu"); > > > > > > > > fdt_setprop_cell (Fdt, CpuNode, "i-cache-size", 3 * SIZE_16KB); > > > > @@ -474,7 +474,7 @@ PrepareFdt ( > > > > // Create /pmu node > > > > PmuNode = fdt_add_subnode(Fdt, 0, "pmu"); > > > > if (PmuNode >= 0) { > > > > - fdt_setprop_string (Fdt, PmuNode, "compatible", "arm,armv8-pmuv3"); > > > > + fdt_setprop_string (Fdt, PmuNode, "compatible", > > > > "arm,cortex-a57-pmu"); > > > > > > Since we've always only published "arm,armv8-pmuv3" before, is it > > > worth keeping that around as a secondary compatible string rather > > > than replacing it outright? > > > > Yeah, good point. I'll change that. > > Thanks. With that: > Reviewed-by: Leif Lindholm <leif.lindh...@linaro.org>
Cheers. For the record, I'll need to apply the following on top: --- a/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c +++ b/Silicon/AMD/Styx/Library/StyxDtbLoaderLib/StyxDtbLoaderLib.c @@ -281,6 +281,8 @@ SetXgbeStatus ( } } +STATIC CONST CHAR8 mCpuCompatible[] = "arm,cortex-a57\0arm,armv8"; +STATIC CONST CHAR8 mPmuCompatible[] = "arm,cortex-a57-pmu\0arm,armv8-pmuv3"; STATIC EFI_STATUS @@ -405,7 +407,8 @@ PrepareFdt ( ArmCoreInfoTable[Index].CoreId); MpId = cpu_to_fdt64 (MpId); fdt_setprop (Fdt, CpuNode, "reg", &MpId, sizeof (MpId)); - fdt_setprop_string (Fdt, CpuNode, "compatible", "arm,cortex-a57"); + fdt_setprop (Fdt, CpuNode, "compatible", mCpuCompatible, + sizeof (mCpuCompatible)); fdt_setprop_string (Fdt, CpuNode, "device_type", "cpu"); fdt_setprop_cell (Fdt, CpuNode, "i-cache-size", 3 * SIZE_16KB); @@ -474,7 +477,8 @@ PrepareFdt ( // Create /pmu node PmuNode = fdt_add_subnode(Fdt, 0, "pmu"); if (PmuNode >= 0) { - fdt_setprop_string (Fdt, PmuNode, "compatible", "arm,cortex-a57-pmu"); + fdt_setprop (Fdt, PmuNode, "compatible", mPmuCompatible, + sizeof (mPmuCompatible)); // append PMU interrupts for (Index = 0; Index < ArmCoreCount; Index++) { -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#51471): https://edk2.groups.io/g/devel/message/51471 Mute This Topic: https://groups.io/mt/62737049/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-