X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=qemu%2Froms%2Fopenbios%2Farch%2Fppc%2Fqemu%2Ftree.fs;fp=qemu%2Froms%2Fopenbios%2Farch%2Fppc%2Fqemu%2Ftree.fs;h=1ed8383979e2b68d685c3b6e4be1a6b4a1e7e5e6;hb=e44e3482bdb4d0ebde2d8b41830ac2cdb07948fb;hp=0000000000000000000000000000000000000000;hpb=9ca8dbcc65cfc63d6f5ef3312a33184e1d726e00;p=kvmfornfv.git diff --git a/qemu/roms/openbios/arch/ppc/qemu/tree.fs b/qemu/roms/openbios/arch/ppc/qemu/tree.fs new file mode 100644 index 000000000..1ed838397 --- /dev/null +++ b/qemu/roms/openbios/arch/ppc/qemu/tree.fs @@ -0,0 +1,71 @@ +\ QEMU specific initialization code +\ +\ This program is free software; you can redistribute it and/or +\ modify it under the terms of the GNU General Public License +\ as published by the Free Software Foundation +\ + +include config.fs + +\ ------------------------------------------------------------- +\ device-tree +\ ------------------------------------------------------------- + +" /" find-device +\ Apple calls the root node device-tree +" device-tree" device-name +[IFDEF] CONFIG_PPC64 2 [ELSE] 1 [THEN] encode-int " #address-cells" property +1 encode-int " #size-cells" property +h# 05f5e100 encode-int " clock-frequency" property + +new-device + " cpus" device-name + 1 encode-int " #address-cells" property + 0 encode-int " #size-cells" property + external + + : encode-unit ( unit -- str len ) + pocket tohexstr + ; + + : decode-unit ( str len -- unit ) + parse-hex + ; + +finish-device + +new-device + " memory" device-name + " memory" device-type + external + : open true ; + : close ; +finish-device + +\ ------------------------------------------------------------- +\ /packages +\ ------------------------------------------------------------- + +" /packages" find-device + + " packages" device-name + external + \ allow packages to be opened with open-dev + : open true ; + : close ; + +\ /packages/terminal-emulator +new-device + " terminal-emulator" device-name + external + : open true ; + : close ; + \ : write ( addr len -- actual ) + \ dup -rot type + \ ; +finish-device + +\ ------------------------------------------------------------- +\ The END +\ ------------------------------------------------------------- +device-end