From: "Pete Batard" <pete@akeo.ie>
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 [thread overview]
Message-ID: <20200327103455.2788-1-pete@akeo.ie> (raw)
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 <pete@akeo.ie>
---
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
next reply other threads:[~2020-03-27 10:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-27 10:34 Pete Batard [this message]
2020-03-30 14:53 ` [edk2-platforms][PATCH 1/1] Platform/RPi/AcpiTables: Move PPTT constants to the alsc source Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200327103455.2788-1-pete@akeo.ie \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox