[v4,04/18] hdata: Setup memory for MDDT table

Message ID 20180703061727.8789-5-hegdevasant@linux.vnet.ibm.com
State New
Headers show
Series
  • MPIPL support
Related show

Commit Message

Vasant Hegde July 3, 2018, 6:17 a.m.
Each entry in MDST and MDDT takes 16 bytes. With 1K we can have upto 64 entries.
This is sufficient to support memory preserving IPL.

Presently OPAL reserves 2K memory for MDST table. Lets split this into two
region of 1K for MDST and MDDT table.

Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
 include/mem-map.h | 8 ++++++--
 skiboot.lds.S     | 5 +++++
 2 files changed, 11 insertions(+), 2 deletions(-)

Patch

diff --git a/include/mem-map.h b/include/mem-map.h
index 3e30d9b76..98f781cc5 100644
--- a/include/mem-map.h
+++ b/include/mem-map.h
@@ -49,12 +49,16 @@ 
  */
 #define PROCIN_OFF		(SPIRA_OFF + 0x800)
 
-/* Initial MDST table like PROCIN, we need fixed addresses,
+/* Initial MDST and MDDT tables like PROCIN, we need fixed addresses,
  * we leave a 2k gap for PROCIN
  */
 #define MDST_TABLE_OFF		(SPIRA_OFF + 0x1000)
+#define MDST_TABLE_SIZE		0x400
 
-/* Like MDST, we need fixed address for CPU control header.
+#define MDDT_TABLE_OFF		(SPIRA_OFF + 0x1400)
+#define MDDT_TABLE_SIZE		0x400
+
+/* Like MDST and MDDT, we need fixed address for CPU control header.
  * We leave a 2k gap for MDST. CPU_CTL table is of size ~4k
  */
 #define CPU_CTL_OFF             (SPIRA_OFF + 0x1800)
diff --git a/skiboot.lds.S b/skiboot.lds.S
index a6e71077c..bc134fd41 100644
--- a/skiboot.lds.S
+++ b/skiboot.lds.S
@@ -46,6 +46,11 @@  SECTIONS
 		KEEP(*(.mdst.data))
 	}
 
+	. = MDDT_TABLE_OFF;
+	.mddt : {
+		KEEP(*(.mddt.data))
+	}
+
 	. = CPU_CTL_OFF;
 	.cpuctrl : {
 		KEEP(*(.cpuctrl.data))