[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 22/58] PPC: E500: Update freqs for all CPUs
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PATCH 22/58] PPC: E500: Update freqs for all CPUs |
Date: |
Wed, 14 Sep 2011 10:42:46 +0200 |
Now that we can so nicely find out the host's frequencies, we should also
make sure that we get them into all virtual CPUs' device tree nodes.
Signed-off-by: Alexander Graf <address@hidden>
---
hw/ppce500_mpc8544ds.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c
index 2c7c677..0791e27 100644
--- a/hw/ppce500_mpc8544ds.c
+++ b/hw/ppce500_mpc8544ds.c
@@ -70,9 +70,9 @@ static int mpc8544_load_device_tree(CPUState *env,
int fdt_size;
void *fdt;
uint8_t hypercall[16];
- char cpu_name[128] = "/cpus/PowerPC,address@hidden";
uint32_t clock_freq = 400000000;
uint32_t tb_freq = 400000000;
+ int i;
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, BINARY_DEVICE_TREE_FILE);
if (!filename) {
@@ -122,8 +122,12 @@ static int mpc8544_load_device_tree(CPUState *env,
hypercall, sizeof(hypercall));
}
- qemu_devtree_setprop_cell(fdt, cpu_name, "clock-frequency", clock_freq);
- qemu_devtree_setprop_cell(fdt, cpu_name, "timebase-frequency", tb_freq);
+ for (i = 0; i < smp_cpus; i++) {
+ char cpu_name[128];
+ snprintf(cpu_name, sizeof(cpu_name), "/cpus/PowerPC,address@hidden",
i);
+ qemu_devtree_setprop_cell(fdt, cpu_name, "clock-frequency",
clock_freq);
+ qemu_devtree_setprop_cell(fdt, cpu_name, "timebase-frequency",
tb_freq);
+ }
ret = rom_add_blob_fixed(BINARY_DEVICE_TREE_FILE, fdt, fdt_size, addr);
g_free(fdt);
--
1.6.0.2
- [Qemu-ppc] [PULL 00/58] ppc patch queue 2011-09-14, Alexander Graf, 2011/09/14
- [Qemu-ppc] [PATCH 57/58] PPC: Fix heathrow PIC to use little endian MMIO, Alexander Graf, 2011/09/14
- [Qemu-ppc] [PATCH 55/58] ppc: move ADB stuff from ppc_mac.h to adb.h, Alexander Graf, 2011/09/14
- [Qemu-ppc] [PATCH 45/58] ppc: booke206: add "info tlb" support, Alexander Graf, 2011/09/14
- [Qemu-ppc] [PATCH 22/58] PPC: E500: Update freqs for all CPUs,
Alexander Graf <=
- [Qemu-ppc] [PATCH 08/58] PPC: Set MPIC IDE for IPI to 0, Alexander Graf, 2011/09/14
- [Qemu-ppc] [PATCH 15/58] PPC: bamboo: Move host fdt copy to target, Alexander Graf, 2011/09/14
- [Qemu-ppc] [PATCH 19/58] PPC: bamboo: Use kvm api for freq and clock frequencies, Alexander Graf, 2011/09/14
- [Qemu-ppc] [PATCH 03/58] spapr: make irq customizable via qdev, Alexander Graf, 2011/09/14
- [Qemu-ppc] [PATCH 10/58] PPC: MPIC: Fix CI bit definitions, Alexander Graf, 2011/09/14
- [Qemu-ppc] [PATCH 48/58] pseries: Implement hcall-bulk hypervisor interface, Alexander Graf, 2011/09/14
- [Qemu-ppc] [PATCH 21/58] PPC: KVM: Add stubs for kvm helper functions, Alexander Graf, 2011/09/14
- [Qemu-ppc] [PATCH 09/58] PPC: MPIC: Remove read functionality for WO registers, Alexander Graf, 2011/09/14