From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) by mx.groups.io with SMTP id smtpd.web11.8490.1585305309072531481 for ; Fri, 27 Mar 2020 03:35:09 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=HssJwoaV; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.208.54, mailfrom: pete@akeo.ie) Received: by mail-ed1-f54.google.com with SMTP id a20so10489204edj.2 for ; Fri, 27 Mar 2020 03:35:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=FRtzvhCosIY+SbP7OqIXCcaSkJobWIgWrUbvY9rsKLk=; b=HssJwoaVI4bQinrE+R1tc7keE/cCOY2zBk9UbfnuYXTEoJ2QX/63epErQ4j6X6T13G 6M5LF6Ujzcsiz1JTxTAiIIdtPEy93N5xhsXo99gJ/DdohMOI2KOdN04mwhmKaj889pJc N+ST2Yi/kCUKquP+KTlt9lYULOgVQWjTKwe0AWQYV2Mx2SVCIn7Ckfas3zUiaSWNorU1 YbkKeEPIGe6TKrgQ5a5VlskWZXDJCxt+wd9SsST9HknZPpN0omgA4bPTeM3Gcmi83HMI TMXKTKRUd6myoD2n1Op++sYeIyjOe4Y/TePzBbcHBvirIRmO8+ijVJ6RJENjZ9b/58n5 fGuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=FRtzvhCosIY+SbP7OqIXCcaSkJobWIgWrUbvY9rsKLk=; b=SfOrVgWK0oLGvDQjeKw5ODIIkcck5MWRBcBECxSgdZVZoROZNw/QVouBXcK1QOwZJM Pe5hg0lru/ks7vm0nsTOCNeTufl+KWSq26H2zO9ER8y3oZHx9DUaFLxRjT4M0MBgzsUi Symc9PuDB194ye7QzGEmAnRRcyHSwBLOj4toh5ChOB1jWO78+AYY7k7nvDil7F0vUbcx B96rm6jNVEHCeG2xlCu+U6T+8x/I5wcpHXDrgk+/fX8MqWXyF/9ldLZncLlBuhizlLHT VaiYDRcWxdeUmN5jg8ayBG4n5Gj5t10G1yqzfmijsI1bQK51HYoJML6+8eHM8vjXPYlw Upew== X-Gm-Message-State: ANhLgQ2QRRR5yT92s6zPotulcPGJYHM7HtrcGPGnVua+z2xf7b3RkXRH R9nyxHNnaCT11681ZbdNoy42viG04ctWrw== X-Google-Smtp-Source: ADFU+vvYZXQQCNFd7wEhXhG3ET6wPVKervxRpKZknxqQ3eOlL6MlvfqiMAlibifEm3BEXslzFK7mTg== X-Received: by 2002:a17:906:951:: with SMTP id j17mr12225593ejd.33.1585305307189; Fri, 27 Mar 2020 03:35:07 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([84.203.78.33]) by smtp.gmail.com with ESMTPSA id gs12sm676454ejb.86.2020.03.27.03.35.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Mar 2020 03:35:06 -0700 (PDT) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif@nuviainc.com, philmd@redhat.com Subject: [edk2-platforms][PATCH 1/1] Platform/RPi/AcpiTables: Move PPTT constants to the alsc source Date: Fri, 27 Mar 2020 10:34:55 +0000 Message-Id: <20200327103455.2788-1-pete@akeo.ie> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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