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:
@@ -142,7 +142,6 @@
|
||||
<external-object source="target/arch/ppc/qemu/kernel.o"/>
|
||||
<object source="qemu/main.c" flags="-Iarch/ppc"/>
|
||||
<object source="qemu/methods.c" flags="-Iarch/ppc"/>
|
||||
<object source="qemu/tree.c" flags="-Iarch/ppc"/>
|
||||
<object source="qemu/vfd.c" flags="-Iarch/ppc"/>
|
||||
<object source="qemu/console.c" flags="-Iarch/ppc"/>
|
||||
</library>
|
||||
|
||||
@@ -427,18 +427,6 @@ arch_of_init( void )
|
||||
const struct cpudef *cpu;
|
||||
char buf[64];
|
||||
|
||||
devtree_init();
|
||||
|
||||
/* ISA BASE */
|
||||
|
||||
push_str("/");
|
||||
fword("find-device");
|
||||
|
||||
PUSH(isa_io_base);
|
||||
fword("encode-int");
|
||||
push_str("isa-io-base");
|
||||
fword("property");
|
||||
|
||||
/* memory info */
|
||||
|
||||
push_str("/memory");
|
||||
|
||||
@@ -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