1 \ *****************************************************************************
2 \ * Copyright (c) 2012 IBM Corporation
3 \ * All rights reserved.
4 \ * This program and the accompanying materials
5 \ * are made available under the terms of the BSD License
6 \ * which accompanies this distribution, and is available at
7 \ * http://www.opensource.org/licenses/bsd-license.php
10 \ * IBM Corporation - initial implementation
11 \ ****************************************************************************/
13 ." Populating " pwd cr
15 0 VALUE my-nvram-fetch
16 0 VALUE my-nvram-store
23 : write ( adr len -- actual )
27 : read ( adr len -- actual )
32 " nvram" find-alias 0= IF
33 " nvram" get-node node>path set-alias
39 " #bytes" get-node get-package-property 0= IF
40 decode-int to my-nvram-size 2drop
41 " nvram-fetch" rtas-get-token to my-nvram-fetch
42 " nvram-store" rtas-get-token to my-nvram-store
43 my-nvram-size to nvram-size
44 nvram-size alloc-mem to nvram-addr
45 my-nvram-fetch my-nvram-store nvram-size nvram-addr internal-nvram-init