aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2016-03-07 13:27:33 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-03-07 14:04:02 +1100
commitfe4bf686b88e25f8b74e3f712dadb8ca3ea133a3 (patch)
tree6c12089bf4b2d8d4ec4dda9824bbe08d40312a15
parentde9f52b7bb8672e52430918c58fbf9dc7cb2e876 (diff)
downloadskiboot-fe4bf686b88e25f8b74e3f712dadb8ca3ea133a3.zip
skiboot-fe4bf686b88e25f8b74e3f712dadb8ca3ea133a3.tar.gz
skiboot-fe4bf686b88e25f8b74e3f712dadb8ca3ea133a3.tar.bz2
init: Save away first 16 bytes of memory
Currently the null branch catcher blows away the first 16 bytes of memory. This patch saves this away in case we need to reinstate them later Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--core/init.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/init.c b/core/init.c
index 1d2f6e0..1d9ef70 100644
--- a/core/init.c
+++ b/core/init.c
@@ -49,6 +49,7 @@ enum proc_gen proc_gen;
static uint64_t kernel_entry;
static bool kernel_32bit;
+static char zero_location[16];
#ifdef SKIBOOT_GCOV
void skiboot_gcov_done(void);
@@ -539,6 +540,7 @@ static void setup_branch_null_catcher(void)
* ABI v1 (ie. big endian). This will be broken if we ever
* move to ABI v2 (ie little endian)
*/
+ memcpy(zero_location, 0, 16); /* Save away in case we need it later */
memcpy(0, bn, 16);
}