Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / obp / obp / pkg / confvar / loadcvar.fth
CommitLineData
920dae64
AT
1\ ========== Copyright Header Begin ==========================================
2\
3\ Hypervisor Software File: loadcvar.fth
4\
5\ Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
6\
7\ - Do no alter or remove copyright notices
8\
9\ - Redistribution and use of this software in source and binary forms, with
10\ or without modification, are permitted provided that the following
11\ conditions are met:
12\
13\ - Redistribution of source code must retain the above copyright notice,
14\ this list of conditions and the following disclaimer.
15\
16\ - Redistribution in binary form must reproduce the above copyright notice,
17\ this list of conditions and the following disclaimer in the
18\ documentation and/or other materials provided with the distribution.
19\
20\ Neither the name of Sun Microsystems, Inc. or the names of contributors
21\ may be used to endorse or promote products derived from this software
22\ without specific prior written permission.
23\
24\ This software is provided "AS IS," without a warranty of any kind.
25\ ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
26\ INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
27\ PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN
28\ MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR
29\ ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
30\ DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN
31\ OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR
32\ FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
33\ DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY,
34\ ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF
35\ SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
36\
37\ You acknowledge that this software is not designed, licensed or
38\ intended for use in the design, construction, operation or maintenance of
39\ any nuclear facility.
40\
41\ ========== Copyright Header End ============================================
42id: @(#)loadcvar.fth 1.13 06/02/07
43purpose: Load file for configuration variable manager
44copyright: Copyright 2006 Sun Microsystems, Inc. All Rights Reserved
45copyright: Use is subject to license terms.
46
47\ Load file for NVRAM configuration option management
48headers
49transient
50
51\ These words control which of the internal functions from the
52\ nvdevice vocabulary we export.
53\
54\ exported-headers - executable at the OK prompt
55\ exported-headerless - callable from forth code at compile time.
56\ unexported-words - headerless and private to the nvdevice.
57\
580 value exporting-routines?
59
60: exported-headers
61 exporting-routines? 0= if
62 also forth definitions
63 true to exporting-routines?
64 then
65 headers
66; immediate
67
68: unexported-words
69 exporting-routines? if
70 previous definitions
71 false to exporting-routines?
72 then
73 headerless
74; immediate
75
76: exported-headerless
77 exporting-routines? 0= if
78 also forth definitions
79 true to exporting-routines?
80 then
81 headerless
82; immediate
83
84\ general debug
85alias \nvdebug \
86\ alias \nvdebug noop
87\nvdebug [message] XXX nvdebug is enabled
88
89\ The garbage collector.
90alias \nvdebug1 \
91\ alias \nvdebug1 noop
92\nvdebug1 [message] XXX nvdebug (garbage collector) is enabled
93
94resident headers
95
96vocabulary nvdevice
97
98headerless
99vocabulary nvhash-keys
100also nvdevice definitions
101
102unexported-words
103
104fload ${BP}/pkg/confvar/access.fth
105fload ${BP}/pkg/confvar/confact.fth \ Action names
106
107: (set-defaults) ( -- )
108 0 ['] options ( alf voc-acf )
109 begin another-word? while ( alf' voc-acf anf )
110 dup name>string " name" $= if
111 drop
112 else
113 name> do-set-default
114 then
115 repeat ( )
116;
117
118fload ${BP}/pkg/confvar/hashdevice.fth
119
120fload ${BP}/pkg/confvar/accesstypes.fth
121fload ${BP}/pkg/confvar/fixed-access.fth
122
123fload ${BP}/pkg/confvar/nvdevice.fth
124
125context token@ ' nvdevice <> exporting-routines? or if
126 true abort" ERROR: vocabulary ordering is broken in the NVRAM package" cr
127then
128
129previous definitions
130
131fload ${BP}/pkg/confvar/attach.fth