Skip to content

Commit

Permalink
mem-map: Setup memory for MDDT table
Browse files Browse the repository at this point in the history
Each entry in MDST and MDDT takes 16 bytes. With 1K we can have upto 64
entries. This is sufficient to support OPAL MPIPL (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>
[oliver: rebased]
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
  • Loading branch information
Vasant Hegde authored and oohal committed Aug 15, 2019
1 parent 0b66781 commit f10e629
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 6 additions & 2 deletions include/mem-map.h
Expand Up @@ -36,12 +36,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)
Expand Down
7 changes: 5 additions & 2 deletions skiboot.lds.S
@@ -1,7 +1,5 @@
// SPDX-License-Identifier: Apache-2.0
/*
* Skiboot linker script
*
* Copyright 2013-2019 IBM Corp.
*/

Expand Down Expand Up @@ -81,6 +79,11 @@ SECTIONS
KEEP(*(.mdst.data))
}

. = MDDT_TABLE_OFF;
.mddt : {
KEEP(*(.mddt.data))
}

. = CPU_CTL_OFF;
.cpuctrl : {
KEEP(*(.cpuctrl.data))
Expand Down

0 comments on commit f10e629

Please sign in to comment.