mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user