In an effort to get PPC64 guests working properly, this patch set implements all bits necessary to make PPC64 guests work with current Qemu git.
If there are no strong objections to this set, I'll just commit it.
Alexander Graf (7): PPC: Increase instruction cache size PPC: Get timebase and clock speed from fw_cfg PPC: Create interrupt map for PCI PPC: Fix interrupt numbers PPC: Add U3 based Mac machine PPC: Set Uninorth interrupt numbers to new Qemu values PPC: Disable host binary build
arch/ppc/qemu/init.c | 41 +++++++++++++++++++++++--------------- config/examples/ppc_config.xml | 2 +- drivers/cuda.c | 7 +++++- drivers/ide.c | 29 ++++++++++++++++++++++++-- drivers/macio.c | 16 ++++++++++++++- drivers/pci.c | 42 ++++++++++++++++++++++++++++++++++++++++ drivers/pci_database.c | 10 +++++++- include/openbios/fw_cfg.h | 6 +++++ include/openbios/pci.h | 11 ++++++++++ 9 files changed, 140 insertions(+), 24 deletions(-)
A real 970FX has more icache, so we should reflect that.
Signed-off-by: Alexander Graf agraf@suse.de --- arch/ppc/qemu/init.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/ppc/qemu/init.c b/arch/ppc/qemu/init.c index 5ae39cc..07fbd30 100644 --- a/arch/ppc/qemu/init.c +++ b/arch/ppc/qemu/init.c @@ -416,7 +416,7 @@ static const struct cpudef ppc_defs[] = { { // XXX find out real values .iu_version = 0x003C0000, .name = "PowerPC,970FX", - .icache_size = 0x8000, + .icache_size = 0x10000, .dcache_size = 0x8000, .icache_sets = 0x80, .dcache_sets = 0x80,
When running on Qemu (TCG) time goes by at a constant frequency which accidently happens to match with Linux's fallback value.
As soon as we go to KVM, the time base suddenly starts going as fast as the host CPU's time base. So we need to make sure Linux knows about it, so it can do its timekeeping properly.
Signed-off-by: Alexander Graf agraf@suse.de --- arch/ppc/qemu/init.c | 10 ++++++++++ include/openbios/fw_cfg.h | 6 ++++++ 2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/arch/ppc/qemu/init.c b/arch/ppc/qemu/init.c index 07fbd30..0363689 100644 --- a/arch/ppc/qemu/init.c +++ b/arch/ppc/qemu/init.c @@ -194,6 +194,16 @@ cpu_generic_init(const struct cpudef *cpu) push_str("icache-block-size"); fword("property");
+ PUSH(fw_cfg_read_i32(FW_CFG_PPC_TBFREQ)); + fword("encode-int"); + push_str("timebase-frequency"); + fword("property"); + + PUSH(fw_cfg_read_i32(FW_CFG_PPC_CPUFREQ)); + fword("encode-int"); + push_str("clock-frequency"); + fword("property"); + push_str("running"); fword("encode-string"); push_str("state"); diff --git a/include/openbios/fw_cfg.h b/include/openbios/fw_cfg.h index 72a67f6..7f8fa74 100644 --- a/include/openbios/fw_cfg.h +++ b/include/openbios/fw_cfg.h @@ -36,6 +36,12 @@ #define FW_CFG_ARCH_LOCAL 0x8000 #define FW_CFG_ENTRY_MASK ~(FW_CFG_WRITE_CHANNEL | FW_CFG_ARCH_LOCAL)
+#define FW_CFG_PPC_WIDTH (FW_CFG_ARCH_LOCAL + 0x00) +#define FW_CFG_PPC_HEIGHT (FW_CFG_ARCH_LOCAL + 0x01) +#define FW_CFG_PPC_DEPTH (FW_CFG_ARCH_LOCAL + 0x02) +#define FW_CFG_PPC_TBFREQ (FW_CFG_ARCH_LOCAL + 0x03) +#define FW_CFG_PPC_CPUFREQ (FW_CFG_ARCH_LOCAL + 0x04) + #define FW_CFG_INVALID 0xffff
#ifndef NO_QEMU_PROTOS
There is a draft spec that defines how interrupts are supposed to be mapped from one bus to another, down to the PIC and CPU interrupt line.
So far we don't implement that spec. But PPC64 Linux requires us to for PCI devices. So let's create a map here.
Draft: http://playground.sun.com/1275/practice/imap/imap0_9d.pdf
Signed-off-by: Alexander Graf agraf@suse.de --- drivers/macio.c | 16 +++++++++++++++- drivers/pci.c | 42 ++++++++++++++++++++++++++++++++++++++++++ include/openbios/pci.h | 10 ++++++++++ 3 files changed, 67 insertions(+), 1 deletions(-)
diff --git a/drivers/macio.c b/drivers/macio.c index 3b7a3af..f43aaa8 100644 --- a/drivers/macio.c +++ b/drivers/macio.c @@ -18,6 +18,7 @@ #include "macio.h" #include "cuda.h" #include "escc.h" +#include "openbios/pci.h"
#define OW_IO_NVRAM_SIZE 0x00020000 #define OW_IO_NVRAM_OFFSET 0x00060000 @@ -172,9 +173,13 @@ openpic_init(const char *path, uint32_t addr) fword("finish-device");
if (is_newworld()) { + u32 *interrupt_map; + int len, i; + /* patch in interrupt parent */ dnode = find_dev(buf); - target_node = find_dev("/pci"); + + target_node = find_dev("/pci/mac-io"); set_int_property(target_node, "interrupt-parent", dnode);
target_node = find_dev("/pci/mac-io/escc/ch-a"); @@ -182,6 +187,15 @@ openpic_init(const char *path, uint32_t addr)
target_node = find_dev("/pci/mac-io/escc/ch-b"); set_int_property(target_node, "interrupt-parent", dnode); + + target_node = find_dev("/pci"); + set_int_property(target_node, "interrupt-parent", dnode); + + interrupt_map = (u32 *)get_property(target_node, "interrupt-map", &len); + for (i = 0; i < 4; i++) { + interrupt_map[(i * 7) + PCI_INT_MAP_PIC_HANDLE] = (u32)dnode; + } + set_property(target_node, "interrupt-map", (char *)interrupt_map, len); } }
diff --git a/drivers/pci.c b/drivers/pci.c index 7d681f1..60918b0 100644 --- a/drivers/pci.c +++ b/drivers/pci.c @@ -278,6 +278,47 @@ static void pci_set_bus_range(const pci_config_t *config) set_property(dev, "bus-range", (char *)props, 2 * sizeof(props[0])); }
+static void pci_host_set_interrupt_map(const pci_config_t *config) +{ +/* XXX We currently have a hook in the MPIC init code to fill in its handle. + * If you want to have interrupt maps for your PCI host bus, add your + * architecture to the #if and make your bridge detect code fill in its + * handle too. + * + * It would be great if someone clever could come up with a more universal + * mechanism here. + */ +#if defined(CONFIG_PPC) + phandle_t dev = get_cur_dev(); + u32 props[7 * 4]; + int i; + +#if defined(CONFIG_PPC) + /* Oldworld macs do interrupt maps differently */ + if(!is_newworld()) + return; +#endif + + for (i = 0; i < (7*4); i+=7) { + props[i+PCI_INT_MAP_PCI0] = 0; + props[i+PCI_INT_MAP_PCI1] = 0; + props[i+PCI_INT_MAP_PCI2] = 0; + props[i+PCI_INT_MAP_PCI_INT] = (i / 7) + 1; // starts at PINA=1 + props[i+PCI_INT_MAP_PIC_HANDLE] = 0; // gets patched in later + props[i+PCI_INT_MAP_PIC_INT] = arch->irqs[i / 7]; + props[i+PCI_INT_MAP_PIC_POL] = 3; + } + set_property(dev, "interrupt-map", (char *)props, 7 * 4 * sizeof(props[0])); + + props[PCI_INT_MAP_PCI0] = 0; + props[PCI_INT_MAP_PCI1] = 0; + props[PCI_INT_MAP_PCI2] = 0; + props[PCI_INT_MAP_PCI_INT] = 0x7; + + set_property(dev, "interrupt-map-mask", (char *)props, 4 * sizeof(props[0])); +#endif +} + static void pci_host_set_reg(const pci_config_t *config) { phandle_t dev = get_cur_dev(); @@ -344,6 +385,7 @@ int host_config_cb(const pci_config_t *config) pci_host_set_reg(config); pci_host_set_ranges(config); pci_set_bus_range(config); + pci_host_set_interrupt_map(config);
return 0; } diff --git a/include/openbios/pci.h b/include/openbios/pci.h index f500595..4f87ded 100644 --- a/include/openbios/pci.h +++ b/include/openbios/pci.h @@ -24,6 +24,16 @@ struct pci_arch_t {
extern const pci_arch_t *arch;
+/* Device tree offsets */ + +#define PCI_INT_MAP_PCI0 0 +#define PCI_INT_MAP_PCI1 1 +#define PCI_INT_MAP_PCI2 2 +#define PCI_INT_MAP_PCI_INT 3 +#define PCI_INT_MAP_PIC_HANDLE 4 +#define PCI_INT_MAP_PIC_INT 5 +#define PCI_INT_MAP_PIC_POL 6 + /* Device classes and subclasses */
#define PCI_BASE_CLASS_STORAGE 0x01
We changed several interrupt numbers in Qemu to better reflect real world hardware. Also, since we're now using proper interrupt maps, we need to make sure we specify interrupts in the way the respective map requires it.
Signed-off-by: Alexander Graf agraf@suse.de --- drivers/cuda.c | 7 ++++++- drivers/ide.c | 29 ++++++++++++++++++++++++++--- 2 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/drivers/cuda.c b/drivers/cuda.c index 509f3af..28ddc83 100644 --- a/drivers/cuda.c +++ b/drivers/cuda.c @@ -197,7 +197,12 @@ ob_cuda_initialize (int *idx)
set_property(ph, "reg", (char *)&props, sizeof(props));
- set_int_property(ph, "interrupts", 0x12); + /* on newworld machines the cuda is on interrupt 0x19 */ + + props[0] = 0x19; + props[1] = 0; + NEWWORLD(set_property(ph, "interrupts", (char *)props, sizeof(props))); + NEWWORLD(set_int_property(ph, "#interrupt-cells", 2));
/* we emulate an oldworld hardware, so we must use * non-standard oldworld property (needed by linux 2.6.18) diff --git a/drivers/ide.c b/drivers/ide.c index 3636b3c..228ff1e 100644 --- a/drivers/ide.c +++ b/drivers/ide.c @@ -1421,9 +1421,11 @@ int ob_ide_init(const char *path, uint32_t io_port0, uint32_t ctl_port0,
dnode = find_dev(nodebuff);
+#ifndef CONFIG_PPC props[0]=14; props[1]=0; set_property(dnode, "interrupts", (char *)&props, 2*sizeof(cell)); +#endif
props[0] = __cpu_to_be32(chan->io_regs[0]); props[1] = __cpu_to_be32(1); props[2] = __cpu_to_be32(8); @@ -1578,10 +1580,31 @@ int macio_ide_init(const char *path, uint32_t addr, int nb_channels) OLDWORLD(set_property(dnode, "AAPL,pio-timing", (char *)&props, 8*sizeof(cell)));
- props[0] = 0x0000000d; - props[1] = 0x00000000; + /* The first interrupt entry is the ide interrupt, the second + the dbdma interrupt */ + switch (current_channel) { + case 1: + props[0] = 0x0000000d; + props[2] = 0x00000002; + break; + case 2: + props[0] = 0x0000000e; + props[2] = 0x00000003; + break; + case 3: + props[0] = 0x0000000f; + props[2] = 0x00000004; + break; + default: + props[0] = 0x00000000; + props[2] = 0x00000000; + break; + } + props[1] = 0x00000000; /* XXX level triggered on real hw */ + props[3] = 0x00000000; set_property(dnode, "interrupts", - (char *)&props, 2*sizeof(cell)); + (char *)&props, 4*sizeof(cell)); + set_int_property(dnode, "#interrupt-cells", 2); OLDWORLD(set_property(dnode, "AAPL,interrupts", (char *)&props, 2*sizeof(cell)));
Linux on PPC64 knows only so many chipsets. One of the is the U3. So we can use that when we're emulating a PPC64 machine, making Linux happy.
Signed-off-by: Alexander Graf agraf@suse.de --- arch/ppc/qemu/init.c | 23 +++++++++++------------ drivers/pci_database.c | 8 +++++++- include/openbios/pci.h | 1 + 3 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/arch/ppc/qemu/init.c b/arch/ppc/qemu/init.c index 0363689..2243f72 100644 --- a/arch/ppc/qemu/init.c +++ b/arch/ppc/qemu/init.c @@ -63,6 +63,7 @@ enum { ARCH_PREP = 0, ARCH_MAC99, ARCH_HEATHROW, + ARCH_MAC99_U3, };
int is_apple(void) @@ -77,7 +78,8 @@ int is_oldworld(void)
int is_newworld(void) { - return machine_id == ARCH_MAC99; + return (machine_id == ARCH_MAC99) || + (machine_id == ARCH_MAC99_U3); }
static const pci_arch_t known_arch[] = { @@ -95,6 +97,13 @@ static const pci_arch_t known_arch[] = { 0xf2000000, 0x00800000, 0x00000000, 0x01000000, { 8, 9, 10, 11 } }, + [ARCH_MAC99_U3] = { "MAC99_U3", PCI_VENDOR_ID_APPLE, + PCI_DEVICE_ID_APPLE_U3_AGP, + 0xf0800000, 0xf0c00000, + 0xf0000000, 0x02000000, 0x80000000, 0x10000000, + 0xf2000000, 0x00800000, 0x00000000, 0x01000000, + { 0x1b, 0x1c, 0x1d, 0x1e } + }, [ARCH_HEATHROW] = { "HEATHROW", PCI_VENDOR_ID_MOTOROLA, PCI_DEVICE_ID_MOTOROLA_MPC106, 0xfec00000, 0xfee00000, @@ -557,6 +566,7 @@ arch_of_init( void ) break;
case ARCH_MAC99: + case ARCH_MAC99_U3: case ARCH_PREP: default:
@@ -597,17 +607,6 @@ arch_of_init( void ) push_str("system-id"); fword("property");
- /* pci info */ - - if (machine_id == ARCH_MAC99) { - push_str("/pci"); - fword("find-device"); - push_str("u3-agp"); - fword("encode-string"); - push_str("compatible"); - fword("property"); - } - /* memory info */
push_str("/memory"); diff --git a/drivers/pci_database.c b/drivers/pci_database.c index 4682a12..56fd1bb 100644 --- a/drivers/pci_database.c +++ b/drivers/pci_database.c @@ -280,6 +280,12 @@ static const pci_subclass_t mem_subclass[] = {
static const pci_dev_t hbrg_devices[] = { { + PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_U3_AGP, NULL, + "pci", "AAPL,UniNorth", "u3-agp\0", + 3, 2, 1, + host_config_cb, NULL, + }, + { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_AGP, NULL, "pci", "AAPL,UniNorth", "uni-north\0", 3, 2, 1, @@ -1084,7 +1090,7 @@ static const pci_dev_t misc_pci[] = { { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_KEYL, "mac-io", "mac-io", "AAPL,Keylargo", "Keylargo\0", - 1, 1, 2, + 1, 1, 1, &macio_keylargo_config_cb, NULL, }, { diff --git a/include/openbios/pci.h b/include/openbios/pci.h index 4f87ded..8814b7a 100644 --- a/include/openbios/pci.h +++ b/include/openbios/pci.h @@ -187,6 +187,7 @@ extern const pci_arch_t *arch; #define PCI_DEVICE_ID_APPLE_UNI_N_PCI 0x001f #define PCI_DEVICE_ID_APPLE_UNI_N_AGP 0x0020 #define PCI_DEVICE_ID_APPLE_UNI_N_KEYL 0x0022 +#define PCI_DEVICE_ID_APPLE_U3_AGP 0x004b
#define PCI_VENDOR_ID_SUN 0x108e #define PCI_DEVICE_ID_SUN_EBUS 0x1000
We changed the uninorth interrupt mapping to better reflect real hardware. OpenBIOS obviously needs to know about that.
Signed-off-by: Alexander Graf agraf@suse.de --- arch/ppc/qemu/init.c | 6 +++--- drivers/pci_database.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/ppc/qemu/init.c b/arch/ppc/qemu/init.c index 2243f72..d66dab2 100644 --- a/arch/ppc/qemu/init.c +++ b/arch/ppc/qemu/init.c @@ -93,9 +93,9 @@ static const pci_arch_t known_arch[] = { [ARCH_MAC99] = { "MAC99", PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_PCI, 0xf2800000, 0xf2c00000, - 0xf2000000, 0x02000000, 0x80000000, 0x10000000, - 0xf2000000, 0x00800000, 0x00000000, 0x01000000, - { 8, 9, 10, 11 } + 0xf2000000, 0x02000000, 0x80000000, 0x10000000, + 0xf2000000, 0x00800000, 0x00000000, 0x01000000, + { 0x1b, 0x1c, 0x1d, 0x1e } }, [ARCH_MAC99_U3] = { "MAC99_U3", PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_U3_AGP, diff --git a/drivers/pci_database.c b/drivers/pci_database.c index 56fd1bb..553f7de 100644 --- a/drivers/pci_database.c +++ b/drivers/pci_database.c @@ -289,7 +289,7 @@ static const pci_dev_t hbrg_devices[] = { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_AGP, NULL, "pci", "AAPL,UniNorth", "uni-north\0", 3, 2, 1, - NULL, NULL + host_config_cb, NULL, }, { PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_PCI, NULL,
On PPC the host binary build always fails for me. Since I guess I'm the only one actually building OpenBIOS ppc on ppc and I don't really care that much about debugging Forth code in my Linux environment, I guess we can just disable building it by default.
Signed-off-by: Alexander Graf agraf@suse.de --- config/examples/ppc_config.xml | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/config/examples/ppc_config.xml b/config/examples/ppc_config.xml index 87a9964..01139d7 100644 --- a/config/examples/ppc_config.xml +++ b/config/examples/ppc_config.xml @@ -10,7 +10,7 @@ <option name="CONFIG_BIG_ENDIAN" type="boolean" value="true"/>
<!-- Build hosted UNIX Binary --> - <option name="CONFIG_HOST_UNIX" type="boolean" value="true"/> + <option name="CONFIG_HOST_UNIX" type="boolean" value="false"/> <option name="CONFIG_UNIX_QT" type="boolean" value="false"/> <option name="CONFIG_PLUGINS" type="boolean" value="false"/>
On 2/22/10, Alexander Graf agraf@suse.de wrote:
On PPC the host binary build always fails for me. Since I guess I'm
What's the problem?
the only one actually building OpenBIOS ppc on ppc and I don't really care that much about debugging Forth code in my Linux environment, I guess we can just disable building it by default.
Maybe we could introduce unix-ppc/sparc etc. target for switch-arch to enable unix build.
Blue Swirl wrote:
On 2/22/10, Alexander Graf agraf@suse.de wrote:
On PPC the host binary build always fails for me. Since I guess I'm
What's the problem?
Building OpenBIOS for ppc Building...error: /usr/bin/ld: Warning: openbios-unix uses hard float, libfs.a(btree.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(ctype.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(diskio.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(extra.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(misc.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(string.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(vsprintf.o) uses soft float libmodules.a(elf-loader.o): In function `elf_loader_init_program': /home/agraf/git/openbios-devel/obj-ppc/../modules/elf-loader.c:77: undefined reference to `flush_icache_range' libmodules.a(xcoff-loader.o): In function `xcoff_loader_init_program': /home/agraf/git/openbios-devel/obj-ppc/../modules/xcoff-loader.c:110: undefined reference to `flush_icache_range' collect2: ld returned 1 exit status make[1]: *** [openbios-unix] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/home/agraf/git/openbios-devel/obj-ppc' make: *** [build] Error 1
the only one actually building OpenBIOS ppc on ppc and I don't really care that much about debugging Forth code in my Linux environment, I guess we can just disable building it by default.
Maybe we could introduce unix-ppc/sparc etc. target for switch-arch to enable unix build.
Maybe, yeah. I don't see any value in building it when all I want is a firmware image ;-).
Alex
On 2/22/10, Alexander Graf agraf@suse.de wrote:
Blue Swirl wrote:
On 2/22/10, Alexander Graf agraf@suse.de wrote:
On PPC the host binary build always fails for me. Since I guess I'm
What's the problem?
Building OpenBIOS for ppc Building...error: /usr/bin/ld: Warning: openbios-unix uses hard float, libfs.a(btree.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(ctype.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(diskio.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(extra.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(misc.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(string.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(vsprintf.o) uses soft float libmodules.a(elf-loader.o): In function `elf_loader_init_program': /home/agraf/git/openbios-devel/obj-ppc/../modules/elf-loader.c:77: undefined reference to `flush_icache_range' libmodules.a(xcoff-loader.o): In function `xcoff_loader_init_program': /home/agraf/git/openbios-devel/obj-ppc/../modules/xcoff-loader.c:110: undefined reference to `flush_icache_range' collect2: ld returned 1 exit status make[1]: *** [openbios-unix] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/home/agraf/git/openbios-devel/obj-ppc' make: *** [build] Error 1
I think the first patch should help with this, could you test it?
the only one actually building OpenBIOS ppc on ppc and I don't really care that much about debugging Forth code in my Linux environment, I guess we can just disable building it by default.
Maybe we could introduce unix-ppc/sparc etc. target for switch-arch to enable unix build.
Maybe, yeah. I don't see any value in building it when all I want is a firmware image ;-).
The second patch changes the switch-arch command a bit so that unix target must be enabled with unix-amd64 etc. Removal of cross-xxx files comes as a bonus.
On 23.02.2010, at 22:42, Blue Swirl wrote:
On 2/22/10, Alexander Graf agraf@suse.de wrote:
Blue Swirl wrote:
On 2/22/10, Alexander Graf agraf@suse.de wrote:
On PPC the host binary build always fails for me. Since I guess I'm
What's the problem?
Building OpenBIOS for ppc Building...error: /usr/bin/ld: Warning: openbios-unix uses hard float, libfs.a(btree.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(ctype.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(diskio.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(extra.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(misc.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(string.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(vsprintf.o) uses soft float libmodules.a(elf-loader.o): In function `elf_loader_init_program': /home/agraf/git/openbios-devel/obj-ppc/../modules/elf-loader.c:77: undefined reference to `flush_icache_range' libmodules.a(xcoff-loader.o): In function `xcoff_loader_init_program': /home/agraf/git/openbios-devel/obj-ppc/../modules/xcoff-loader.c:110: undefined reference to `flush_icache_range' collect2: ld returned 1 exit status make[1]: *** [openbios-unix] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/home/agraf/git/openbios-devel/obj-ppc' make: *** [build] Error 1
I think the first patch should help with this, could you test it?
Yes, it really is that simple ;-). So we really don't have to flush the icache when we flush the icache?
agraf@lychee:~/git/openbios-devel> make -j4 Building OpenBIOS for ppc Building...ok.
Alex
On 2/24/10, Alexander Graf agraf@suse.de wrote:
On 23.02.2010, at 22:42, Blue Swirl wrote:
On 2/22/10, Alexander Graf agraf@suse.de wrote:
Blue Swirl wrote:
On 2/22/10, Alexander Graf agraf@suse.de wrote:
On PPC the host binary build always fails for me. Since I guess I'm
What's the problem?
Building OpenBIOS for ppc Building...error: /usr/bin/ld: Warning: openbios-unix uses hard float, libfs.a(btree.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(ctype.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(diskio.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(extra.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(misc.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(string.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(vsprintf.o) uses soft float libmodules.a(elf-loader.o): In function `elf_loader_init_program': /home/agraf/git/openbios-devel/obj-ppc/../modules/elf-loader.c:77: undefined reference to `flush_icache_range' libmodules.a(xcoff-loader.o): In function `xcoff_loader_init_program': /home/agraf/git/openbios-devel/obj-ppc/../modules/xcoff-loader.c:110: undefined reference to `flush_icache_range' collect2: ld returned 1 exit status make[1]: *** [openbios-unix] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/home/agraf/git/openbios-devel/obj-ppc' make: *** [build] Error 1
I think the first patch should help with this, could you test it?
Yes, it really is that simple ;-). So we really don't have to flush the icache when we flush the icache?
I'd suppose the Unix version does not need icache flushes. Can you execute something with openbios-unix?
On 23.02.2010, at 23:05, Blue Swirl wrote:
On 2/24/10, Alexander Graf agraf@suse.de wrote:
On 23.02.2010, at 22:42, Blue Swirl wrote:
On 2/22/10, Alexander Graf agraf@suse.de wrote:
Blue Swirl wrote:
On 2/22/10, Alexander Graf agraf@suse.de wrote:
On PPC the host binary build always fails for me. Since I guess I'm
What's the problem?
Building OpenBIOS for ppc Building...error: /usr/bin/ld: Warning: openbios-unix uses hard float, libfs.a(btree.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(ctype.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(diskio.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(extra.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(misc.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(string.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(vsprintf.o) uses soft float libmodules.a(elf-loader.o): In function `elf_loader_init_program': /home/agraf/git/openbios-devel/obj-ppc/../modules/elf-loader.c:77: undefined reference to `flush_icache_range' libmodules.a(xcoff-loader.o): In function `xcoff_loader_init_program': /home/agraf/git/openbios-devel/obj-ppc/../modules/xcoff-loader.c:110: undefined reference to `flush_icache_range' collect2: ld returned 1 exit status make[1]: *** [openbios-unix] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/home/agraf/git/openbios-devel/obj-ppc' make: *** [build] Error 1
I think the first patch should help with this, could you test it?
Yes, it really is that simple ;-). So we really don't have to flush the icache when we flush the icache?
I'd suppose the Unix version does not need icache flushes. Can you execute something with openbios-unix?
Does that mean it works?
agraf@lychee:~/git/openbios-devel> ./obj-ppc/openbios-unix obj-ppc/openbios-unix.dict Welcome to OpenBIOS v1.0 built on Feb 23 2010 21:59 Type 'help' for detailed information
[unix] Booting default not supported.
0 > cd / ok 0 > ls f7e9bef0 aliases f7e9bf94 openprom f7e9c13c options f7e9c1b4 chosen f7e9c298 builtin f7ea2094 packages f7ea37b0 memory f7ea3854 cpus f7ea3bb4 unix ok 0 > .properties name "OpenBiosTeam,OpenBIOS" #address-cells 1 ok 0 >
On 2/24/10, Alexander Graf agraf@suse.de wrote:
On 23.02.2010, at 23:05, Blue Swirl wrote:
On 2/24/10, Alexander Graf agraf@suse.de wrote:
On 23.02.2010, at 22:42, Blue Swirl wrote:
On 2/22/10, Alexander Graf agraf@suse.de wrote:
Blue Swirl wrote:
On 2/22/10, Alexander Graf agraf@suse.de wrote:
> On PPC the host binary build always fails for me. Since I guess I'm >
What's the problem?
Building OpenBIOS for ppc Building...error: /usr/bin/ld: Warning: openbios-unix uses hard float, libfs.a(btree.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(ctype.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(diskio.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(extra.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(misc.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(string.o) uses soft float /usr/bin/ld: Warning: openbios-unix uses hard float, liblibc.a(vsprintf.o) uses soft float libmodules.a(elf-loader.o): In function `elf_loader_init_program': /home/agraf/git/openbios-devel/obj-ppc/../modules/elf-loader.c:77: undefined reference to `flush_icache_range' libmodules.a(xcoff-loader.o): In function `xcoff_loader_init_program': /home/agraf/git/openbios-devel/obj-ppc/../modules/xcoff-loader.c:110: undefined reference to `flush_icache_range' collect2: ld returned 1 exit status make[1]: *** [openbios-unix] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/home/agraf/git/openbios-devel/obj-ppc' make: *** [build] Error 1
I think the first patch should help with this, could you test it?
Yes, it really is that simple ;-). So we really don't have to flush the icache when we flush the icache?
I'd suppose the Unix version does not need icache flushes. Can you execute something with openbios-unix?
Does that mean it works?
agraf@lychee:~/git/openbios-devel> ./obj-ppc/openbios-unix obj-ppc/openbios-unix.dict Welcome to OpenBIOS v1.0 built on Feb 23 2010 21:59 Type 'help' for detailed information
[unix] Booting default not supported.
0 > cd / ok 0 > ls f7e9bef0 aliases f7e9bf94 openprom f7e9c13c options f7e9c1b4 chosen f7e9c298 builtin f7ea2094 packages f7ea37b0 memory f7ea3854 cpus f7ea3bb4 unix ok 0 > .properties name "OpenBiosTeam,OpenBIOS" #address-cells 1 ok 0 >
Yes, that's it.
On 2/22/10, Alexander Graf agraf@suse.de wrote:
In an effort to get PPC64 guests working properly, this patch set implements all bits necessary to make PPC64 guests work with current Qemu git.
If there are no strong objections to this set, I'll just commit it.
OK for me. There could be a global solution for 7/7 but this is not really an objection.
Blue Swirl wrote:
On 2/22/10, Alexander Graf agraf@suse.de wrote:
In an effort to get PPC64 guests working properly, this patch set implements all bits necessary to make PPC64 guests work with current Qemu git.
If there are no strong objections to this set, I'll just commit it.
OK for me. There could be a global solution for 7/7 but this is not really an objection.
Alright :-). Please update the ROM in Qemu accordingly then. If you like I can also send you a compiled version.
Alex