aboutsummaryrefslogtreecommitdiff
path: root/lib/libnvram/libnvram.code
diff options
context:
space:
mode:
authorNikunj A. Dadhania <nikunj@linux.vnet.ibm.com>2012-10-16 11:49:51 +0530
committerDavid Gibson <david@gibson.dropbear.id.au>2012-10-17 16:30:58 +1100
commit0ad10f26c94a86a0c9c3970e53f9a9f6a744055d (patch)
tree40b0d9d2ba55512071a9e713bd2db55b84a65ef6 /lib/libnvram/libnvram.code
parent7000cbc4e14aa891adbfdcc07b157e8c9ebb026c (diff)
downloadSLOF-7300f65741f1eae7787b1b712f8fa08aa7b6762a.zip
SLOF-7300f65741f1eae7787b1b712f8fa08aa7b6762a.tar.gz
SLOF-7300f65741f1eae7787b1b712f8fa08aa7b6762a.tar.bz2
SLOF: Support PAPR NVRAM RTAS callsqemu-slof-20121018
BenH still need to ACK this though. From: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com> * Determines size of the flash using device tree. * Provides nvram access functions for RTAS_NVRAM * Allocates temporary buffer of nvram in SLOF code and use that in C. (sbrk not available) * NVRAM_LENGTH is used at various places, make sure it is well guarded and also use dynamically determined size once an RTAS-NVRAM is found. * Use NVRAM_LENGTH as a variable in case of RTAS_NVRAM, not very elegant though Signed-off-by: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com> -- Changelog from v1: * #define cleanups suggested by Thomas/Benh * Fix makefile which missed passing $FLAG for building llfw * renamed vio-nvram.fs as rtas-nvram.fs
Diffstat (limited to 'lib/libnvram/libnvram.code')
-rw-r--r--lib/libnvram/libnvram.code10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/libnvram/libnvram.code b/lib/libnvram/libnvram.code
index f1fd414..723941d 100644
--- a/lib/libnvram/libnvram.code
+++ b/lib/libnvram/libnvram.code
@@ -276,4 +276,12 @@ PRIM(delete_X2d_nvram_X2d_partition)
MIRP
-
+// ( fetch_token store_token size nvram-addr -- )
+PRIM(internal_X2d_nvram_X2d_init)
+ void *nvram_addr = TOS.a; POP;
+ uint32_t nvram_size = TOS.u; POP;
+ uint32_t store_token = TOS.u; POP;
+ long fetch_token = TOS.u; POP;
+
+ nvram_init(fetch_token, store_token, nvram_size, nvram_addr);
+MIRP