* [Qemu-devel] PowerPC KVM support
@ 2008-12-11 20:52 Hollis Blanchard
2008-12-11 20:52 ` [Qemu-devel] [PATCH 1/6] Include headers for types used in helper_regs.h Hollis Blanchard
0 siblings, 1 reply; 22+ messages in thread
From: Hollis Blanchard @ 2008-12-11 20:52 UTC (permalink / raw)
To: qemu-devel; +Cc: kvm-ppc
These patches implement KVM support for the PowerPC Bamboo board, a system
built around the 440EP SoC. In the KVM model, the KVM kernel module is
responsible for all instruction execution, so it doesn't matter that TCG
doesn't emulate the 440 core.
We've only tested KVM and Bamboo with the -kernel option. I have no idea what
it would take to run a firmware like u-boot inside the VM, but it's basically
the same problem as running u-boot inside a 405 VM (which I know
Jean-Christophe is working on).
There are a couple issues I'd appreciate feedback on:
- The "bamboo" machine shows up as an option ("-M \?"), but if a user selects
it without KVM support, they will just get an error. I don't like that, but
register_machines() is called before --enable-kvm is recognized.
- We call cpu_ppc_init("405") to create a CPUState, because some CPUState
fields are required outside of TCG. We could instead create a "KVM" CPU
name, or a cpu_ppc_init_kvm() function. I'd prefer to stay on a common code
path though, so that if new CPUState fields are introduced in the future,
there's no KVM-specific path that breaks.
- I'd like to use ppc4xx_sdram_adjust() with the existing 405 targets as well,
but nobody can tell me how to get a functioning 405 qemu so I can't test it.
I may submit a separate patch series for this anyways.
-Hollis
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Qemu-devel] [PATCH 1/6] Include headers for types used in helper_regs.h
2008-12-11 20:52 [Qemu-devel] PowerPC KVM support Hollis Blanchard
@ 2008-12-11 20:52 ` Hollis Blanchard
2008-12-11 20:52 ` [Qemu-devel] [PATCH 2/6] kvm: sync vcpu state during initialization Hollis Blanchard
` (4 more replies)
0 siblings, 5 replies; 22+ messages in thread
From: Hollis Blanchard @ 2008-12-11 20:52 UTC (permalink / raw)
To: qemu-devel; +Cc: kvm-ppc
helper_regs.h uses "always_inline" and MSR_* constants, which are defined
in osdep.h and cpu.h.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
---
target-ppc/helper_regs.h | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/target-ppc/helper_regs.h b/target-ppc/helper_regs.h
index 9666d4b..72a3f87 100644
--- a/target-ppc/helper_regs.h
+++ b/target-ppc/helper_regs.h
@@ -21,6 +21,10 @@
#if !defined(__HELPER_REGS_H__)
#define __HELPER_REGS_H__
+#include "osdep.h"
+#include <stdio.h>
+#include "cpu.h"
+
/* Swap temporary saved registers with GPRs */
static always_inline void hreg_swap_gpr_tgpr (CPUPPCState *env)
{
--
1.5.6.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Qemu-devel] [PATCH 2/6] kvm: sync vcpu state during initialization
2008-12-11 20:52 ` [Qemu-devel] [PATCH 1/6] Include headers for types used in helper_regs.h Hollis Blanchard
@ 2008-12-11 20:52 ` Hollis Blanchard
2008-12-11 20:57 ` [Qemu-devel] " Hollis Blanchard
2008-12-11 21:24 ` [Qemu-devel] " Anthony Liguori
2008-12-11 20:52 ` [Qemu-devel] [PATCH 3/6] Enable KVM for ppcemb Hollis Blanchard
` (3 subsequent siblings)
4 siblings, 2 replies; 22+ messages in thread
From: Hollis Blanchard @ 2008-12-11 20:52 UTC (permalink / raw)
To: qemu-devel; +Cc: kvm-ppc
Currently on x86, qemu initializes CPUState but KVM ignores it and does its
own vcpu initialization. However, PowerPC KVM needs to be able to set the
initial register state to support the -kernel and -append options.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
---
kvm-all.c | 15 +++++++++++++++
kvm.h | 1 +
vl.c | 11 +++++++++++
3 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index dad80df..11034df 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -141,6 +141,21 @@ err:
return ret;
}
+int kvm_sync_vcpus(void)
+{
+ CPUState *env;
+
+ for (env = first_cpu; env != NULL; env = env->next_cpu) {
+ int ret;
+
+ ret = kvm_arch_put_registers(env);
+ if (ret)
+ return ret;
+ }
+
+ return 0;
+}
+
/*
* dirty pages logging control
*/
diff --git a/kvm.h b/kvm.h
index ac464ab..efce145 100644
--- a/kvm.h
+++ b/kvm.h
@@ -31,6 +31,7 @@ struct kvm_run;
int kvm_init(int smp_cpus);
int kvm_init_vcpu(CPUState *env);
+int kvm_sync_vcpus(void);
int kvm_cpu_exec(CPUState *env);
diff --git a/vl.c b/vl.c
index c3a8d8f..0a02151 100644
--- a/vl.c
+++ b/vl.c
@@ -5456,6 +5456,17 @@ int main(int argc, char **argv, char **envp)
machine->init(ram_size, vga_ram_size, boot_devices, ds,
kernel_filename, kernel_cmdline, initrd_filename, cpu_model);
+ /* Set KVM's vcpu state to qemu's initial CPUState. */
+ if (kvm_enabled()) {
+ int ret;
+
+ ret = kvm_sync_vcpus();
+ if (ret < 0) {
+ fprintf(stderr, "failed to initialize vcpus\n");
+ exit(1);
+ }
+ }
+
/* init USB devices */
if (usb_enabled) {
for(i = 0; i < usb_devices_index; i++) {
--
1.5.6.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Qemu-devel] [PATCH 3/6] Enable KVM for ppcemb.
2008-12-11 20:52 ` [Qemu-devel] [PATCH 1/6] Include headers for types used in helper_regs.h Hollis Blanchard
2008-12-11 20:52 ` [Qemu-devel] [PATCH 2/6] kvm: sync vcpu state during initialization Hollis Blanchard
@ 2008-12-11 20:52 ` Hollis Blanchard
2008-12-11 21:19 ` Blue Swirl
2008-12-11 21:30 ` Anthony Liguori
2008-12-11 20:52 ` [Qemu-devel] [PATCH 4/6] Implement device tree support needed for Bamboo emulation Hollis Blanchard
` (2 subsequent siblings)
4 siblings, 2 replies; 22+ messages in thread
From: Hollis Blanchard @ 2008-12-11 20:52 UTC (permalink / raw)
To: qemu-devel; +Cc: kvm-ppc
Implement hooks called by generic KVM code.
Also add code that will copy the host's CPU and timebase frequencies to the
guest, which is necessary on KVM because the guest can directly access the
timebase.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
---
Makefile.target | 3 +
configure | 6 ++
target-ppc/helper.c | 5 +
target-ppc/kvm.c | 212 ++++++++++++++++++++++++++++++++++++++++++++++++++
target-ppc/kvm_ppc.c | 105 +++++++++++++++++++++++++
target-ppc/kvm_ppc.h | 15 ++++
6 files changed, 346 insertions(+), 0 deletions(-)
create mode 100644 target-ppc/kvm.c
create mode 100644 target-ppc/kvm_ppc.c
create mode 100644 target-ppc/kvm_ppc.h
diff --git a/Makefile.target b/Makefile.target
index 7152dff..d01231d 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -652,6 +652,9 @@ OBJS+= heathrow_pic.o grackle_pci.o ppc_oldworld.o
OBJS+= unin_pci.o ppc_chrp.o
# PowerPC 4xx boards
OBJS+= pflash_cfi02.o ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o
+ifdef CONFIG_KVM
+OBJS+= kvm_ppc.o
+endif
# virtio support
OBJS+= virtio.o virtio-blk.o virtio-balloon.o
endif
diff --git a/configure b/configure
index 13f6358..c534441 100755
--- a/configure
+++ b/configure
@@ -1463,6 +1463,7 @@ gdb_xml_files=""
# Make sure the target and host cpus are compatible
if test "$kvm" = "yes" -a ! \( "$target_cpu" = "$cpu" -o \
+ \( "$target_cpu" = "ppcemb" -a "$cpu" = "powerpc" \) -o \
\( "$target_cpu" = "x86_64" -a "$cpu" = "i386" \) -o \
\( "$target_cpu" = "i386" -a "$cpu" = "x86_64" \) \) ; then
kvm="no"
@@ -1557,6 +1558,11 @@ case "$target_cpu" in
echo "#define TARGET_ARCH \"ppcemb\"" >> $config_h
echo "#define TARGET_PPC 1" >> $config_h
echo "#define TARGET_PPCEMB 1" >> $config_h
+ if test "$kvm" = "yes" ; then
+ echo "CONFIG_KVM=yes" >> $config_mak
+ echo "KVM_CFLAGS=$kvm_cflags" >> $config_mak
+ echo "#define CONFIG_KVM 1" >> $config_h
+ fi
;;
ppc64)
echo "TARGET_ARCH=ppc64" >> $config_mak
diff --git a/target-ppc/helper.c b/target-ppc/helper.c
index 33e8b3b..0b93f1c 100644
--- a/target-ppc/helper.c
+++ b/target-ppc/helper.c
@@ -30,6 +30,7 @@
#include "helper_regs.h"
#include "qemu-common.h"
#include "helper.h"
+#include "kvm.h"
//#define DEBUG_MMU
//#define DEBUG_BATS
@@ -2939,6 +2940,10 @@ CPUPPCState *cpu_ppc_init (const char *cpu_model)
env->cpu_model_str = cpu_model;
cpu_ppc_register_internal(env, def);
cpu_ppc_reset(env);
+
+ if (kvm_enabled())
+ kvm_init_vcpu(env);
+
return env;
}
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
new file mode 100644
index 0000000..90b943b
--- /dev/null
+++ b/target-ppc/kvm.c
@@ -0,0 +1,212 @@
+/*
+ * PowerPC implementation of KVM hooks
+ *
+ * Copyright IBM Corp. 2007
+ *
+ * Authors:
+ * Jerone Young <jyoung5@us.ibm.com>
+ * Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
+ * Hollis Blanchard <hollisb@us.ibm.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#include <sys/mman.h>
+
+#include <linux/kvm.h>
+
+#include "helper_regs.h"
+#include "qemu-common.h"
+#include "qemu-timer.h"
+#include "sysemu.h"
+#include "kvm.h"
+#include "kvm_ppc.h"
+#include "cpu.h"
+#include "device_tree.h"
+
+//#define DEBUG_KVM
+
+#ifdef DEBUG_KVM
+#define dprintf(fmt, ...) \
+ do { fprintf(stderr, fmt, ## __VA_ARGS__); } while (0)
+#else
+#define dprintf(fmt, ...) \
+ do { } while (0)
+#endif
+
+int kvm_arch_init(KVMState *s, int smp_cpus)
+{
+ return 0;
+}
+
+int kvm_arch_init_vcpu(CPUState *cenv)
+{
+ return 0;
+}
+
+int kvm_arch_put_registers(CPUState *env)
+{
+ struct kvm_regs regs;
+ int ret;
+ int i;
+
+ ret = kvm_vcpu_ioctl(env, KVM_GET_REGS, ®s);
+ if (ret < 0)
+ return ret;
+
+ /* cr is untouched in qemu and not existant in CPUState fr ppr */
+ /* hflags is a morphed to MSR on ppc, no need to sync that down to kvm */
+
+ regs.pc = env->nip;
+
+ regs.ctr = env->ctr;
+ regs.lr = env->lr;
+ regs.xer = env->xer;
+ regs.msr = env->msr;
+
+ regs.srr0 = env->spr[SPR_SRR0];
+ regs.srr1 = env->spr[SPR_SRR1];
+
+ regs.sprg0 = env->spr[SPR_SPRG0];
+ regs.sprg1 = env->spr[SPR_SPRG1];
+ regs.sprg2 = env->spr[SPR_SPRG2];
+ regs.sprg3 = env->spr[SPR_SPRG3];
+ regs.sprg4 = env->spr[SPR_SPRG4];
+ regs.sprg5 = env->spr[SPR_SPRG5];
+ regs.sprg6 = env->spr[SPR_SPRG6];
+ regs.sprg7 = env->spr[SPR_SPRG7];
+
+ for (i = 0;i < 32; i++)
+ regs.gpr[i] = env->gpr[i];
+
+ ret = kvm_vcpu_ioctl(env, KVM_SET_REGS, ®s);
+ if (ret < 0)
+ return ret;
+
+ return ret;
+}
+
+int kvm_arch_get_registers(CPUState *env)
+{
+ struct kvm_regs regs;
+ uint32_t i, ret;
+
+ ret = kvm_vcpu_ioctl(env, KVM_GET_REGS, ®s);
+ if (ret < 0)
+ return ret;
+
+ env->ctr = regs.ctr;
+ env->lr = regs.lr;
+ env->xer = regs.xer;
+ env->msr = regs.msr;
+ /* calculate hflags based on the current msr using the ppc qemu helper */
+ hreg_compute_hflags(env);
+
+ env->nip = regs.pc;
+
+ env->spr[SPR_SRR0] = regs.srr0;
+ env->spr[SPR_SRR1] = regs.srr1;
+
+ env->spr[SPR_SPRG0] = regs.sprg0;
+ env->spr[SPR_SPRG1] = regs.sprg1;
+ env->spr[SPR_SPRG2] = regs.sprg2;
+ env->spr[SPR_SPRG3] = regs.sprg3;
+ env->spr[SPR_SPRG4] = regs.sprg4;
+ env->spr[SPR_SPRG5] = regs.sprg5;
+ env->spr[SPR_SPRG6] = regs.sprg6;
+ env->spr[SPR_SPRG7] = regs.sprg7;
+
+ for (i = 0;i < 32; i++)
+ env->gpr[i] = regs.gpr[i];
+
+ return 0;
+}
+
+int kvm_arch_pre_run(CPUState *env, struct kvm_run *run)
+{
+ int r;
+ unsigned irq;
+
+ /* PowerPC Qemu tracks the various core input pins (interrupt, critical
+ * interrupt, reset, etc) in PPC-specific env->irq_input_state. */
+ if (run->ready_for_interrupt_injection &&
+ (env->interrupt_request & CPU_INTERRUPT_HARD) &&
+ (env->irq_input_state & (1<<PPC40x_INPUT_INT)))
+ {
+ /* For now KVM disregards the 'irq' argument. However, in the
+ * future KVM could cache it in-kernel to avoid a heavyweight exit
+ * when reading the UIC.
+ */
+ irq = -1U;
+
+ dprintf("injected interrupt %d\n", irq);
+ r = kvm_vcpu_ioctl(env, KVM_INTERRUPT, &irq);
+ if (r < 0)
+ printf("cpu %d fail inject %x\n", env->cpu_index, irq);
+ }
+
+ /* We don't know if there are more interrupts pending after this. However,
+ * the guest will return to userspace in the course of handling this one
+ * anyways, so we will get a chance to deliver the rest. */
+ return 0;
+}
+
+int kvm_arch_post_run(CPUState *env, struct kvm_run *run)
+{
+ return 0;
+}
+
+static int kvmppc_handle_halt(CPUState *env)
+{
+ if (!(env->interrupt_request & CPU_INTERRUPT_HARD) && (msr_ee)) {
+ env->halted = 1;
+ env->exception_index = EXCP_HLT;
+ }
+
+ return 1;
+}
+
+/* map dcr access to existing qemu dcr emulation */
+static int kvmppc_handle_dcr_read(CPUState *env, uint32_t dcrn, uint32_t *data)
+{
+ if (ppc_dcr_read(env->dcr_env, dcrn, data) < 0)
+ fprintf(stderr, "Read to unhandled DCR (0x%x)\n", dcrn);
+
+ return 1;
+}
+
+static int kvmppc_handle_dcr_write(CPUState *env, uint32_t dcrn, uint32_t data)
+{
+ if (ppc_dcr_write(env->dcr_env, dcrn, data) < 0)
+ fprintf(stderr, "Write to unhandled DCR (0x%x)\n", dcrn);
+
+ return 1;
+}
+
+int kvm_arch_handle_exit(CPUState *env, struct kvm_run *run)
+{
+ int ret = 0;
+
+ switch (run->exit_reason) {
+ case KVM_EXIT_DCR:
+ if (run->dcr.is_write) {
+ dprintf("handle dcr write\n");
+ ret = kvmppc_handle_dcr_write(env, run->dcr.dcrn, run->dcr.data);
+ } else {
+ dprintf("handle dcr read\n");
+ ret = kvmppc_handle_dcr_read(env, run->dcr.dcrn, &run->dcr.data);
+ }
+ break;
+ case KVM_EXIT_HLT:
+ dprintf("handle halt\n");
+ ret = kvmppc_handle_halt(env);
+ break;
+ }
+
+ return ret;
+}
+
diff --git a/target-ppc/kvm_ppc.c b/target-ppc/kvm_ppc.c
new file mode 100644
index 0000000..b2b56df
--- /dev/null
+++ b/target-ppc/kvm_ppc.c
@@ -0,0 +1,105 @@
+/*
+ * PowerPC KVM support
+ *
+ * Copyright IBM Corp. 2008
+ *
+ * Authors:
+ * Hollis Blanchard <hollisb@us.ibm.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+
+#include "qemu-common.h"
+#include "qemu-timer.h"
+#include "kvm_ppc.h"
+#include "device_tree.h"
+
+#define PROC_DEVTREE_PATH "/proc/device-tree"
+
+static QEMUTimer *kvmppc_timer;
+static unsigned int kvmppc_timer_rate;
+
+#ifdef HAVE_FDT
+static int kvmppc_read_host_property(const char *node_path, const char *prop,
+ void *val, size_t len)
+{
+ char *buf = NULL;
+ FILE *f;
+ int ret;
+
+ len = asprintf(&buf, "%s/%s/%s", PROC_DEVTREE_PATH, node_path, prop);
+ if (len < 0) {
+ ret = len;
+ goto out;
+ }
+
+ f = fopen(buf, "rb");
+ if (f == NULL) {
+ ret = errno;
+ goto free;
+ }
+
+ len = fread(val, len, 1, f);
+ if (len != 1) {
+ ret = ferror(f);
+ goto close;
+ }
+
+close:
+ fclose(f);
+free:
+ free(buf);
+out:
+ return 0;
+}
+
+static int kvmppc_copy_host_cell(void *fdt, const char *node, const char *prop)
+{
+ uint32_t cell;
+ int ret;
+
+ ret = kvmppc_read_host_property(node, prop, &cell, sizeof(cell));
+ if (ret < 0) {
+ fprintf(stderr, "couldn't read host %s/%s\n", node, prop);
+ goto out;
+ }
+
+ ret = qemu_devtree_setprop_cell(fdt, node, prop, cell);
+ if (ret < 0) {
+ fprintf(stderr, "couldn't set guest %s/%s\n", node, prop);
+ goto out;
+ }
+
+out:
+ return ret;
+}
+
+void kvmppc_fdt_update(void *fdt)
+{
+ /* Copy data from the host device tree into the guest. Since the guest can
+ * directly access the timebase without host involvement, we must expose
+ * the correct frequencies. */
+ kvmppc_copy_host_cell(fdt, "/cpus/cpu@0", "clock-frequency");
+ kvmppc_copy_host_cell(fdt, "/cpus/cpu@0", "timebase-frequency");
+}
+#endif
+
+static void kvmppc_timer_hack(void *opaque)
+{
+ qemu_service_io();
+ qemu_mod_timer(kvmppc_timer, qemu_get_clock(vm_clock) + kvmppc_timer_rate);
+}
+
+void kvmppc_init(void)
+{
+ /* XXX The only reason KVM yields control back to qemu is device IO. Since
+ * an idle guest does no IO, qemu's device model will never get a chance to
+ * run. So, until Qemu gains IO threads, we create this timer to ensure
+ * that the device model gets a chance to run. */
+ kvmppc_timer_rate = ticks_per_sec / 10;
+ kvmppc_timer = qemu_new_timer(vm_clock, &kvmppc_timer_hack, NULL);
+ qemu_mod_timer(kvmppc_timer, qemu_get_clock(vm_clock) + kvmppc_timer_rate);
+}
+
diff --git a/target-ppc/kvm_ppc.h b/target-ppc/kvm_ppc.h
new file mode 100644
index 0000000..e536a88
--- /dev/null
+++ b/target-ppc/kvm_ppc.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2008 IBM Corporation.
+ * Authors: Hollis Blanchard <hollisb@us.ibm.com>
+ *
+ * This work is licensed under the GNU GPL license version 2 or later.
+ *
+ */
+
+#ifndef __KVM_PPC_H__
+#define __KVM_PPC_H__
+
+void kvmppc_init(void);
+void kvmppc_fdt_update(void *fdt);
+
+#endif /* __KVM_PPC_H__ */
--
1.5.6.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Qemu-devel] [PATCH 4/6] Implement device tree support needed for Bamboo emulation
2008-12-11 20:52 ` [Qemu-devel] [PATCH 1/6] Include headers for types used in helper_regs.h Hollis Blanchard
2008-12-11 20:52 ` [Qemu-devel] [PATCH 2/6] kvm: sync vcpu state during initialization Hollis Blanchard
2008-12-11 20:52 ` [Qemu-devel] [PATCH 3/6] Enable KVM for ppcemb Hollis Blanchard
@ 2008-12-11 20:52 ` Hollis Blanchard
2008-12-11 21:33 ` Anthony Liguori
2008-12-11 20:52 ` [Qemu-devel] [PATCH 5/6] PowerPC 440EP SoC emulation Hollis Blanchard
2008-12-11 20:52 ` [Qemu-devel] [PATCH 6/6] IBM PowerPC 440EP Bamboo reference board emulation Hollis Blanchard
4 siblings, 1 reply; 22+ messages in thread
From: Hollis Blanchard @ 2008-12-11 20:52 UTC (permalink / raw)
To: qemu-devel; +Cc: kvm-ppc
To implement the -kernel, -initrd, and -append options, 4xx board emulation
must load the guest kernel as if firmware had loaded it. Where u-boot would be
the firmware, we must load the flat device tree into memory and set key fields
such as /chosen/bootargs.
This patch introduces a dependency on libfdt for flat device tree support.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
---
Makefile.target | 4 ++
configure | 18 ++++++++
device_tree.c | 116 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
device_tree.h | 26 ++++++++++++
libfdt_env.h | 22 ++++++++++
5 files changed, 186 insertions(+), 0 deletions(-)
create mode 100644 device_tree.c
create mode 100644 device_tree.h
create mode 100644 libfdt_env.h
diff --git a/Makefile.target b/Makefile.target
index d01231d..5da4994 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -655,6 +655,10 @@ OBJS+= pflash_cfi02.o ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o
ifdef CONFIG_KVM
OBJS+= kvm_ppc.o
endif
+ifdef FDT_LIBS
+OBJS+= device_tree.o
+LIBS+= $(FDT_LIBS)
+endif
# virtio support
OBJS+= virtio.o virtio-blk.o virtio-balloon.o
endif
diff --git a/configure b/configure
index c534441..b54c15d 100755
--- a/configure
+++ b/configure
@@ -119,6 +119,7 @@ kvm="yes"
kerneldir=""
aix="no"
blobs="yes"
+fdt="yes"
# OS specific
targetos=`uname -s`
@@ -976,6 +977,18 @@ if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
iovec=yes
fi
+##########################################
+# fdt probe
+if test "$fdt" = "yes" ; then
+ fdt=no
+ cat > $TMPC << EOF
+int main(void) { return 0; }
+EOF
+ if $cc $ARCH_CFLAGS -o $TMPE ${OS_CFLAGS} $TMPC -lfdt 2> /dev/null ; then
+ fdt=yes
+ fi
+fi
+
# Check if tools are available to build documentation.
if [ -x "`which texi2html 2>/dev/null`" ] && \
[ -x "`which pod2man 2>/dev/null`" ]; then
@@ -1051,6 +1064,7 @@ echo "vde support $vde"
echo "AIO support $aio"
echo "Install blobs $blobs"
echo "KVM support $kvm"
+echo "fdt support $kvm"
if test $sdl_too_old = "yes"; then
echo "-> Your SDL version is too old - please upgrade to have SDL support"
@@ -1340,6 +1354,10 @@ fi
if test "$iovec" = "yes" ; then
echo "#define HAVE_IOVEC 1" >> $config_h
fi
+if test "$fdt" = "yes" ; then
+ echo "#define HAVE_FDT 1" >> $config_h
+ echo "FDT_LIBS=-lfdt" >> $config_mak
+fi
# XXX: suppress that
if [ "$bsd" = "yes" ] ; then
diff --git a/device_tree.c b/device_tree.c
new file mode 100644
index 0000000..d7350e3
--- /dev/null
+++ b/device_tree.c
@@ -0,0 +1,116 @@
+/*
+ * Functions to help device tree manipulation using libfdt.
+ * It also provides functions to read entries from device tree proc
+ * interface.
+ *
+ * Copyright 2008 IBM Corporation.
+ * Authors: Jerone Young <jyoung5@us.ibm.com>
+ * Hollis Blanchard <hollisb@us.ibm.com>
+ *
+ * This work is licensed under the GNU GPL license version 2 or later.
+ *
+ */
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdlib.h>
+
+#include "config.h"
+#include "qemu-common.h"
+#include "sysemu.h"
+#include "device_tree.h"
+
+#include "libfdt.h"
+
+void *load_device_tree(const char *filename_path, void *load_addr)
+{
+ int dt_file_size;
+ int dt_file_load_size;
+ int new_dt_size;
+ int ret;
+ void *dt_file = NULL;
+ void *fdt;
+
+ dt_file_size = get_image_size(filename_path);
+ if (dt_file_size < 0) {
+ printf("Unable to get size of device tree file '%s'\n",
+ filename_path);
+ goto fail;
+ }
+
+ /* First allocate space in qemu for device tree */
+ dt_file = qemu_malloc(dt_file_size);
+ if (dt_file == NULL) {
+ printf("Unable to allocate memory in qemu for device tree\n");
+ goto fail;
+ }
+ memset(dt_file, 0, dt_file_size);
+
+ dt_file_load_size = load_image(filename_path, dt_file);
+
+ /* Second we place new copy of 2x size in guest memory
+ * This give us enough room for manipulation.
+ */
+ new_dt_size = dt_file_size * 2;
+
+ fdt = load_addr;
+ ret = fdt_open_into(dt_file, fdt, new_dt_size);
+ if (ret) {
+ printf("Unable to copy device tree in memory\n");
+ goto fail;
+ }
+
+ /* Check sanity of device tree */
+ if (fdt_check_header(fdt)) {
+ printf ("Device tree file loaded into memory is invalid: %s\n",
+ filename_path);
+ goto fail;
+ }
+ /* free qemu memory with old device tree */
+ qemu_free(dt_file);
+ return fdt;
+
+fail:
+ if (dt_file)
+ qemu_free(dt_file);
+ return NULL;
+}
+
+int qemu_devtree_setprop(void *fdt, const char *node_path,
+ const char *property, uint32_t *val_array, int size)
+{
+ int offset;
+
+ offset = fdt_path_offset(fdt, node_path);
+ if (offset < 0)
+ return offset;
+
+ return fdt_setprop(fdt, offset, property, val_array, size);
+}
+
+int qemu_devtree_setprop_cell(void *fdt, const char *node_path,
+ const char *property, uint32_t val)
+{
+ int offset;
+
+ offset = fdt_path_offset(fdt, node_path);
+ if (offset < 0)
+ return offset;
+
+ return fdt_setprop_cell(fdt, offset, property, val);
+}
+
+int qemu_devtree_setprop_string(void *fdt, const char *node_path,
+ const char *property, const char *string)
+{
+ int offset;
+
+ offset = fdt_path_offset(fdt, node_path);
+ if (offset < 0)
+ return offset;
+
+ return fdt_setprop_string(fdt, offset, property, string);
+}
diff --git a/device_tree.h b/device_tree.h
new file mode 100644
index 0000000..9e6ef3d
--- /dev/null
+++ b/device_tree.h
@@ -0,0 +1,26 @@
+/*
+ * Header with function prototypes to help device tree manipulation using
+ * libfdt. It also provides functions to read entries from device tree proc
+ * interface.
+ *
+ * Copyright 2008 IBM Corporation.
+ * Authors: Jerone Young <jyoung5@us.ibm.com>
+ * Hollis Blanchard <hollisb@us.ibm.com>
+ *
+ * This work is licensed under the GNU GPL license version 2 or later.
+ *
+ */
+
+#ifndef __DEVICE_TREE_H__
+#define __DEVICE_TREE_H__
+
+void *load_device_tree(const char *filename_path, void *load_addr);
+
+int qemu_devtree_setprop(void *fdt, const char *node_path,
+ const char *property, uint32_t *val_array, int size);
+int qemu_devtree_setprop_cell(void *fdt, const char *node_path,
+ const char *property, uint32_t val);
+int qemu_devtree_setprop_string(void *fdt, const char *node_path,
+ const char *property, const char *string);
+
+#endif /* __DEVICE_TREE_H__ */
diff --git a/libfdt_env.h b/libfdt_env.h
new file mode 100644
index 0000000..59f2536
--- /dev/null
+++ b/libfdt_env.h
@@ -0,0 +1,22 @@
+#ifndef _LIBFDT_ENV_H
+#define _LIBFDT_ENV_H
+
+#include <stddef.h>
+#include <stdint.h>
+#include <string.h>
+#include <endian.h>
+#include <byteswap.h>
+
+#if __BYTE_ORDER == __BIG_ENDIAN
+#define fdt32_to_cpu(x) (x)
+#define cpu_to_fdt32(x) (x)
+#define fdt64_to_cpu(x) (x)
+#define cpu_to_fdt64(x) (x)
+#else
+#define fdt32_to_cpu(x) (bswap_32((x)))
+#define cpu_to_fdt32(x) (bswap_32((x)))
+#define fdt64_to_cpu(x) (bswap_64((x)))
+#define cpu_to_fdt64(x) (bswap_64((x)))
+#endif
+
+#endif /* _LIBFDT_ENV_H */
--
1.5.6.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Qemu-devel] [PATCH 5/6] PowerPC 440EP SoC emulation
2008-12-11 20:52 ` [Qemu-devel] [PATCH 1/6] Include headers for types used in helper_regs.h Hollis Blanchard
` (2 preceding siblings ...)
2008-12-11 20:52 ` [Qemu-devel] [PATCH 4/6] Implement device tree support needed for Bamboo emulation Hollis Blanchard
@ 2008-12-11 20:52 ` Hollis Blanchard
2008-12-11 20:52 ` [Qemu-devel] [PATCH 6/6] IBM PowerPC 440EP Bamboo reference board emulation Hollis Blanchard
4 siblings, 0 replies; 22+ messages in thread
From: Hollis Blanchard @ 2008-12-11 20:52 UTC (permalink / raw)
To: qemu-devel; +Cc: kvm-ppc
Wire up the system-on-chip devices present on 440EP chips.
This patch is a little unusual in that qemu doesn't actually emulate the 440
core, but we use this board code with KVM (which does). If/when 440 core
emulation is supported, the kvm_enabled() hack can be removed.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
---
Makefile.target | 1 +
hw/ppc440.c | 144 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
hw/ppc440.h | 20 ++++++++
3 files changed, 165 insertions(+), 0 deletions(-)
create mode 100644 hw/ppc440.c
create mode 100644 hw/ppc440.h
diff --git a/Makefile.target b/Makefile.target
index 5da4994..6032af0 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -652,6 +652,7 @@ OBJS+= heathrow_pic.o grackle_pci.o ppc_oldworld.o
OBJS+= unin_pci.o ppc_chrp.o
# PowerPC 4xx boards
OBJS+= pflash_cfi02.o ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o
+OBJS+= ppc440.o
ifdef CONFIG_KVM
OBJS+= kvm_ppc.o
endif
diff --git a/hw/ppc440.c b/hw/ppc440.c
new file mode 100644
index 0000000..654249f
--- /dev/null
+++ b/hw/ppc440.c
@@ -0,0 +1,144 @@
+/*
+ * Qemu PowerPC 440 chip emulation
+ *
+ * Copyright 2007 IBM Corporation.
+ * Authors:
+ * Jerone Young <jyoung5@us.ibm.com>
+ * Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
+ * Hollis Blanchard <hollisb@us.ibm.com>
+ *
+ * This work is licensed under the GNU GPL license version 2 or later.
+ *
+ */
+
+#include "hw.h"
+#include "isa.h"
+#include "ppc.h"
+#include "ppc4xx.h"
+#include "ppc440.h"
+#include "ppc405.h"
+#include "sysemu.h"
+#include "kvm.h"
+
+#define PPC440EP_SDRAM_NR_BANKS 4
+
+#define PPC440EP_PCI_CONFIG 0xeec00000
+#define PPC440EP_PCI_INTACK 0xeed00000
+#define PPC440EP_PCI_SPECIAL 0xeed00000
+#define PPC440EP_PCI_REGS 0xef400000
+#define PPC440EP_PCI_IO 0xe8000000
+#define PPC440EP_PCI_IOLEN 0x00010000
+
+static const unsigned int ppc440ep_sdram_bank_sizes[] = {
+ 256<<20, 128<<20, 64<<20, 32<<20, 16<<20, 8<<20, 0
+};
+
+/* XXX move to ppc4xx_devs.c */
+/* Fill in consecutive SDRAM banks with 'ram_size' bytes of memory.
+ *
+ * The SDRAM controller supports a small number of banks, and each bank must be
+ * one of a small set of sizes. The number of banks and the supported sizes
+ * varies by SoC. */
+ram_addr_t ppc4xx_sdram_adjust(ram_addr_t ram_size, int nr_banks,
+ target_phys_addr_t ram_bases[],
+ target_phys_addr_t ram_sizes[],
+ const unsigned int sdram_bank_sizes[])
+{
+ ram_addr_t ram_end = 0;
+ int i;
+ int j;
+
+ for (i = 0; i < nr_banks; i++) {
+ for (j = 0; sdram_bank_sizes[j] != 0; j++) {
+ unsigned int bank_size = sdram_bank_sizes[j];
+
+ if (bank_size <= ram_size) {
+ ram_bases[i] = ram_end;
+ ram_sizes[i] = bank_size;
+ ram_end += bank_size;
+ ram_size -= bank_size;
+ break;
+ }
+ }
+
+ if (!ram_size) {
+ /* No need to use the remaining banks. */
+ break;
+ }
+ }
+
+ if (ram_size)
+ printf("Truncating memory to %d MiB to fit SDRAM controller limits.\n",
+ (int)(ram_end >> 20));
+
+ return ram_end;
+}
+
+CPUState *ppc440ep_init(ram_addr_t *ram_size, PCIBus **pcip,
+ const unsigned int pci_irq_nrs[4], int do_init)
+{
+ target_phys_addr_t ram_bases[PPC440EP_SDRAM_NR_BANKS];
+ target_phys_addr_t ram_sizes[PPC440EP_SDRAM_NR_BANKS];
+ CPUState *env;
+ ppc4xx_mmio_t *mmio;
+ qemu_irq *pic;
+ qemu_irq *irqs;
+ qemu_irq *pci_irqs;
+
+ env = cpu_ppc_init("440EP");
+ if (!env && kvm_enabled()) {
+ /* XXX Since qemu doesn't yet emulate 440, we just say it's a 405.
+ * Since KVM doesn't use qemu's CPU emulation it seems to be working
+ * OK. */
+ env = cpu_ppc_init("405");
+ }
+ if (!env) {
+ fprintf(stderr, "Unable to initialize CPU!\n");
+ exit(1);
+ }
+
+ ppc_dcr_init(env, NULL, NULL);
+
+ /* interrupt controller */
+ irqs = qemu_mallocz(sizeof(qemu_irq) * PPCUIC_OUTPUT_NB);
+ irqs[PPCUIC_OUTPUT_INT] = ((qemu_irq *)env->irq_inputs)[PPC40x_INPUT_INT];
+ irqs[PPCUIC_OUTPUT_CINT] = ((qemu_irq *)env->irq_inputs)[PPC40x_INPUT_CINT];
+ pic = ppcuic_init(env, irqs, 0x0C0, 0, 1);
+
+ /* SDRAM controller */
+ memset(ram_bases, 0, sizeof(ram_bases));
+ memset(ram_sizes, 0, sizeof(ram_sizes));
+ *ram_size = ppc4xx_sdram_adjust(*ram_size, PPC440EP_SDRAM_NR_BANKS,
+ ram_bases, ram_sizes,
+ ppc440ep_sdram_bank_sizes);
+ /* XXX 440EP's ECC interrupts are on UIC1, but we've only created UIC0. */
+ ppc405_sdram_init(env, pic[14], PPC440EP_SDRAM_NR_BANKS, ram_bases,
+ ram_sizes, do_init);
+
+ /* PCI */
+ pci_irqs = qemu_malloc(sizeof(qemu_irq) * 4);
+ pci_irqs[0] = pic[pci_irq_nrs[0]];
+ pci_irqs[1] = pic[pci_irq_nrs[1]];
+ pci_irqs[2] = pic[pci_irq_nrs[2]];
+ pci_irqs[3] = pic[pci_irq_nrs[3]];
+ *pcip = ppc4xx_pci_init(env, pci_irqs,
+ PPC440EP_PCI_CONFIG,
+ PPC440EP_PCI_INTACK,
+ PPC440EP_PCI_SPECIAL,
+ PPC440EP_PCI_REGS);
+ if (!*pcip)
+ printf("couldn't create PCI controller!\n");
+
+ isa_mmio_init(PPC440EP_PCI_IO, PPC440EP_PCI_IOLEN);
+
+ /* MMIO -- most "miscellaneous" devices live above 0xef600000. */
+ mmio = ppc4xx_mmio_init(env, 0xef600000);
+
+ if (serial_hds[0])
+ ppc405_serial_init(env, mmio, 0x300, pic[0], serial_hds[0]);
+
+ if (serial_hds[1])
+ ppc405_serial_init(env, mmio, 0x400, pic[1], serial_hds[1]);
+
+ return env;
+}
diff --git a/hw/ppc440.h b/hw/ppc440.h
new file mode 100644
index 0000000..b6843eb
--- /dev/null
+++ b/hw/ppc440.h
@@ -0,0 +1,20 @@
+/*
+ * Qemu PowerPC 440 board emualtion
+ *
+ * Copyright 2007 IBM Corporation.
+ * Authors: Jerone Young <jyoung5@us.ibm.com>
+ * Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
+ *
+ * This work is licensed under the GNU GPL licence version 2 or later
+ *
+ */
+
+#ifndef QEMU_PPC440_H
+#define QEMU_PPC440_H
+
+#include "hw.h"
+
+CPUState *ppc440ep_init(ram_addr_t *ram_size, PCIBus **pcip,
+ const unsigned int pci_irq_nrs[4], int do_init);
+
+#endif
--
1.5.6.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Qemu-devel] [PATCH 6/6] IBM PowerPC 440EP Bamboo reference board emulation
2008-12-11 20:52 ` [Qemu-devel] [PATCH 1/6] Include headers for types used in helper_regs.h Hollis Blanchard
` (3 preceding siblings ...)
2008-12-11 20:52 ` [Qemu-devel] [PATCH 5/6] PowerPC 440EP SoC emulation Hollis Blanchard
@ 2008-12-11 20:52 ` Hollis Blanchard
2008-12-11 21:25 ` Blue Swirl
2008-12-11 21:39 ` Anthony Liguori
4 siblings, 2 replies; 22+ messages in thread
From: Hollis Blanchard @ 2008-12-11 20:52 UTC (permalink / raw)
To: qemu-devel; +Cc: kvm-ppc
Since most IO devices are integrated into the 440EP chip, "Bamboo support"
mostly entails implementing the -kernel, -initrd, and -append options.
These options are implemented by loading the guest as if u-boot had done it,
i.e. loading a flat device tree, updating it to hold initrd addresses, ram
size, and command line, and passing the FDT address in r3.
Since we use it with KVM, we enable the virtio block driver and include hooks
necessary for KVM support.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
---
Makefile | 2 +-
Makefile.target | 2 +-
hw/boards.h | 1 +
hw/ppc440_bamboo.c | 190 ++++++++++++++++++++++++++++++++++++++++
pc-bios/bamboo.dtb | Bin 0 -> 3163 bytes
pc-bios/bamboo.dts | 234 ++++++++++++++++++++++++++++++++++++++++++++++++++
target-ppc/machine.c | 2 +
7 files changed, 429 insertions(+), 2 deletions(-)
create mode 100644 hw/ppc440_bamboo.c
create mode 100644 pc-bios/bamboo.dtb
create mode 100644 pc-bios/bamboo.dts
diff --git a/Makefile b/Makefile
index a2a03ec..f9496fe 100644
--- a/Makefile
+++ b/Makefile
@@ -219,7 +219,7 @@ common de-ch es fo fr-ca hu ja mk nl-be pt sl tr
ifdef INSTALL_BLOBS
BLOBS=bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
video.x openbios-sparc32 openbios-sparc64 pxe-ne2k_pci.bin \
-pxe-rtl8139.bin pxe-pcnet.bin pxe-e1000.bin
+pxe-rtl8139.bin pxe-pcnet.bin pxe-e1000.bin bamboo.dtb
else
BLOBS=
endif
diff --git a/Makefile.target b/Makefile.target
index 6032af0..82bc746 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -652,7 +652,7 @@ OBJS+= heathrow_pic.o grackle_pci.o ppc_oldworld.o
OBJS+= unin_pci.o ppc_chrp.o
# PowerPC 4xx boards
OBJS+= pflash_cfi02.o ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o
-OBJS+= ppc440.o
+OBJS+= ppc440.o ppc440_bamboo.o
ifdef CONFIG_KVM
OBJS+= kvm_ppc.o
endif
diff --git a/hw/boards.h b/hw/boards.h
index d30c0fc..debe9a6 100644
--- a/hw/boards.h
+++ b/hw/boards.h
@@ -38,6 +38,7 @@ extern QEMUMachine core99_machine;
extern QEMUMachine heathrow_machine;
extern QEMUMachine ref405ep_machine;
extern QEMUMachine taihu_machine;
+extern QEMUMachine bamboo_machine;
/* mips_r4k.c */
extern QEMUMachine mips_machine;
diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c
new file mode 100644
index 0000000..b0e3106
--- /dev/null
+++ b/hw/ppc440_bamboo.c
@@ -0,0 +1,190 @@
+/*
+ * Qemu PowerPC 440 board emulation
+ *
+ * Copyright 2007 IBM Corporation.
+ * Authors:
+ * Jerone Young <jyoung5@us.ibm.com>
+ * Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
+ * Hollis Blanchard <hollisb@us.ibm.com>
+ *
+ * This work is licensed under the GNU GPL license version 2 or later.
+ *
+ */
+
+#include "config.h"
+#include "qemu-common.h"
+#include "net.h"
+#include "hw.h"
+#include "pci.h"
+#include "virtio-blk.h"
+#include "boards.h"
+#include "sysemu.h"
+#include "ppc440.h"
+#include "kvm.h"
+#include "kvm_ppc.h"
+#include "device_tree.h"
+
+#define BINARY_DEVICE_TREE_FILE "bamboo.dtb"
+
+static void *bamboo_load_device_tree(void *addr,
+ uint32_t ramsize,
+ target_phys_addr_t initrd_base,
+ target_phys_addr_t initrd_size,
+ const char *kernel_cmdline)
+{
+ void *fdt = NULL;
+#ifdef HAVE_FDT
+ uint32_t mem_reg_property[] = { 0, 0, ramsize };
+ char *path = NULL;
+ int len;
+ int ret;
+
+ len = asprintf(&path, "%s/%s", bios_dir, BINARY_DEVICE_TREE_FILE);
+ if (len < 0) {
+ perror("asprintf");
+ return NULL;
+ }
+
+ fdt = load_device_tree(path, addr);
+ free(path);
+ if (fdt == NULL)
+ goto out;
+
+ /* Manipulate device tree in memory. */
+
+ ret = qemu_devtree_setprop(fdt, "/memory", "reg", mem_reg_property,
+ sizeof(mem_reg_property));
+ if (ret < 0)
+ fprintf(stderr, "couldn't set /memory/reg\n");
+
+ ret = qemu_devtree_setprop_cell(fdt, "/chosen", "linux,initrd-start",
+ initrd_base);
+ if (ret < 0)
+ fprintf(stderr, "couldn't set /chosen/linux,initrd-start\n");
+
+ ret = qemu_devtree_setprop_cell(fdt, "/chosen", "linux,initrd-end",
+ (initrd_base + initrd_size));
+ if (ret < 0)
+ fprintf(stderr, "couldn't set /chosen/linux,initrd-end\n");
+
+ ret = qemu_devtree_setprop_string(fdt, "/chosen", "bootargs",
+ kernel_cmdline);
+ if (ret < 0)
+ fprintf(stderr, "couldn't set /chosen/bootargs\n");
+
+ if (kvm_enabled())
+ kvmppc_fdt_update(fdt);
+
+out:
+#endif
+
+ return fdt;
+}
+
+static void bamboo_init(ram_addr_t ram_size, int vga_ram_size,
+ const char *boot_device, DisplayState *ds,
+ const char *kernel_filename,
+ const char *kernel_cmdline,
+ const char *initrd_filename,
+ const char *cpu_model)
+{
+ unsigned int pci_irq_nrs[4] = { 28, 27, 26, 25 };
+ NICInfo *nd;
+ PCIBus *pcibus;
+ CPUState *env;
+ uint64_t elf_entry;
+ uint64_t elf_lowaddr;
+ target_ulong entry = 0;
+ target_ulong loadaddr = 0;
+ target_long kernel_size = 0;
+ target_ulong initrd_base = 0;
+ target_long initrd_size = 0;
+ target_ulong dt_base = 0;
+ void *fdt;
+ int i;
+
+ /* Setup CPU. */
+ env = ppc440ep_init(&ram_size, &pcibus, pci_irq_nrs, 1);
+
+ if (pcibus) {
+ int unit_id = 0;
+
+ /* Add virtio block devices. */
+ while ((i = drive_get_index(IF_VIRTIO, 0, unit_id)) != -1) {
+ virtio_blk_init(pcibus, 0x1AF4, 0x1001,
+ drives_table[i].bdrv);
+ unit_id++;
+ }
+
+ /* Register network interfaces. */
+ for (i = 0; i < nb_nics; i++) {
+ nd = &nd_table[i];
+ if (!nd->model) {
+ /* There are no PCI NICs on the Bamboo board, but there are
+ * PCI slots, so we can pick model whatever we want. */
+ nd->model = "e1000";
+ }
+ pci_nic_init(pcibus, nd, -1);
+ }
+ }
+
+ /* Load kernel. */
+ if (kernel_filename) {
+ kernel_size = load_uimage(kernel_filename, &entry, &loadaddr, NULL);
+ if (kernel_size < 0) {
+ kernel_size = load_elf(kernel_filename, 0, &elf_entry, &elf_lowaddr,
+ NULL);
+ entry = elf_entry;
+ loadaddr = elf_lowaddr;
+ }
+ /* XXX try again as binary */
+ if (kernel_size < 0) {
+ fprintf(stderr, "qemu: could not load kernel '%s'\n",
+ kernel_filename);
+ exit(1);
+ }
+ }
+
+ /* Load initrd. */
+ if (initrd_filename) {
+ initrd_base = kernel_size + loadaddr;
+ initrd_size = load_image(initrd_filename, phys_ram_base + initrd_base);
+
+ if (initrd_size < 0) {
+ fprintf(stderr, "qemu: could not load initial ram disk '%s'\n",
+ initrd_filename);
+ exit(1);
+ }
+ }
+
+ /* If we're loading a kernel directly, we must load the device tree too. */
+ if (kernel_filename) {
+ if (initrd_base)
+ dt_base = initrd_base + initrd_size;
+ else
+ dt_base = kernel_size + loadaddr;
+
+ fdt = bamboo_load_device_tree(phys_ram_base + dt_base, ram_size,
+ initrd_base, initrd_size, kernel_cmdline);
+ if (fdt == NULL) {
+ fprintf(stderr, "couldn't load device tree\n");
+ exit(1);
+ }
+
+ /* Set initial guest state. */
+ env->gpr[1] = (16<<20) - 8;
+ env->gpr[3] = dt_base;
+ env->nip = entry;
+ /* XXX we currently depend on KVM to create some initial TLB entries. */
+ }
+
+ if (kvm_enabled())
+ kvmppc_init();
+}
+
+QEMUMachine bamboo_machine = {
+ .name = "bamboo",
+ .desc = "bamboo",
+ .init = bamboo_init,
+ .ram_require = 8<<20 | RAMSIZE_FIXED,
+};
diff --git a/pc-bios/bamboo.dtb b/pc-bios/bamboo.dtb
new file mode 100644
index 0000000000000000000000000000000000000000..81f971c64745aaf79152e1ed6f09e5d36137e461
GIT binary patch
literal 3163
zcmcImL5mzk6s|Ug7)f*!MATKBWg~i+W+!nr$w>!A=Hg)?!X8Alr@D5hN%wTy-Lvj4
z2qRv-_y<JrBKikB$>K%ul&il$FUf)@1qpuN>#Clb*$IMRL3O?Fy;rZk_o}+9?_GX)
zU#Uy)E2VBL_2ds2UqiowzV`6`kEcon-#|YDUT%R^oWuCIl^?_C@Y9g#LwpH+J<7E1
zj-qUo=YXw#V}+jay6BuAL}?OLrh?eUz6IG|>rHE;F3`nPoIQVtEf>ZnH#YhXdX4OO
z522%m_$l=Do%|D1?!4XY_j~W`&@$(7r-3c6-IsqkPZt+!Klt=;;NfG)9S?u8guha1
z230%%dk<63{bB42=s!=QIyo?q=KjAzX3ba!sYPb8ygUM$&l@i3xHm2jbx~ZKxyht9
zWjQVCQ0J4n%+u7AUag*m>qauly3<65sEsL<MNJIyWcv->)#Go`H24WnWgaK!T-NzO
zl;*J8D~khSfA5(y_f+z&;*yi;%e@nR&{=*oiOsD|pSD)II6D`*N6ls3+POtKa<N~5
zAnQWs)y1Oyrb<A4PC#>cQf54dnWuYyD0c90w%rSVeD)r2fZU=C0vc@{beD6Kd8><G
z*zav)eKh*I8mvKX^N6#^*<XYpv7qxJS#%~2sj64e87s((wjS4jB@T369E)r{Jb&&b
zo6DWpuSLh!f<Dq_c(Sw2Y{%eoBqyFT#%b$!?ytdjz=0WQ45Gh=QFub<@wCYD^!#1@
zu410QZ;a<-pF271+O>Ut=b>l5QoG8ONt6!E-pyX`^`5+O^koji#s;a)Pi;)9>o>Qz
zTR-qpcTPXz6z;LhIk;hUGzbs%?Fq!z{)P&E^6|R>u4c@Yb!2loj(qpX`3&#=f9B1w
z%e+PRXx^ML&tnyD)^?dU;|cHNhHi>|t06s)rG~HpE}oBM;d^J1Js&{M-|hpqO+8~{
zfJ3l~A9;}9BA?s;2OrY<S3d525k4l1ba<R4NmHfRvSR&swudx@a#`#}dVU}AyvX|`
z_W1?jpsg4oJewNZnq4Md{Jv_eu6xpGMC1Cb*|5+Oz+$-{mcJd$!}&uLnfN7i;mGeX
zudtB8c#ZLMZ3A0>48aFh=F28`=7SSR&3RQ1?ukrJ3-ake^n7wn{AUFn5@P#Wp7XH-
zO!9vF-GRoy82B~^<}IgR8fOir-x~Z1rT$#<5FXG6pIhp_o&5Rj$6jFiVxw&x9k%Bd
zEzMrM(AYYwY|l3~IpcD!^f<4~L|n-g_TbAc)O`z=!Pbh8AbdEF{o-a6$EB&NP@6QZ
z)Mk|&8!KmdY*MB3tib=#C^ah9WmrU|nbfL@+Oy+z6`O-Zn-A-w!l=^hE1l;0Zn#&P
zkEdp$k5rvxW`v(lPnCo^(qj{*$;5<QR>fyD&S$~g0C1WAO$oI~YbKJJdYs1!VW)@P
zVjN9kP+#>6rkFC`x7ZxYeDdD(9Hk&-G}*^5bE~e@K~mP!C=DgeX~}YgRbfm#cXCxK
i$|Q^M*T}1WIZ&8I1$uSYn+BETUDa_utr4dltA7BYxVh&5
literal 0
HcmV?d00001
diff --git a/pc-bios/bamboo.dts b/pc-bios/bamboo.dts
new file mode 100644
index 0000000..655442c
--- /dev/null
+++ b/pc-bios/bamboo.dts
@@ -0,0 +1,234 @@
+/*
+ * Device Tree Source for AMCC Bamboo
+ *
+ * Copyright (c) 2006, 2007 IBM Corp.
+ * Josh Boyer <jwboyer@linux.vnet.ibm.com>
+ *
+ * This file is licensed under the terms of the GNU General Public
+ * License version 2. This program is licensed "as is" without
+ * any warranty of any kind, whether express or implied.
+ */
+
+/ {
+ #address-cells = <2>;
+ #size-cells = <1>;
+ model = "amcc,bamboo";
+ compatible = "amcc,bamboo";
+ dcr-parent = <&/cpus/cpu@0>;
+
+ aliases {
+ serial0 = &UART0;
+ serial1 = &UART1;
+ };
+
+ cpus {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ cpu@0 {
+ device_type = "cpu";
+ model = "PowerPC,440EP";
+ reg = <0>;
+ clock-frequency = <1fca0550>;
+ timebase-frequency = <017d7840>;
+ i-cache-line-size = <20>;
+ d-cache-line-size = <20>;
+ i-cache-size = <8000>;
+ d-cache-size = <8000>;
+ dcr-controller;
+ dcr-access-method = "native";
+ };
+ };
+
+ memory {
+ device_type = "memory";
+ reg = <0 0 9000000>;
+ };
+
+ UIC0: interrupt-controller0 {
+ compatible = "ibm,uic-440ep","ibm,uic";
+ interrupt-controller;
+ cell-index = <0>;
+ dcr-reg = <0c0 009>;
+ #address-cells = <0>;
+ #size-cells = <0>;
+ #interrupt-cells = <2>;
+ };
+/*
+ UIC1: interrupt-controller1 {
+ compatible = "ibm,uic-440ep","ibm,uic";
+ interrupt-controller;
+ cell-index = <1>;
+ dcr-reg = <0d0 009>;
+ #address-cells = <0>;
+ #size-cells = <0>;
+ #interrupt-cells = <2>;
+ interrupts = <1e 4 1f 4>;
+ interrupt-parent = <&UIC0>;
+ };
+*/
+
+ SDR0: sdr {
+ compatible = "ibm,sdr-440ep";
+ dcr-reg = <00e 002>;
+ };
+
+ CPR0: cpr {
+ compatible = "ibm,cpr-440ep";
+ dcr-reg = <00c 002>;
+ };
+
+ plb {
+ compatible = "ibm,plb-440ep", "ibm,plb-440gp", "ibm,plb4";
+ #address-cells = <2>;
+ #size-cells = <1>;
+ ranges;
+ clock-frequency = <07f28154>;
+
+ SDRAM0: sdram {
+ compatible = "ibm,sdram-440ep", "ibm,sdram-405gp";
+ dcr-reg = <010 2>;
+ };
+
+ DMA0: dma {
+ compatible = "ibm,dma-440ep", "ibm,dma-440gp";
+ dcr-reg = <100 027>;
+ };
+
+ POB0: opb {
+ compatible = "ibm,opb-440ep", "ibm,opb-440gp", "ibm,opb";
+ #address-cells = <1>;
+ #size-cells = <1>;
+ /* Bamboo is oddball in the 44x world and doesn't use the ERPN
+ * bits.
+ */
+ ranges = <00000000 0 00000000 80000000
+ 80000000 0 80000000 80000000>;
+ /* interrupt-parent = <&UIC1>; */
+ interrupts = <7 4>;
+ clock-frequency = <03f940aa>;
+
+ EBC0: ebc {
+ compatible = "ibm,ebc-440ep", "ibm,ebc-440gp", "ibm,ebc";
+ dcr-reg = <012 2>;
+ #address-cells = <2>;
+ #size-cells = <1>;
+ clock-frequency = <03f940aa>;
+ interrupts = <5 1>;
+ /* interrupt-parent = <&UIC1>; */
+ };
+
+ UART0: serial@ef600300 {
+ device_type = "serial";
+ compatible = "ns16550";
+ reg = <ef600300 8>;
+ virtual-reg = <ef600300>;
+ clock-frequency = <00a8c000>;
+ current-speed = <1c200>;
+ interrupt-parent = <&UIC0>;
+ interrupts = <0 4>;
+ };
+
+ UART1: serial@ef600400 {
+ device_type = "serial";
+ compatible = "ns16550";
+ reg = <ef600400 8>;
+ virtual-reg = <ef600400>;
+ clock-frequency = <00a8c000>;
+ current-speed = <0>;
+ interrupt-parent = <&UIC0>;
+ interrupts = <1 4>;
+ };
+/*
+ UART2: serial@ef600500 {
+ device_type = "serial";
+ compatible = "ns16550";
+ reg = <ef600500 8>;
+ virtual-reg = <ef600500>;
+ clock-frequency = <0>;
+ current-speed = <0>;
+ interrupt-parent = <&UIC0>;
+ interrupts = <3 4>;
+ };
+
+ UART3: serial@ef600600 {
+ device_type = "serial";
+ compatible = "ns16550";
+ reg = <ef600600 8>;
+ virtual-reg = <ef600600>;
+ clock-frequency = <0>;
+ current-speed = <0>;
+ interrupt-parent = <&UIC0>;
+ interrupts = <4 4>;
+ };
+
+*/
+ IIC0: i2c@ef600700 {
+ device_type = "i2c";
+ compatible = "ibm,iic-440ep", "ibm,iic-440gp", "ibm,iic";
+ reg = <ef600700 14>;
+ interrupt-parent = <&UIC0>;
+ interrupts = <2 4>;
+ };
+
+ IIC1: i2c@ef600800 {
+ device_type = "i2c";
+ compatible = "ibm,iic-440ep", "ibm,iic-440gp", "ibm,iic";
+ reg = <ef600800 14>;
+ interrupt-parent = <&UIC0>;
+ interrupts = <7 4>;
+ };
+
+ ZMII0: emac-zmii@ef600d00 {
+ device_type = "zmii-interface";
+ compatible = "ibm,zmii-440ep", "ibm,zmii-440gp", "ibm,zmii";
+ reg = <ef600d00 c>;
+ };
+
+ };
+
+ PCI0: pci@ec000000 {
+ device_type = "pci";
+ #interrupt-cells = <1>;
+ #size-cells = <2>;
+ #address-cells = <3>;
+ compatible = "ibm,plb440ep-pci", "ibm,plb-pci";
+ primary;
+ reg = <0 eec00000 8 /* Config space access */
+ 0 eed00000 4 /* IACK */
+ 0 eed00000 4 /* Special cycle */
+ 0 ef400000 40>; /* Internal registers */
+
+ /* Outbound ranges, one memory and one IO,
+ * later cannot be changed. Chip supports a second
+ * IO range but we don't use it for now
+ */
+ ranges = <02000000 0 a0000000 0 a0000000 0 20000000
+ 01000000 0 00000000 0 e8000000 0 00010000>;
+
+ /* Inbound 2GB range starting at 0 */
+ dma-ranges = <42000000 0 0 0 0 0 80000000>;
+
+ /* Bamboo has all 4 IRQ pins tied together per slot */
+ interrupt-map-mask = <f800 0 0 0>;
+ interrupt-map = <
+ /* IDSEL 1 */
+ 0800 0 0 0 &UIC0 1c 8
+
+ /* IDSEL 2 */
+ 1000 0 0 0 &UIC0 1b 8
+
+ /* IDSEL 3 */
+ 1800 0 0 0 &UIC0 1a 8
+
+ /* IDSEL 4 */
+ 2000 0 0 0 &UIC0 19 8
+ >;
+ };
+
+ };
+
+ chosen {
+ linux,stdout-path = "/plb/opb/serial@ef600300";
+ };
+};
diff --git a/target-ppc/machine.c b/target-ppc/machine.c
index be0cbe1..72f67d0 100644
--- a/target-ppc/machine.c
+++ b/target-ppc/machine.c
@@ -1,5 +1,6 @@
#include "hw/hw.h"
#include "hw/boards.h"
+#include "kvm.h"
void register_machines(void)
{
@@ -8,6 +9,7 @@ void register_machines(void)
qemu_register_machine(&prep_machine);
qemu_register_machine(&ref405ep_machine);
qemu_register_machine(&taihu_machine);
+ qemu_register_machine(&bamboo_machine);
}
void cpu_save(QEMUFile *f, void *opaque)
--
1.5.6.5
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Qemu-devel] Re: [PATCH 2/6] kvm: sync vcpu state during initialization
2008-12-11 20:52 ` [Qemu-devel] [PATCH 2/6] kvm: sync vcpu state during initialization Hollis Blanchard
@ 2008-12-11 20:57 ` Hollis Blanchard
2008-12-11 21:24 ` [Qemu-devel] " Anthony Liguori
1 sibling, 0 replies; 22+ messages in thread
From: Hollis Blanchard @ 2008-12-11 20:57 UTC (permalink / raw)
To: qemu-devel; +Cc: kvm-ppc
On Thu, 2008-12-11 at 14:52 -0600, Hollis Blanchard wrote:
> Currently on x86, qemu initializes CPUState but KVM ignores it and does its
> own vcpu initialization. However, PowerPC KVM needs to be able to set the
> initial register state to support the -kernel and -append options.
>
> Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
I forgot to comment that since this changes x86 code flow, it's worth
testing with x86 KVM before committing.
--
Hollis Blanchard
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 3/6] Enable KVM for ppcemb.
2008-12-11 20:52 ` [Qemu-devel] [PATCH 3/6] Enable KVM for ppcemb Hollis Blanchard
@ 2008-12-11 21:19 ` Blue Swirl
2008-12-12 0:04 ` Hollis Blanchard
2008-12-11 21:30 ` Anthony Liguori
1 sibling, 1 reply; 22+ messages in thread
From: Blue Swirl @ 2008-12-11 21:19 UTC (permalink / raw)
To: qemu-devel
On 12/11/08, Hollis Blanchard <hollisb@us.ibm.com> wrote:
> Implement hooks called by generic KVM code.
>
> Also add code that will copy the host's CPU and timebase frequencies to the
> guest, which is necessary on KVM because the guest can directly access the
> timebase.
>
> Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
> +int kvm_arch_put_registers(CPUState *env)
> +{
> + struct kvm_regs regs;
> + int ret;
> + int i;
> +
> + ret = kvm_vcpu_ioctl(env, KVM_GET_REGS, ®s);
> + if (ret < 0)
> + return ret;
> +
> + /* cr is untouched in qemu and not existant in CPUState fr ppr */
> + /* hflags is a morphed to MSR on ppc, no need to sync that down to kvm */
> +
> + regs.pc = env->nip;
> +
> + regs.ctr = env->ctr;
> + regs.lr = env->lr;
> + regs.xer = env->xer;
> + regs.msr = env->msr;
> +
> + regs.srr0 = env->spr[SPR_SRR0];
> + regs.srr1 = env->spr[SPR_SRR1];
> +
> + regs.sprg0 = env->spr[SPR_SPRG0];
> + regs.sprg1 = env->spr[SPR_SPRG1];
> + regs.sprg2 = env->spr[SPR_SPRG2];
> + regs.sprg3 = env->spr[SPR_SPRG3];
> + regs.sprg4 = env->spr[SPR_SPRG4];
> + regs.sprg5 = env->spr[SPR_SPRG5];
> + regs.sprg6 = env->spr[SPR_SPRG6];
> + regs.sprg7 = env->spr[SPR_SPRG7];
> +
> + for (i = 0;i < 32; i++)
> + regs.gpr[i] = env->gpr[i];
> +
> + ret = kvm_vcpu_ioctl(env, KVM_SET_REGS, ®s);
> + if (ret < 0)
> + return ret;
> +
> + return ret;
> +}
Maybe this is a dumb question, but why don't you get/put floating
point registers?
> +#include "device_tree.h"
The sequencing is not correct, you introduce FDT in #4.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 2/6] kvm: sync vcpu state during initialization
2008-12-11 20:52 ` [Qemu-devel] [PATCH 2/6] kvm: sync vcpu state during initialization Hollis Blanchard
2008-12-11 20:57 ` [Qemu-devel] " Hollis Blanchard
@ 2008-12-11 21:24 ` Anthony Liguori
2008-12-13 0:23 ` Hollis Blanchard
1 sibling, 1 reply; 22+ messages in thread
From: Anthony Liguori @ 2008-12-11 21:24 UTC (permalink / raw)
To: qemu-devel; +Cc: kvm-ppc
Hollis Blanchard wrote:
> Currently on x86, qemu initializes CPUState but KVM ignores it and does its
> own vcpu initialization. However, PowerPC KVM needs to be able to set the
> initial register state to support the -kernel and -append options.
>
> Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
>
Segv's x86 when using -enable-kvm.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 6/6] IBM PowerPC 440EP Bamboo reference board emulation
2008-12-11 20:52 ` [Qemu-devel] [PATCH 6/6] IBM PowerPC 440EP Bamboo reference board emulation Hollis Blanchard
@ 2008-12-11 21:25 ` Blue Swirl
2008-12-11 21:39 ` Anthony Liguori
1 sibling, 0 replies; 22+ messages in thread
From: Blue Swirl @ 2008-12-11 21:25 UTC (permalink / raw)
To: qemu-devel; +Cc: kvm-ppc
On 12/11/08, Hollis Blanchard <hollisb@us.ibm.com> wrote:
> Since most IO devices are integrated into the 440EP chip, "Bamboo support"
> mostly entails implementing the -kernel, -initrd, and -append options.
>
> These options are implemented by loading the guest as if u-boot had done it,
> i.e. loading a flat device tree, updating it to hold initrd addresses, ram
> size, and command line, and passing the FDT address in r3.
>
> Since we use it with KVM, we enable the virtio block driver and include hooks
> necessary for KVM support.
>
> Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
> --- a/target-ppc/machine.c
> +++ b/target-ppc/machine.c
> @@ -1,5 +1,6 @@
> #include "hw/hw.h"
> #include "hw/boards.h"
> +#include "kvm.h"
Shouldn't be necessary?
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 3/6] Enable KVM for ppcemb.
2008-12-11 20:52 ` [Qemu-devel] [PATCH 3/6] Enable KVM for ppcemb Hollis Blanchard
2008-12-11 21:19 ` Blue Swirl
@ 2008-12-11 21:30 ` Anthony Liguori
2008-12-11 22:54 ` Hollis Blanchard
1 sibling, 1 reply; 22+ messages in thread
From: Anthony Liguori @ 2008-12-11 21:30 UTC (permalink / raw)
To: qemu-devel; +Cc: kvm-ppc
Hollis Blanchard wrote:
> Implement hooks called by generic KVM code.
>
> Also add code that will copy the host's CPU and timebase frequencies to the
> guest, which is necessary on KVM because the guest can directly access the
> timebase.
>
> Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
> ---
> Makefile.target | 3 +
> configure | 6 ++
> target-ppc/helper.c | 5 +
> target-ppc/kvm.c | 212 ++++++++++++++++++++++++++++++++++++++++++++++++++
> target-ppc/kvm_ppc.c | 105 +++++++++++++++++++++++++
> target-ppc/kvm_ppc.h | 15 ++++
> 6 files changed, 346 insertions(+), 0 deletions(-)
> create mode 100644 target-ppc/kvm.c
> create mode 100644 target-ppc/kvm_ppc.c
> create mode 100644 target-ppc/kvm_ppc.h
>
> diff --git a/Makefile.target b/Makefile.target
> index 7152dff..d01231d 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -652,6 +652,9 @@ OBJS+= heathrow_pic.o grackle_pci.o ppc_oldworld.o
> OBJS+= unin_pci.o ppc_chrp.o
> # PowerPC 4xx boards
> OBJS+= pflash_cfi02.o ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o
> +ifdef CONFIG_KVM
> +OBJS+= kvm_ppc.o
> +endif
>
Shouldn't you be kvm.o? If your file lives in target-ppc/kvm.c, it'll
just work.
> diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
> new file mode 100644
> index 0000000..90b943b
> --- /dev/null
> +++ b/target-ppc/kvm.c
> @@ -0,0 +1,212 @@
> +int kvm_arch_put_registers(CPUState *env)
> +{
> + struct kvm_regs regs;
> + int ret;
> + int i;
>
Your indent is off.
> +int kvm_arch_get_registers(CPUState *env)
> +{
> + struct kvm_regs regs;
> + uint32_t i, ret;
> +
> + ret = kvm_vcpu_ioctl(env, KVM_GET_REGS, ®s);
> + if (ret < 0)
> + return ret;
> +
> + env->ctr = regs.ctr;
> + env->lr = regs.lr;
> + env->xer = regs.xer;
> + env->msr = regs.msr;
> + /* calculate hflags based on the current msr using the ppc qemu helper */
> + hreg_compute_hflags(env);
>
Do you need this? Practically speaking, I don't even think we need to
maintain them on x86 anymore.
> diff --git a/target-ppc/kvm_ppc.c b/target-ppc/kvm_ppc.c
> new file mode 100644
> index 0000000..b2b56df
> --- /dev/null
> +++ b/target-ppc/kvm_ppc.c
>
Hence my confusion. These are just kvm related helper?
I don't know that kvm_ppc.c is a very information name for this sort of
stuff. Since this is really host specific, not target specific, why not
move it out of target-ppc.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 4/6] Implement device tree support needed for Bamboo emulation
2008-12-11 20:52 ` [Qemu-devel] [PATCH 4/6] Implement device tree support needed for Bamboo emulation Hollis Blanchard
@ 2008-12-11 21:33 ` Anthony Liguori
0 siblings, 0 replies; 22+ messages in thread
From: Anthony Liguori @ 2008-12-11 21:33 UTC (permalink / raw)
To: qemu-devel; +Cc: kvm-ppc
Hollis Blanchard wrote:
> diff --git a/device_tree.c b/device_tree.c
> new file mode 100644
> index 0000000..d7350e3
> --- /dev/null
> +++ b/device_tree.c
> @@ -0,0 +1,116 @@
> +/*
> + * Functions to help device tree manipulation using libfdt.
> + * It also provides functions to read entries from device tree proc
> + * interface.
> + *
> + * Copyright 2008 IBM Corporation.
> + * Authors: Jerone Young <jyoung5@us.ibm.com>
> + * Hollis Blanchard <hollisb@us.ibm.com>
> + *
> + * This work is licensed under the GNU GPL license version 2 or later.
> + *
> + */
> +
> +#include <stdio.h>
> +#include <sys/types.h>
> +#include <sys/stat.h>
> +#include <fcntl.h>
> +#include <unistd.h>
> +#include <stdlib.h>
> +
> +#include "config.h"
> +#include "qemu-common.h"
> +#include "sysemu.h"
> +#include "device_tree.h"
> +
> +#include "libfdt.h"
>
#include <libfdt.h>
> +void *load_device_tree(const char *filename_path, void *load_addr)
> +{
> + int dt_file_size;
> + int dt_file_load_size;
> + int new_dt_size;
> + int ret;
> + void *dt_file = NULL;
> + void *fdt;
> +
> + dt_file_size = get_image_size(filename_path);
> + if (dt_file_size < 0) {
> + printf("Unable to get size of device tree file '%s'\n",
> + filename_path);
> + goto fail;
> + }
> +
> + /* First allocate space in qemu for device tree */
> + dt_file = qemu_malloc(dt_file_size);
> + if (dt_file == NULL) {
> + printf("Unable to allocate memory in qemu for device tree\n");
> + goto fail;
> + }
> + memset(dt_file, 0, dt_file_size);
>
>
qemu_mallocz(). Indent is still bad.
> + dt_file_load_size = load_image(filename_path, dt_file);
> +
> + /* Second we place new copy of 2x size in guest memory
> + * This give us enough room for manipulation.
> + */
> + new_dt_size = dt_file_size * 2;
> +
> + fdt = load_addr;
> + ret = fdt_open_into(dt_file, fdt, new_dt_size);
> + if (ret) {
> + printf("Unable to copy device tree in memory\n");
> + goto fail;
> + }
> +
> + /* Check sanity of device tree */
> + if (fdt_check_header(fdt)) {
> + printf ("Device tree file loaded into memory is invalid: %s\n",
> + filename_path);
> + goto fail;
> + }
> + /* free qemu memory with old device tree */
> + qemu_free(dt_file);
> + return fdt;
> +
> +fail:
> + if (dt_file)
> + qemu_free(dt_file);
>
free() can safely take a NULL value.
> + return NULL;
> +}
> +
> +int qemu_devtree_setprop(void *fdt, const char *node_path,
> + const char *property, uint32_t *val_array, int size)
> +{
> + int offset;
> +
> + offset = fdt_path_offset(fdt, node_path);
> + if (offset < 0)
> + return offset;
>
This is just goofy :-)
> diff --git a/device_tree.h b/device_tree.h
> new file mode 100644
> index 0000000..9e6ef3d
> --- /dev/null
> +++ b/device_tree.h
> @@ -0,0 +1,26 @@
> +/*
> + * Header with function prototypes to help device tree manipulation using
> + * libfdt. It also provides functions to read entries from device tree proc
> + * interface.
> + *
> + * Copyright 2008 IBM Corporation.
> + * Authors: Jerone Young <jyoung5@us.ibm.com>
> + * Hollis Blanchard <hollisb@us.ibm.com>
> + *
> + * This work is licensed under the GNU GPL license version 2 or later.
> + *
> + */
> +
> +#ifndef __DEVICE_TREE_H__
> +#define __DEVICE_TREE_H__
> +
> +void *load_device_tree(const char *filename_path, void *load_addr);
> +
> +int qemu_devtree_setprop(void *fdt, const char *node_path,
> + const char *property, uint32_t *val_array, int size);
> +int qemu_devtree_setprop_cell(void *fdt, const char *node_path,
> + const char *property, uint32_t val);
> +int qemu_devtree_setprop_string(void *fdt, const char *node_path,
> + const char *property, const char *string);
> +
> +#endif /* __DEVICE_TREE_H__ */
> diff --git a/libfdt_env.h b/libfdt_env.h
> new file mode 100644
> index 0000000..59f2536
> --- /dev/null
> +++ b/libfdt_env.h
>
Missing copyright?
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 6/6] IBM PowerPC 440EP Bamboo reference board emulation
2008-12-11 20:52 ` [Qemu-devel] [PATCH 6/6] IBM PowerPC 440EP Bamboo reference board emulation Hollis Blanchard
2008-12-11 21:25 ` Blue Swirl
@ 2008-12-11 21:39 ` Anthony Liguori
2008-12-11 23:08 ` Hollis Blanchard
1 sibling, 1 reply; 22+ messages in thread
From: Anthony Liguori @ 2008-12-11 21:39 UTC (permalink / raw)
To: qemu-devel; +Cc: kvm-ppc
Hollis Blanchard wrote:
> Since most IO devices are integrated into the 440EP chip, "Bamboo support"
> mostly entails implementing the -kernel, -initrd, and -append options.
>
> These options are implemented by loading the guest as if u-boot had done it,
> i.e. loading a flat device tree, updating it to hold initrd addresses, ram
> size, and command line, and passing the FDT address in r3.
>
> Since we use it with KVM, we enable the virtio block driver and include hooks
> necessary for KVM support.
>
> Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
> ---
> Makefile | 2 +-
> Makefile.target | 2 +-
> hw/boards.h | 1 +
> hw/ppc440_bamboo.c | 190 ++++++++++++++++++++++++++++++++++++++++
> pc-bios/bamboo.dtb | Bin 0 -> 3163 bytes
> pc-bios/bamboo.dts | 234 ++++++++++++++++++++++++++++++++++++++++++++++++++
> target-ppc/machine.c | 2 +
> 7 files changed, 429 insertions(+), 2 deletions(-)
> create mode 100644 hw/ppc440_bamboo.c
> create mode 100644 pc-bios/bamboo.dtb
> create mode 100644 pc-bios/bamboo.dts
>
> diff --git a/Makefile b/Makefile
> index a2a03ec..f9496fe 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -219,7 +219,7 @@ common de-ch es fo fr-ca hu ja mk nl-be pt sl tr
> ifdef INSTALL_BLOBS
> BLOBS=bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
> video.x openbios-sparc32 openbios-sparc64 pxe-ne2k_pci.bin \
> -pxe-rtl8139.bin pxe-pcnet.bin pxe-e1000.bin
> +pxe-rtl8139.bin pxe-pcnet.bin pxe-e1000.bin bamboo.dtb
> else
> BLOBS=
> endif
> diff --git a/Makefile.target b/Makefile.target
> index 6032af0..82bc746 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -652,7 +652,7 @@ OBJS+= heathrow_pic.o grackle_pci.o ppc_oldworld.o
> OBJS+= unin_pci.o ppc_chrp.o
> # PowerPC 4xx boards
> OBJS+= pflash_cfi02.o ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o
> -OBJS+= ppc440.o
> +OBJS+= ppc440.o ppc440_bamboo.o
> ifdef CONFIG_KVM
> OBJS+= kvm_ppc.o
> endif
> diff --git a/hw/boards.h b/hw/boards.h
> index d30c0fc..debe9a6 100644
> --- a/hw/boards.h
> +++ b/hw/boards.h
> @@ -38,6 +38,7 @@ extern QEMUMachine core99_machine;
> extern QEMUMachine heathrow_machine;
> extern QEMUMachine ref405ep_machine;
> extern QEMUMachine taihu_machine;
> +extern QEMUMachine bamboo_machine;
>
> /* mips_r4k.c */
> extern QEMUMachine mips_machine;
> diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c
> new file mode 100644
> index 0000000..b0e3106
> --- /dev/null
> +++ b/hw/ppc440_bamboo.c
> @@ -0,0 +1,190 @@
> +/*
> + * Qemu PowerPC 440 board emulation
> + *
> + * Copyright 2007 IBM Corporation.
> + * Authors:
> + * Jerone Young <jyoung5@us.ibm.com>
> + * Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
> + * Hollis Blanchard <hollisb@us.ibm.com>
> + *
> + * This work is licensed under the GNU GPL license version 2 or later.
> + *
> + */
> +
> +#include "config.h"
> +#include "qemu-common.h"
> +#include "net.h"
> +#include "hw.h"
> +#include "pci.h"
> +#include "virtio-blk.h"
> +#include "boards.h"
> +#include "sysemu.h"
> +#include "ppc440.h"
> +#include "kvm.h"
> +#include "kvm_ppc.h"
> +#include "device_tree.h"
> +
> +#define BINARY_DEVICE_TREE_FILE "bamboo.dtb"
> +
> +static void *bamboo_load_device_tree(void *addr,
> + uint32_t ramsize,
> + target_phys_addr_t initrd_base,
> + target_phys_addr_t initrd_size,
> + const char *kernel_cmdline)
> +{
> + void *fdt = NULL;
> +#ifdef HAVE_FDT
>
Is this at all usable without libfdt? If not, just don't compile this
board in unless libfdt is present.
> + uint32_t mem_reg_property[] = { 0, 0, ramsize };
> + char *path = NULL;
> + int len;
> + int ret;
> +
> + len = asprintf(&path, "%s/%s", bios_dir, BINARY_DEVICE_TREE_FILE);
>
asprintf() is a GNU-ism and won't compile on Win32.
> diff --git a/target-ppc/machine.c b/target-ppc/machine.c
> index be0cbe1..72f67d0 100644
> --- a/target-ppc/machine.c
> +++ b/target-ppc/machine.c
> @@ -1,5 +1,6 @@
> #include "hw/hw.h"
> #include "hw/boards.h"
> +#include "kvm.h"
Is this necessary?
>
> void register_machines(void)
> {
> @@ -8,6 +9,7 @@ void register_machines(void)
> qemu_register_machine(&prep_machine);
> qemu_register_machine(&ref405ep_machine);
> qemu_register_machine(&taihu_machine);
> + qemu_register_machine(&bamboo_machine);
> }
>
> void cpu_save(QEMUFile *f, void *opaque)
>
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 3/6] Enable KVM for ppcemb.
2008-12-11 21:30 ` Anthony Liguori
@ 2008-12-11 22:54 ` Hollis Blanchard
2008-12-14 1:37 ` Hollis Blanchard
0 siblings, 1 reply; 22+ messages in thread
From: Hollis Blanchard @ 2008-12-11 22:54 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel, kvm-ppc
On Thu, 2008-12-11 at 15:30 -0600, Anthony Liguori wrote:
> Hollis Blanchard wrote:
> > +int kvm_arch_get_registers(CPUState *env)
> > +{
> > + struct kvm_regs regs;
> > + uint32_t i, ret;
> > +
> > + ret = kvm_vcpu_ioctl(env, KVM_GET_REGS, ®s);
> > + if (ret < 0)
> > + return ret;
> > +
> > + env->ctr = regs.ctr;
> > + env->lr = regs.lr;
> > + env->xer = regs.xer;
> > + env->msr = regs.msr;
> > + /* calculate hflags based on the current msr using the ppc qemu helper */
> > + hreg_compute_hflags(env);
> >
>
> Do you need this? Practically speaking, I don't even think we need to
> maintain them on x86 anymore.
Ah, it seems you're right. That's good.
> > diff --git a/target-ppc/kvm_ppc.c b/target-ppc/kvm_ppc.c
> > new file mode 100644
> > index 0000000..b2b56df
> > --- /dev/null
> > +++ b/target-ppc/kvm_ppc.c
> >
>
> Hence my confusion. These are just kvm related helper?
>
> I don't know that kvm_ppc.c is a very information name for this sort of
> stuff. Since this is really host specific, not target specific, why not
> move it out of target-ppc.
I could combine kvm_ppc.c into target-ppc/kvm.c. However, they're really
two different things, and I thought it would cause the least confusion
if they were logically separate. Most of it is hooks required by common
code, and then some of it isn't. (I'm thinking about e.g. IA64 doing a
copy/paste, and then wondering which functions they actually need to
implement.) Regardless, I will still need a kvm_ppc.h, so kvm_ppc.c
seemed like a good place to match.
I don't see that you can call any KVM code either host- or
target-specific, since by definition they are the same.
--
Hollis Blanchard
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 6/6] IBM PowerPC 440EP Bamboo reference board emulation
2008-12-11 21:39 ` Anthony Liguori
@ 2008-12-11 23:08 ` Hollis Blanchard
0 siblings, 0 replies; 22+ messages in thread
From: Hollis Blanchard @ 2008-12-11 23:08 UTC (permalink / raw)
To: qemu-devel; +Cc: kvm-ppc
On Thu, 2008-12-11 at 15:39 -0600, Anthony Liguori wrote:
> Hollis Blanchard wrote:
> > +
> > +#define BINARY_DEVICE_TREE_FILE "bamboo.dtb"
> > +
> > +static void *bamboo_load_device_tree(void *addr,
> > + uint32_t ramsize,
> > + target_phys_addr_t initrd_base,
> > + target_phys_addr_t initrd_size,
> > + const char *kernel_cmdline)
> > +{
> > + void *fdt = NULL;
> > +#ifdef HAVE_FDT
> >
>
> Is this at all usable without libfdt? If not, just don't compile this
> board in unless libfdt is present.
In practice, we've only tested with the -kernel option, which does
require libfdt.
However, in theory there is nothing that precludes running a firmware
(such as u-boot) inside the KVM guest. Jean-Christophe is working on
improving the ppc4xx device emulation so that becomes possible in the
future.
--
Hollis Blanchard
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 3/6] Enable KVM for ppcemb.
2008-12-11 21:19 ` Blue Swirl
@ 2008-12-12 0:04 ` Hollis Blanchard
0 siblings, 0 replies; 22+ messages in thread
From: Hollis Blanchard @ 2008-12-12 0:04 UTC (permalink / raw)
To: qemu-devel
On Thu, 2008-12-11 at 23:19 +0200, Blue Swirl wrote:
> > +int kvm_arch_put_registers(CPUState *env)
> > +{
> > + struct kvm_regs regs;
> > + int ret;
> > + int i;
> > +
> > + ret = kvm_vcpu_ioctl(env, KVM_GET_REGS, ®s);
> > + if (ret < 0)
> > + return ret;
> > +
> > + /* cr is untouched in qemu and not existant in CPUState fr
> ppr */
> > + /* hflags is a morphed to MSR on ppc, no need to sync that
> down to kvm */
> > +
> > + regs.pc = env->nip;
> > +
> > + regs.ctr = env->ctr;
> > + regs.lr = env->lr;
> > + regs.xer = env->xer;
> > + regs.msr = env->msr;
> > +
> > + regs.srr0 = env->spr[SPR_SRR0];
> > + regs.srr1 = env->spr[SPR_SRR1];
> > +
> > + regs.sprg0 = env->spr[SPR_SPRG0];
> > + regs.sprg1 = env->spr[SPR_SPRG1];
> > + regs.sprg2 = env->spr[SPR_SPRG2];
> > + regs.sprg3 = env->spr[SPR_SPRG3];
> > + regs.sprg4 = env->spr[SPR_SPRG4];
> > + regs.sprg5 = env->spr[SPR_SPRG5];
> > + regs.sprg6 = env->spr[SPR_SPRG6];
> > + regs.sprg7 = env->spr[SPR_SPRG7];
> > +
> > + for (i = 0;i < 32; i++)
> > + regs.gpr[i] = env->gpr[i];
> > +
> > + ret = kvm_vcpu_ioctl(env, KVM_SET_REGS, ®s);
> > + if (ret < 0)
> > + return ret;
> > +
> > + return ret;
> > +}
>
> Maybe this is a dumb question, but why don't you get/put floating
> point registers?
Not a dumb question. Qemu won't change the floating point registers at
all, so there is no need to push to KVM. For debugging purposes ("info
registers" or gdbstub) it might be nice to pull the FP state from KVM,
but we simply haven't needed to do that so far.
--
Hollis Blanchard
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 2/6] kvm: sync vcpu state during initialization
2008-12-11 21:24 ` [Qemu-devel] " Anthony Liguori
@ 2008-12-13 0:23 ` Hollis Blanchard
2008-12-13 0:24 ` Hollis Blanchard
0 siblings, 1 reply; 22+ messages in thread
From: Hollis Blanchard @ 2008-12-13 0:23 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel, kvm-ppc
On Thu, 2008-12-11 at 15:24 -0600, Anthony Liguori wrote:
> Hollis Blanchard wrote:
> > Currently on x86, qemu initializes CPUState but KVM ignores it and does its
> > own vcpu initialization. However, PowerPC KVM needs to be able to set the
> > initial register state to support the -kernel and -append options.
> >
> > Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
> >
>
> Segv's x86 when using -enable-kvm.
qemu.git already segvs on x86 with --enable-kvm unless you specify a
-cpu option. (I'd call that a bug.) Maybe you forgot that on this run?
When I use "-cpu coreduo" (for some strange reason "core2duo" is not
recognized), I don't segfault.
--
Hollis Blanchard
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 2/6] kvm: sync vcpu state during initialization
2008-12-13 0:23 ` Hollis Blanchard
@ 2008-12-13 0:24 ` Hollis Blanchard
2008-12-13 16:37 ` Anthony Liguori
0 siblings, 1 reply; 22+ messages in thread
From: Hollis Blanchard @ 2008-12-13 0:24 UTC (permalink / raw)
To: Anthony Liguori; +Cc: qemu-devel, kvm-ppc
On Fri, 2008-12-12 at 18:23 -0600, Hollis Blanchard wrote:
>
> When I use "-cpu coreduo" (for some strange reason "core2duo" is not
> recognized), I don't segfault.
I didn't have TARGET_X86_64, so that explains the missing core2duo...
--
Hollis Blanchard
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 2/6] kvm: sync vcpu state during initialization
2008-12-13 0:24 ` Hollis Blanchard
@ 2008-12-13 16:37 ` Anthony Liguori
0 siblings, 0 replies; 22+ messages in thread
From: Anthony Liguori @ 2008-12-13 16:37 UTC (permalink / raw)
To: Hollis Blanchard; +Cc: qemu-devel, kvm-ppc
Hollis Blanchard wrote:
> On Fri, 2008-12-12 at 18:23 -0600, Hollis Blanchard wrote:
>
>> When I use "-cpu coreduo" (for some strange reason "core2duo" is not
>> recognized), I don't segfault.
>>
>
> I didn't have TARGET_X86_64, so that explains the missing core2duo...
>
I'm a bit confused. You were running -enable-kvm with qemu (as opposed
to qemu-system-x86_64)?
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 3/6] Enable KVM for ppcemb.
2008-12-11 22:54 ` Hollis Blanchard
@ 2008-12-14 1:37 ` Hollis Blanchard
2008-12-14 3:29 ` Anthony Liguori
0 siblings, 1 reply; 22+ messages in thread
From: Hollis Blanchard @ 2008-12-14 1:37 UTC (permalink / raw)
To: qemu-devel; +Cc: kvm-ppc
On Thu, 2008-12-11 at 16:54 -0600, Hollis Blanchard wrote:
>
> > I don't know that kvm_ppc.c is a very information name for this sort
> of
> > stuff. Since this is really host specific, not target specific, why
> not
> > move it out of target-ppc.
>
> I could combine kvm_ppc.c into target-ppc/kvm.c. However, they're
> really
> two different things, and I thought it would cause the least confusion
> if they were logically separate. Most of it is hooks required by
> common
> code, and then some of it isn't. (I'm thinking about e.g. IA64 doing a
> copy/paste, and then wondering which functions they actually need to
> implement.) Regardless, I will still need a kvm_ppc.h, so kvm_ppc.c
> seemed like a good place to match.
Any further thoughts on this issue? It's the only issue I still have
unresolved from the initial reviews.
--
Hollis Blanchard
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 3/6] Enable KVM for ppcemb.
2008-12-14 1:37 ` Hollis Blanchard
@ 2008-12-14 3:29 ` Anthony Liguori
0 siblings, 0 replies; 22+ messages in thread
From: Anthony Liguori @ 2008-12-14 3:29 UTC (permalink / raw)
To: Hollis Blanchard; +Cc: qemu-devel, kvm-ppc
Hollis Blanchard wrote:
> On Thu, 2008-12-11 at 16:54 -0600, Hollis Blanchard wrote:
>
>>> I don't know that kvm_ppc.c is a very information name for this sort
>>>
>> of
>>
>>> stuff. Since this is really host specific, not target specific, why
>>>
>> not
>>
>>> move it out of target-ppc.
>>>
>> I could combine kvm_ppc.c into target-ppc/kvm.c. However, they're
>> really
>> two different things, and I thought it would cause the least confusion
>> if they were logically separate. Most of it is hooks required by
>> common
>> code, and then some of it isn't. (I'm thinking about e.g. IA64 doing a
>> copy/paste, and then wondering which functions they actually need to
>> implement.) Regardless, I will still need a kvm_ppc.h, so kvm_ppc.c
>> seemed like a good place to match.
>>
>
> Any further thoughts on this issue? It's the only issue I still have
> unresolved from the initial reviews.
>
No, we can fix it later when someone comes up with a better idea.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2008-12-14 3:29 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-11 20:52 [Qemu-devel] PowerPC KVM support Hollis Blanchard
2008-12-11 20:52 ` [Qemu-devel] [PATCH 1/6] Include headers for types used in helper_regs.h Hollis Blanchard
2008-12-11 20:52 ` [Qemu-devel] [PATCH 2/6] kvm: sync vcpu state during initialization Hollis Blanchard
2008-12-11 20:57 ` [Qemu-devel] " Hollis Blanchard
2008-12-11 21:24 ` [Qemu-devel] " Anthony Liguori
2008-12-13 0:23 ` Hollis Blanchard
2008-12-13 0:24 ` Hollis Blanchard
2008-12-13 16:37 ` Anthony Liguori
2008-12-11 20:52 ` [Qemu-devel] [PATCH 3/6] Enable KVM for ppcemb Hollis Blanchard
2008-12-11 21:19 ` Blue Swirl
2008-12-12 0:04 ` Hollis Blanchard
2008-12-11 21:30 ` Anthony Liguori
2008-12-11 22:54 ` Hollis Blanchard
2008-12-14 1:37 ` Hollis Blanchard
2008-12-14 3:29 ` Anthony Liguori
2008-12-11 20:52 ` [Qemu-devel] [PATCH 4/6] Implement device tree support needed for Bamboo emulation Hollis Blanchard
2008-12-11 21:33 ` Anthony Liguori
2008-12-11 20:52 ` [Qemu-devel] [PATCH 5/6] PowerPC 440EP SoC emulation Hollis Blanchard
2008-12-11 20:52 ` [Qemu-devel] [PATCH 6/6] IBM PowerPC 440EP Bamboo reference board emulation Hollis Blanchard
2008-12-11 21:25 ` Blue Swirl
2008-12-11 21:39 ` Anthony Liguori
2008-12-11 23:08 ` Hollis Blanchard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).