From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by mx.groups.io with SMTP id smtpd.web11.51887.1585580027464714483 for ; Mon, 30 Mar 2020 07:53:47 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=PcSCDMoR; spf=pass (domain: linaro.org, ip: 209.85.221.66, mailfrom: ard.biesheuvel@linaro.org) Received: by mail-wr1-f66.google.com with SMTP id t7so21984220wrw.12 for ; Mon, 30 Mar 2020 07:53:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uVgGEHFTkv83YU88Ol1Kgj4ljk0aM/YWJQeMckxYbZg=; b=PcSCDMoRCvNtRNJlZGE9j+OyvoENw2C8tKcDaqrxLzbhIuPRdN8BjhGS5InmPhauy9 ctn3MiipUmEnKEffEdZbNIhSYDjX3SjWmDqLoxA2/FuqMvJczVytirqYaWsxq6Hkp8Ce 1Yg8GIVWcYfXCMPLzSONp00UUq9d7OMIzMjfUHz/D7H2LBkoUBlem1Dxnmtpz0wrXphh kiMZ28goTDlNLoUaoiyjs6U02Onb90sb7/GMntIeWjdslfdaWda7CqTmgpn2vviTzTe0 XH97mBAyRjMGcjm9NXX7kzKf5xaOWQrFIJJF21dFki3HYCLZoJdL6lP7/RTChVUeSJts f8Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uVgGEHFTkv83YU88Ol1Kgj4ljk0aM/YWJQeMckxYbZg=; b=raTXtV7iWJltTyyvKp59KVTnKVxKqJmWosGUGR/KChTx2ovUZgwQrDLlA0Ls7iAFgG 1/5XyqrsCCGqz7kDnzhculJtalbTjPell6OYJtqBymWcvVT7a2I7D8Z3ei+CmwsnWg05 k4E9Yh5+b17OUTLGuRcuW2cMkpiL6yUxf+yWfMKXWCR3D5ycJzsfWtpI9zhQK9Cn18tU SQ0MpOeu2WKf1EtBpWzXYNXIn8WVU1bYYnrFXXIVxztyOreZzXi87i94QfnbE63Cz++6 CtJrl4NMQoq/ZxUdkuzPV3E8xAT4dxv+qj4FUECL9AnmUZu1h89QLAnixuMHfTKPn1gz VrkQ== X-Gm-Message-State: ANhLgQ0szJEPCEzRE85aDIYHJbJt+yu5c6jO2lY0rEZCoJQI2N6Mh+1g uKYqwAzPUp4Mbk3wNAVEIvDA2lOPls80LdnjYFYG1Q== X-Google-Smtp-Source: ADFU+vulbHMdRcMiZ4G3BwWVIp5FNuM0C+DJ3IJhLU/AqoBu8GjBBuadJIIJc6bGZV3t/ywO9YGXP2DnD2xqNezlLnY= X-Received: by 2002:adf:fdc6:: with SMTP id i6mr15602689wrs.252.1585580026011; Mon, 30 Mar 2020 07:53:46 -0700 (PDT) MIME-Version: 1.0 References: <20200327103455.2788-1-pete@akeo.ie> In-Reply-To: <20200327103455.2788-1-pete@akeo.ie> From: "Ard Biesheuvel" Date: Mon, 30 Mar 2020 16:53:35 +0200 Message-ID: Subject: Re: [edk2-platforms][PATCH 1/1] Platform/RPi/AcpiTables: Move PPTT constants to the alsc source To: Pete Batard Cc: edk2-devel-groups-io , Leif Lindholm , =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= Content-Type: text/plain; charset="UTF-8" On Fri, 27 Mar 2020 at 11:35, Pete Batard wrote: > > There's no real reason to have the PPTT constants factorized in > AcpiTables.h, and hiding them away with the interrupts is only > going to end up being counter-productive for folks trying to > understand or maintain the code. > > Move these sections to Pptt.aslc where they belong. > > Signed-off-by: Pete Batard Reviewed-by: Ard Biesheuvel Pushed as cdd63d10d5efaeec1cd5fa5f11a8353e4de832d7 > --- > Platform/RaspberryPi/AcpiTables/AcpiTables.h | 18 ---------------- > Platform/RaspberryPi/AcpiTables/Pptt.aslc | 22 ++++++++++++++++++++ > 2 files changed, 22 insertions(+), 18 deletions(-) > > diff --git a/Platform/RaspberryPi/AcpiTables/AcpiTables.h b/Platform/RaspberryPi/AcpiTables/AcpiTables.h > index 9ee202255939..dfae763d8107 100644 > --- a/Platform/RaspberryPi/AcpiTables/AcpiTables.h > +++ b/Platform/RaspberryPi/AcpiTables/AcpiTables.h > @@ -136,15 +136,6 @@ typedef struct > #define BCM2836_MMCHS1_INTERRUPT 0x5E > #define BCM2836_MINI_UART_INTERRUPT 0x3D > #define BCM2836_PL011_UART_INTERRUPT 0x59 > -#define CORTEX_L1D_SIZE SIZE_16KB > -#define CORTEX_L1D_SETS 64 > -#define CORTEX_L1D_ASSC 4 > -#define CORTEX_L1I_SIZE SIZE_16KB > -#define CORTEX_L1I_SETS 128 > -#define CORTEX_L1I_ASSC 2 > -#define CORTEX_L2_SIZE SIZE_512KB > -#define CORTEX_L2_SETS 512 > -#define CORTEX_L2_ASSC 16 > #elif (RPI_MODEL == 4) > #define BCM2836_V3D_BUS_INTERRUPT 0x2A > #define BCM2836_DMA_INTERRUPT 0x3B > @@ -172,15 +163,6 @@ typedef struct > #define BCM2836_PL011_UART_INTERRUPT 0x99 > #define GENET_INTERRUPT0 0xBD > #define GENET_INTERRUPT1 0xBE > -#define CORTEX_L1D_SIZE SIZE_32KB > -#define CORTEX_L1D_SETS 256 > -#define CORTEX_L1D_ASSC 2 > -#define CORTEX_L1I_SIZE (3*SIZE_16KB) > -#define CORTEX_L1I_SETS 256 > -#define CORTEX_L1I_ASSC 3 > -#define CORTEX_L2_SIZE SIZE_1MB > -#define CORTEX_L2_SETS 1024 > -#define CORTEX_L2_ASSC 16 > #endif > > #endif // __ACPITABLES_H__ > diff --git a/Platform/RaspberryPi/AcpiTables/Pptt.aslc b/Platform/RaspberryPi/AcpiTables/Pptt.aslc > index bc09e5fdaee4..a52bc5a31adf 100644 > --- a/Platform/RaspberryPi/AcpiTables/Pptt.aslc > +++ b/Platform/RaspberryPi/AcpiTables/Pptt.aslc > @@ -15,6 +15,28 @@ > #define NUM_CORES 4 > #define NUM_CLUSTERS 1 > > +#if (RPI_MODEL == 3) > +#define CORTEX_L1D_SIZE SIZE_16KB > +#define CORTEX_L1D_SETS 64 > +#define CORTEX_L1D_ASSC 4 > +#define CORTEX_L1I_SIZE SIZE_16KB > +#define CORTEX_L1I_SETS 128 > +#define CORTEX_L1I_ASSC 2 > +#define CORTEX_L2_SIZE SIZE_512KB > +#define CORTEX_L2_SETS 512 > +#define CORTEX_L2_ASSC 16 > +#elif (RPI_MODEL == 4) > +#define CORTEX_L1D_SIZE SIZE_32KB > +#define CORTEX_L1D_SETS 256 > +#define CORTEX_L1D_ASSC 2 > +#define CORTEX_L1I_SIZE (3*SIZE_16KB) > +#define CORTEX_L1I_SETS 256 > +#define CORTEX_L1I_ASSC 3 > +#define CORTEX_L2_SIZE SIZE_1MB > +#define CORTEX_L2_SETS 1024 > +#define CORTEX_L2_ASSC 16 > +#endif > + > #define FIELD_OFFSET(type, name) __builtin_offsetof(type, name) > > #pragma pack(1) > -- > 2.21.0.windows.1 >