aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/console.c2
-rw-r--r--core/fast-reboot.c6
-rw-r--r--core/init.c6
-rw-r--r--core/opal-dump.c7
4 files changed, 14 insertions, 7 deletions
diff --git a/core/console.c b/core/console.c
index 2a15090..374ee03 100644
--- a/core/console.c
+++ b/core/console.c
@@ -15,7 +15,7 @@
#include <processor.h>
#include <cpu.h>
-static char *con_buf = (char *)INMEM_CON_START;
+static char *skiboot_constant_addr con_buf = (char *)INMEM_CON_START;
static size_t con_in;
static size_t con_out;
static bool con_wrapped;
diff --git a/core/fast-reboot.c b/core/fast-reboot.c
index fedfa88..6f6ef3a 100644
--- a/core/fast-reboot.c
+++ b/core/fast-reboot.c
@@ -307,6 +307,8 @@ void __noreturn fast_reboot_entry(void);
void __noreturn fast_reboot_entry(void)
{
struct cpu_thread *cpu = this_cpu();
+ void *skiboot_constant_addr kerneal_load_base_addr = KERNEL_LOAD_BASE;
+ void *skiboot_constant_addr initramfs_load_base_addr = INITRAMFS_LOAD_BASE;
if (proc_gen == proc_gen_p8) {
/* We reset our ICP first ! Otherwise we might get stray
@@ -425,8 +427,8 @@ void __noreturn fast_reboot_entry(void)
* Mambo may have embedded payload here, so don't clear
* it at all.
*/
- memset(KERNEL_LOAD_BASE, 0, KERNEL_LOAD_SIZE);
- memset(INITRAMFS_LOAD_BASE, 0, INITRAMFS_LOAD_SIZE);
+ memset(kerneal_load_base_addr, 0, KERNEL_LOAD_SIZE);
+ memset(initramfs_load_base_addr, 0, INITRAMFS_LOAD_SIZE);
}
/* Start preloading kernel and ramdisk */
diff --git a/core/init.c b/core/init.c
index b4d3351..a1fd5f2 100644
--- a/core/init.c
+++ b/core/init.c
@@ -869,7 +869,11 @@ void copy_exception_vectors(void)
* this is the boot flag used by CPUs still potentially entering
* skiboot.
*/
- memcpy((void *)0x100, (void *)(SKIBOOT_BASE + 0x100),
+ void *skiboot_constant_addr exception_vectors_start_addr = (void *)(SKIBOOT_BASE + 0x100);
+ void *skiboot_constant_addr dst = (void *)0x100;
+
+
+ memcpy(dst, exception_vectors_start_addr,
EXCEPTION_VECTORS_END - 0x100);
sync_icache();
}
diff --git a/core/opal-dump.c b/core/opal-dump.c
index 4f54a3e..577a906 100644
--- a/core/opal-dump.c
+++ b/core/opal-dump.c
@@ -301,6 +301,7 @@ static int64_t opal_mpipl_update(enum opal_mpipl_ops ops,
u64 src, u64 dest, u64 size)
{
int rc;
+ void *skiboot_constant_addr mdrt_table_base_addr = (void *) MDRT_TABLE_BASE;
switch (ops) {
case OPAL_MPIPL_ADD_RANGE:
@@ -330,7 +331,7 @@ static int64_t opal_mpipl_update(enum opal_mpipl_ops ops,
free(opal_mpipl_cpu_data);
opal_mpipl_cpu_data = NULL;
/* Clear MDRT table */
- memset((void *)MDRT_TABLE_BASE, 0, MDRT_TABLE_SIZE);
+ memset(mdrt_table_base_addr, 0, MDRT_TABLE_SIZE);
/* Set MDRT count to max allocated count */
ntuple_mdrt->act_cnt = cpu_to_be16(MDRT_TABLE_SIZE / sizeof(struct mdrt_table));
rc = OPAL_SUCCESS;
@@ -529,8 +530,8 @@ bool is_mpipl_enabled(void)
void opal_mpipl_init(void)
{
- void *mdst_base = (void *)MDST_TABLE_BASE;
- void *mddt_base = (void *)MDDT_TABLE_BASE;
+ void *skiboot_constant_addr mdst_base = (void *)MDST_TABLE_BASE;
+ void *skiboot_constant_addr mddt_base = (void *)MDDT_TABLE_BASE;
struct dt_node *dump_node;
dump_node = dt_find_by_path(opal_node, "dump");