Really create a tree for PCI devices (Laurent Vivier)

git-svn-id: svn://coreboot.org/openbios/openbios-devel@362 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2009-01-07 15:43:10 +00:00
parent 4a9d1a7613
commit 2742ea5723
9 changed files with 163 additions and 126 deletions

View File

@@ -44,51 +44,6 @@
; SYSTEM-initializer
\ -------------------------------------------------------------------------
\ device tree fixing
\ -------------------------------------------------------------------------
\ add decode-address methods
: (make-decodable) ( phandle -- )
dup " #address-cells" rot get-package-property 0= if
decode-int nip nip
over " decode-unit" rot find-method if 2drop else
( save phandle ncells )
over active-package!
case
1 of ['] parse-hex " decode-unit" is-xt-func endof
3 of
" bus-range" active-package get-package-property 0= if
decode-int nip nip
['] encode-unit-pci " encode-unit" is-xt-func
" decode-unit" is-func-begin
['] (lit) , ,
['] decode-unit-pci-bus ,
is-func-end
then
endof
endcase
then
then
drop
;
: init-qemu-tree ( -- )
active-package
iterate-tree-begin
begin ?dup while
dup (make-decodable)
iterate-tree
repeat
active-package!
;
\ use the tty interface if available
: activate-tty-interface
" /packages/terminal-emulator" find-dev if drop