Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / openbios / arch / x86 / init.fs
1 include config.fs
2
3 :noname 
4   ."   Type 'help' for detailed information" cr
5   \ ."   boot secondary slave cdrom: " cr
6   \ ."    0 >  boot hd:2,\boot\vmlinuz root=/dev/hda2" cr
7   ; DIAG-initializer
8
9 " /" find-device
10
11 new-device
12   " memory" device-name
13   \ 12230 encode-int " reg" property
14   external
15   : open true ;
16   : close ;
17   \ claim ( phys size align -- base )
18   \ release ( phys size -- )
19 finish-device
20
21 new-device
22   " cpus" device-name
23   1 " #address-cells" int-property
24   0 " #size-cells" int-property
25
26   external
27   : open true ;
28   : close ;
29   : decode-unit parse-hex ;
30
31 finish-device
32
33 : make-openable ( path )
34   find-dev if
35     begin ?dup while
36       \ install trivial open and close methods
37       dup active-package! is-open
38       parent
39     repeat
40   then
41 ;
42
43 : preopen ( chosen-str node-path )
44   2dup make-openable
45     
46   " /chosen" find-device
47   open-dev ?dup if
48     encode-int 2swap property
49   else
50     2drop
51   then
52   device-end
53 ;
54  
55 :noname
56   set-defaults
57 ; SYSTEM-initializer
58
59 \ preopen device nodes (and store the ihandles under /chosen)
60 :noname
61   " memory" " /memory" preopen
62   " mmu" " /cpus/@0" preopen
63   " stdout" " /builtin/console" preopen
64   " stdin" " /builtin/console" preopen
65
66 ; SYSTEM-initializer
67
68 \ use the tty interface if available
69 :noname
70   " /builtin/console" find-dev if drop
71     " /builtin/console" " input-device" $setenv
72     " /builtin/console" " output-device" $setenv
73   then
74 ; SYSTEM-initializer
75             
76 :noname
77   " keyboard" input
78 ; CONSOLE-IN-initializer
79
80 \ Load VGA FCode driver blob
81 [IFDEF] CONFIG_DRIVER_VGA
82   -1 value vga-driver-fcode
83   " QEMU,VGA.bin" $encode-file to vga-driver-fcode
84 [THEN]