From 05ec5dd14997be0c434bbfbc325479907cb431fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 13 Oct 2010 14:01:51 +0000 Subject: [PATCH] ppc: Suppress /hypervisor outside KVM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit My New World PowerMac G3 does not have a /hypervisor node. Move all Forth code to kvm_of_init() to make it match the comment: Don't expose /hypervisor when not in KVM. Cc: Alexander Graf Signed-off-by: Andreas Färber Signed-off-by: Alexander Graf git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@895 f158a5a8-5612-0410-a976-696ce0be7e32 --- arch/ppc/qemu/init.c | 12 +++++++++++- arch/ppc/qemu/tree.fs | 5 ----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/arch/ppc/qemu/init.c b/arch/ppc/qemu/init.c index 0d0db3a..b5888ef 100644 --- a/arch/ppc/qemu/init.c +++ b/arch/ppc/qemu/init.c @@ -526,9 +526,17 @@ static void kvm_of_init(void) if (!fw_cfg_read_i32(FW_CFG_PPC_IS_KVM)) return; - push_str("/hypervisor"); + push_str("/"); fword("find-device"); + fword("new-device"); + + push_str("hypervisor"); + fword("device-name"); + + push_str("hypervisor"); + fword("device-type"); + /* compatible */ push_str("linux,kvm"); @@ -567,6 +575,8 @@ static void kvm_of_init(void) fword("encode-string"); push_str("guest-name"); fword("property"); + + fword("finish-device"); } void diff --git a/arch/ppc/qemu/tree.fs b/arch/ppc/qemu/tree.fs index b7bb706..4d107a9 100644 --- a/arch/ppc/qemu/tree.fs +++ b/arch/ppc/qemu/tree.fs @@ -39,11 +39,6 @@ new-device : close ; finish-device -new-device - " hypervisor" device-name - " hypervisor" device-type -finish-device - \ ------------------------------------------------------------- \ /packages \ -------------------------------------------------------------