* [Qemu-devel] [6271] Use ESCC for PowerMac serial
@ 2009-01-12 17:40 Blue Swirl
2009-01-12 20:18 ` Aurelien Jarno
0 siblings, 1 reply; 17+ messages in thread
From: Blue Swirl @ 2009-01-12 17:40 UTC (permalink / raw)
To: qemu-devel
Revision: 6271
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6271
Author: blueswir1
Date: 2009-01-12 17:40:23 +0000 (Mon, 12 Jan 2009)
Log Message:
-----------
Use ESCC for PowerMac serial
Modified Paths:
--------------
trunk/Makefile.target
trunk/hw/macio.c
trunk/hw/ppc_chrp.c
trunk/hw/ppc_mac.h
trunk/hw/ppc_oldworld.c
Modified: trunk/Makefile.target
===================================================================
--- trunk/Makefile.target 2009-01-12 17:38:28 UTC (rev 6270)
+++ trunk/Makefile.target 2009-01-12 17:40:23 UTC (rev 6271)
@@ -646,7 +646,7 @@
OBJS+= pckbd.o ps2.o serial.o i8259.o i8254.o fdc.o m48t59.o mc146818rtc.o
OBJS+= prep_pci.o ppc_prep.o
# Mac shared devices
-OBJS+= macio.o cuda.o adb.o mac_nvram.o mac_dbdma.o
+OBJS+= macio.o cuda.o adb.o mac_nvram.o mac_dbdma.o escc.o
# OldWorld PowerMac
OBJS+= heathrow_pic.o grackle_pci.o ppc_oldworld.o
# NewWorld PowerMac
Modified: trunk/hw/macio.c
===================================================================
--- trunk/hw/macio.c 2009-01-12 17:38:28 UTC (rev 6270)
+++ trunk/hw/macio.c 2009-01-12 17:40:23 UTC (rev 6271)
@@ -25,6 +25,7 @@
#include "hw.h"
#include "ppc_mac.h"
#include "pci.h"
+#include "escc.h"
typedef struct macio_state_t macio_state_t;
struct macio_state_t {
@@ -32,6 +33,7 @@
int pic_mem_index;
int dbdma_mem_index;
int cuda_mem_index;
+ int escc_mem_index;
void *nvram;
int nb_ide;
int ide_mem_index[4];
@@ -59,6 +61,10 @@
cpu_register_physical_memory(addr + 0x08000, 0x1000,
macio_state->dbdma_mem_index);
}
+ if (macio_state->escc_mem_index >= 0) {
+ cpu_register_physical_memory(addr + 0x13000, ESCC_SIZE << 4,
+ macio_state->escc_mem_index);
+ }
if (macio_state->cuda_mem_index >= 0) {
cpu_register_physical_memory(addr + 0x16000, 0x2000,
macio_state->cuda_mem_index);
@@ -75,7 +81,7 @@
void macio_init (PCIBus *bus, int device_id, int is_oldworld, int pic_mem_index,
int dbdma_mem_index, int cuda_mem_index, void *nvram,
- int nb_ide, int *ide_mem_index)
+ int nb_ide, int *ide_mem_index, int escc_mem_index)
{
PCIDevice *d;
macio_state_t *macio_state;
@@ -89,6 +95,7 @@
macio_state->pic_mem_index = pic_mem_index;
macio_state->dbdma_mem_index = dbdma_mem_index;
macio_state->cuda_mem_index = cuda_mem_index;
+ macio_state->escc_mem_index = escc_mem_index;
macio_state->nvram = nvram;
if (nb_ide > 4)
nb_ide = 4;
Modified: trunk/hw/ppc_chrp.c
===================================================================
--- trunk/hw/ppc_chrp.c 2009-01-12 17:38:28 UTC (rev 6270)
+++ trunk/hw/ppc_chrp.c 2009-01-12 17:40:23 UTC (rev 6271)
@@ -31,6 +31,7 @@
#include "net.h"
#include "sysemu.h"
#include "boards.h"
+#include "escc.h"
#define MAX_IDE_BUS 2
@@ -80,7 +81,7 @@
m48t59_t *m48t59;
int vga_bios_size, bios_size;
qemu_irq *dummy_irq;
- int pic_mem_index, dbdma_mem_index, cuda_mem_index;
+ int pic_mem_index, dbdma_mem_index, cuda_mem_index, escc_mem_index;
int ide_mem_index[2];
int ppc_boot_device;
int index;
@@ -262,8 +263,8 @@
/* XXX: suppress that */
dummy_irq = i8259_init(NULL);
- /* XXX: use Mac Serial port */
- serial_init(0x3f8, dummy_irq[4], 115200, serial_hds[0]);
+ escc_mem_index = escc_init(0x80013000, dummy_irq[4], serial_hds[0],
+ serial_hds[1], ESCC_CLOCK, 4);
for(i = 0; i < nb_nics; i++) {
if (!nd_table[i].model)
nd_table[i].model = "ne2k_pci";
@@ -295,7 +296,7 @@
dbdma_init(&dbdma_mem_index);
macio_init(pci_bus, 0x0022, 0, pic_mem_index, dbdma_mem_index,
- cuda_mem_index, NULL, 2, ide_mem_index);
+ cuda_mem_index, NULL, 2, ide_mem_index, escc_mem_index);
if (usb_enabled) {
usb_ohci_init_pci(pci_bus, 3, -1);
Modified: trunk/hw/ppc_mac.h
===================================================================
--- trunk/hw/ppc_mac.h 2009-01-12 17:38:28 UTC (rev 6270)
+++ trunk/hw/ppc_mac.h 2009-01-12 17:40:23 UTC (rev 6271)
@@ -37,6 +37,8 @@
#define KERNEL_LOAD_ADDR 0x01000000
#define INITRD_LOAD_ADDR 0x01800000
+#define ESCC_CLOCK 3686400
+
/* DBDMA */
void dbdma_init (int *dbdma_mem_index);
@@ -46,7 +48,7 @@
/* MacIO */
void macio_init (PCIBus *bus, int device_id, int is_oldworld, int pic_mem_index,
int dbdma_mem_index, int cuda_mem_index, void *nvram,
- int nb_ide, int *ide_mem_index);
+ int nb_ide, int *ide_mem_index, int escc_mem_index);
/* NewWorld PowerMac IDE */
int pmac_ide_init (BlockDriverState **hd_table, qemu_irq irq);
Modified: trunk/hw/ppc_oldworld.c
===================================================================
--- trunk/hw/ppc_oldworld.c 2009-01-12 17:38:28 UTC (rev 6270)
+++ trunk/hw/ppc_oldworld.c 2009-01-12 17:40:23 UTC (rev 6271)
@@ -33,6 +33,7 @@
#include "pci.h"
#include "boards.h"
#include "fw_cfg.h"
+#include "escc.h"
#define MAX_IDE_BUS 2
#define VGA_BIOS_SIZE 65536
@@ -126,7 +127,7 @@
int vga_bios_size, bios_size;
qemu_irq *dummy_irq;
int pic_mem_index, nvram_mem_index, dbdma_mem_index, cuda_mem_index;
- int ide_mem_index[2];
+ int escc_mem_index, ide_mem_index[2];
int ppc_boot_device;
BlockDriverState *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
int index;
@@ -296,8 +297,8 @@
/* XXX: suppress that */
dummy_irq = i8259_init(NULL);
- /* XXX: use Mac Serial port */
- serial_init(0x3f8, dummy_irq[4], 115200, serial_hds[0]);
+ escc_mem_index = escc_init(0x80013000, pic[0x10], serial_hds[0],
+ serial_hds[1], ESCC_CLOCK, 4);
for(i = 0; i < nb_nics; i++) {
if (!nd_table[i].model)
@@ -350,7 +351,7 @@
dbdma_init(&dbdma_mem_index);
macio_init(pci_bus, 0x0010, 1, pic_mem_index, dbdma_mem_index,
- cuda_mem_index, nvr, 2, ide_mem_index);
+ cuda_mem_index, nvr, 2, ide_mem_index, escc_mem_index);
if (usb_enabled) {
usb_ohci_init_pci(pci_bus, 3, -1);
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [6271] Use ESCC for PowerMac serial
2009-01-12 17:40 [Qemu-devel] [6271] Use ESCC for PowerMac serial Blue Swirl
@ 2009-01-12 20:18 ` Aurelien Jarno
2009-01-12 20:32 ` Blue Swirl
0 siblings, 1 reply; 17+ messages in thread
From: Aurelien Jarno @ 2009-01-12 20:18 UTC (permalink / raw)
To: Blue Swirl; +Cc: qemu-devel
On Mon, Jan 12, 2009 at 05:40:24PM +0000, Blue Swirl wrote:
> Revision: 6271
> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6271
> Author: blueswir1
> Date: 2009-01-12 17:40:23 +0000 (Mon, 12 Jan 2009)
>
> Log Message:
> -----------
> Use ESCC for PowerMac serial
>
[snip]
> Modified: trunk/hw/ppc_oldworld.c
> ===================================================================
> --- trunk/hw/ppc_oldworld.c 2009-01-12 17:38:28 UTC (rev 6270)
> +++ trunk/hw/ppc_oldworld.c 2009-01-12 17:40:23 UTC (rev 6271)
> @@ -33,6 +33,7 @@
> #include "pci.h"
> #include "boards.h"
> #include "fw_cfg.h"
> +#include "escc.h"
>
> #define MAX_IDE_BUS 2
> #define VGA_BIOS_SIZE 65536
> @@ -126,7 +127,7 @@
> int vga_bios_size, bios_size;
> qemu_irq *dummy_irq;
> int pic_mem_index, nvram_mem_index, dbdma_mem_index, cuda_mem_index;
> - int ide_mem_index[2];
> + int escc_mem_index, ide_mem_index[2];
> int ppc_boot_device;
> BlockDriverState *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
> int index;
> @@ -296,8 +297,8 @@
> /* XXX: suppress that */
> dummy_irq = i8259_init(NULL);
>
> - /* XXX: use Mac Serial port */
> - serial_init(0x3f8, dummy_irq[4], 115200, serial_hds[0]);
> + escc_mem_index = escc_init(0x80013000, pic[0x10], serial_hds[0],
> + serial_hds[1], ESCC_CLOCK, 4);
I don't think this address is correct. Also this is later mapped by
macio_init() later.
Also I have tried with the latest SVN of OpenBIOS (which includes the
corresponding patches for ESCC), and the machine doesn't boot anymore.
Using -serial stdio, I see
| >> =============================================================
| >> OpenBIOS 1.0RC1 [Jan 12 2009 19:28]
| >> Configuration device id QEMU version 1 machine id 2
| >> CPUs: 1
| >> Memory: 144M
| >> UUID: 00000000-0000-0000-0000-000000000000
| >> CPU type PowerPC,750
| >> Initializing PCI devices...
| >> 0:0.0 - 1057:2 - /pci -
| >> 0:1.0 - 1234:1111 - /pci/QEMU,VGA -
Then it hangs there.
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [6271] Use ESCC for PowerMac serial
2009-01-12 20:18 ` Aurelien Jarno
@ 2009-01-12 20:32 ` Blue Swirl
2009-01-12 20:40 ` Aurelien Jarno
0 siblings, 1 reply; 17+ messages in thread
From: Blue Swirl @ 2009-01-12 20:32 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: qemu-devel
On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> On Mon, Jan 12, 2009 at 05:40:24PM +0000, Blue Swirl wrote:
> > Revision: 6271
> > http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6271
> > Author: blueswir1
> > Date: 2009-01-12 17:40:23 +0000 (Mon, 12 Jan 2009)
> >
> > Log Message:
> > -----------
> > Use ESCC for PowerMac serial
> >
>
>
> [snip]
>
>
> > Modified: trunk/hw/ppc_oldworld.c
> > ===================================================================
> > --- trunk/hw/ppc_oldworld.c 2009-01-12 17:38:28 UTC (rev 6270)
> > +++ trunk/hw/ppc_oldworld.c 2009-01-12 17:40:23 UTC (rev 6271)
> > @@ -33,6 +33,7 @@
> > #include "pci.h"
> > #include "boards.h"
> > #include "fw_cfg.h"
> > +#include "escc.h"
> >
> > #define MAX_IDE_BUS 2
> > #define VGA_BIOS_SIZE 65536
> > @@ -126,7 +127,7 @@
> > int vga_bios_size, bios_size;
> > qemu_irq *dummy_irq;
> > int pic_mem_index, nvram_mem_index, dbdma_mem_index, cuda_mem_index;
> > - int ide_mem_index[2];
> > + int escc_mem_index, ide_mem_index[2];
> > int ppc_boot_device;
> > BlockDriverState *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
> > int index;
> > @@ -296,8 +297,8 @@
> > /* XXX: suppress that */
> > dummy_irq = i8259_init(NULL);
> >
> > - /* XXX: use Mac Serial port */
> > - serial_init(0x3f8, dummy_irq[4], 115200, serial_hds[0]);
> > + escc_mem_index = escc_init(0x80013000, pic[0x10], serial_hds[0],
> > + serial_hds[1], ESCC_CLOCK, 4);
>
>
> I don't think this address is correct. Also this is later mapped by
> macio_init() later.
It's there to enable some kind of serial console before PCI probing
and device mapping has been done, the address is arbitrary.
Maybe the new mapping could remove the old one.
> Also I have tried with the latest SVN of OpenBIOS (which includes the
> corresponding patches for ESCC), and the machine doesn't boot anymore.
> Using -serial stdio, I see
>
> | >> =============================================================
> | >> OpenBIOS 1.0RC1 [Jan 12 2009 19:28]
> | >> Configuration device id QEMU version 1 machine id 2
> | >> CPUs: 1
> | >> Memory: 144M
> | >> UUID: 00000000-0000-0000-0000-000000000000
> | >> CPU type PowerPC,750
> | >> Initializing PCI devices...
> | >> 0:0.0 - 1057:2 - /pci -
> | >> 0:1.0 - 1234:1111 - /pci/QEMU,VGA -
>
> Then it hangs there.
Strange, at least Debian 3.1 R8 (CD and direct -kernel), Debian 4.0 R5
(CD and direct -kernel), Debian 4.0 R6 and Gentoo 2008.0 act like
before.
What kind of setup do you have? At least OpenBIOS config is not
standard, you have enabled PCI debugging.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [6271] Use ESCC for PowerMac serial
2009-01-12 20:32 ` Blue Swirl
@ 2009-01-12 20:40 ` Aurelien Jarno
2009-01-12 20:48 ` Blue Swirl
2009-01-12 20:50 ` Aurelien Jarno
0 siblings, 2 replies; 17+ messages in thread
From: Aurelien Jarno @ 2009-01-12 20:40 UTC (permalink / raw)
To: Blue Swirl; +Cc: qemu-devel
On Mon, Jan 12, 2009 at 10:32:43PM +0200, Blue Swirl wrote:
> On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > On Mon, Jan 12, 2009 at 05:40:24PM +0000, Blue Swirl wrote:
> > > Revision: 6271
> > > http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6271
> > > Author: blueswir1
> > > Date: 2009-01-12 17:40:23 +0000 (Mon, 12 Jan 2009)
> > >
> > > Log Message:
> > > -----------
> > > Use ESCC for PowerMac serial
> > >
> >
> >
> > [snip]
> >
> >
> > > Modified: trunk/hw/ppc_oldworld.c
> > > ===================================================================
> > > --- trunk/hw/ppc_oldworld.c 2009-01-12 17:38:28 UTC (rev 6270)
> > > +++ trunk/hw/ppc_oldworld.c 2009-01-12 17:40:23 UTC (rev 6271)
> > > @@ -33,6 +33,7 @@
> > > #include "pci.h"
> > > #include "boards.h"
> > > #include "fw_cfg.h"
> > > +#include "escc.h"
> > >
> > > #define MAX_IDE_BUS 2
> > > #define VGA_BIOS_SIZE 65536
> > > @@ -126,7 +127,7 @@
> > > int vga_bios_size, bios_size;
> > > qemu_irq *dummy_irq;
> > > int pic_mem_index, nvram_mem_index, dbdma_mem_index, cuda_mem_index;
> > > - int ide_mem_index[2];
> > > + int escc_mem_index, ide_mem_index[2];
> > > int ppc_boot_device;
> > > BlockDriverState *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
> > > int index;
> > > @@ -296,8 +297,8 @@
> > > /* XXX: suppress that */
> > > dummy_irq = i8259_init(NULL);
> > >
> > > - /* XXX: use Mac Serial port */
> > > - serial_init(0x3f8, dummy_irq[4], 115200, serial_hds[0]);
> > > + escc_mem_index = escc_init(0x80013000, pic[0x10], serial_hds[0],
> > > + serial_hds[1], ESCC_CLOCK, 4);
> >
> >
> > I don't think this address is correct. Also this is later mapped by
> > macio_init() later.
>
> It's there to enable some kind of serial console before PCI probing
> and device mapping has been done, the address is arbitrary.
>
> Maybe the new mapping could remove the old one.
Ok, I see.
> > Also I have tried with the latest SVN of OpenBIOS (which includes the
> > corresponding patches for ESCC), and the machine doesn't boot anymore.
> > Using -serial stdio, I see
> >
> > | >> =============================================================
> > | >> OpenBIOS 1.0RC1 [Jan 12 2009 19:28]
> > | >> Configuration device id QEMU version 1 machine id 2
> > | >> CPUs: 1
> > | >> Memory: 144M
> > | >> UUID: 00000000-0000-0000-0000-000000000000
> > | >> CPU type PowerPC,750
> > | >> Initializing PCI devices...
> > | >> 0:0.0 - 1057:2 - /pci -
> > | >> 0:1.0 - 1234:1111 - /pci/QEMU,VGA -
> >
> > Then it hangs there.
>
> Strange, at least Debian 3.1 R8 (CD and direct -kernel), Debian 4.0 R5
> (CD and direct -kernel), Debian 4.0 R6 and Gentoo 2008.0 act like
> before.
I have the same problem with a CDROM, an hard disk, -kernel.
> What kind of setup do you have? At least OpenBIOS config is not
> standard, you have enabled PCI debugging.
I have built OpenBIOS by hand, native build. This is the unmodified SVN.
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [6271] Use ESCC for PowerMac serial
2009-01-12 20:40 ` Aurelien Jarno
@ 2009-01-12 20:48 ` Blue Swirl
2009-01-12 21:10 ` Aurelien Jarno
2009-01-12 20:50 ` Aurelien Jarno
1 sibling, 1 reply; 17+ messages in thread
From: Blue Swirl @ 2009-01-12 20:48 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: qemu-devel
On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> On Mon, Jan 12, 2009 at 10:32:43PM +0200, Blue Swirl wrote:
> > On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > > On Mon, Jan 12, 2009 at 05:40:24PM +0000, Blue Swirl wrote:
> > > > Revision: 6271
> > > > http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6271
> > > > Author: blueswir1
> > > > Date: 2009-01-12 17:40:23 +0000 (Mon, 12 Jan 2009)
> > > >
> > > > Log Message:
> > > > -----------
> > > > Use ESCC for PowerMac serial
> > > >
> > >
> > >
> > > [snip]
> > >
> > >
> > > > Modified: trunk/hw/ppc_oldworld.c
> > > > ===================================================================
> > > > --- trunk/hw/ppc_oldworld.c 2009-01-12 17:38:28 UTC (rev 6270)
> > > > +++ trunk/hw/ppc_oldworld.c 2009-01-12 17:40:23 UTC (rev 6271)
> > > > @@ -33,6 +33,7 @@
> > > > #include "pci.h"
> > > > #include "boards.h"
> > > > #include "fw_cfg.h"
> > > > +#include "escc.h"
> > > >
> > > > #define MAX_IDE_BUS 2
> > > > #define VGA_BIOS_SIZE 65536
> > > > @@ -126,7 +127,7 @@
> > > > int vga_bios_size, bios_size;
> > > > qemu_irq *dummy_irq;
> > > > int pic_mem_index, nvram_mem_index, dbdma_mem_index, cuda_mem_index;
> > > > - int ide_mem_index[2];
> > > > + int escc_mem_index, ide_mem_index[2];
> > > > int ppc_boot_device;
> > > > BlockDriverState *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
> > > > int index;
> > > > @@ -296,8 +297,8 @@
> > > > /* XXX: suppress that */
> > > > dummy_irq = i8259_init(NULL);
> > > >
> > > > - /* XXX: use Mac Serial port */
> > > > - serial_init(0x3f8, dummy_irq[4], 115200, serial_hds[0]);
> > > > + escc_mem_index = escc_init(0x80013000, pic[0x10], serial_hds[0],
> > > > + serial_hds[1], ESCC_CLOCK, 4);
> > >
> > >
> > > I don't think this address is correct. Also this is later mapped by
> > > macio_init() later.
> >
> > It's there to enable some kind of serial console before PCI probing
> > and device mapping has been done, the address is arbitrary.
> >
> > Maybe the new mapping could remove the old one.
>
>
> Ok, I see.
>
>
> > > Also I have tried with the latest SVN of OpenBIOS (which includes the
> > > corresponding patches for ESCC), and the machine doesn't boot anymore.
> > > Using -serial stdio, I see
> > >
> > > | >> =============================================================
> > > | >> OpenBIOS 1.0RC1 [Jan 12 2009 19:28]
> > > | >> Configuration device id QEMU version 1 machine id 2
> > > | >> CPUs: 1
> > > | >> Memory: 144M
> > > | >> UUID: 00000000-0000-0000-0000-000000000000
> > > | >> CPU type PowerPC,750
> > > | >> Initializing PCI devices...
> > > | >> 0:0.0 - 1057:2 - /pci -
> > > | >> 0:1.0 - 1234:1111 - /pci/QEMU,VGA -
> > >
> > > Then it hangs there.
> >
> > Strange, at least Debian 3.1 R8 (CD and direct -kernel), Debian 4.0 R5
> > (CD and direct -kernel), Debian 4.0 R6 and Gentoo 2008.0 act like
> > before.
>
>
> I have the same problem with a CDROM, an hard disk, -kernel.
>
>
> > What kind of setup do you have? At least OpenBIOS config is not
> > standard, you have enabled PCI debugging.
>
>
> I have built OpenBIOS by hand, native build. This is the unmodified SVN.
Try r396 :-).
Actually, it looks like serial output during PCI probing breaks something.
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [6271] Use ESCC for PowerMac serial
2009-01-12 20:40 ` Aurelien Jarno
2009-01-12 20:48 ` Blue Swirl
@ 2009-01-12 20:50 ` Aurelien Jarno
2009-01-12 20:59 ` Blue Swirl
1 sibling, 1 reply; 17+ messages in thread
From: Aurelien Jarno @ 2009-01-12 20:50 UTC (permalink / raw)
To: Blue Swirl; +Cc: qemu-devel
On Mon, Jan 12, 2009 at 09:40:49PM +0100, Aurelien Jarno wrote:
> On Mon, Jan 12, 2009 at 10:32:43PM +0200, Blue Swirl wrote:
> > On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > > On Mon, Jan 12, 2009 at 05:40:24PM +0000, Blue Swirl wrote:
> >
> > Strange, at least Debian 3.1 R8 (CD and direct -kernel), Debian 4.0 R5
> > (CD and direct -kernel), Debian 4.0 R6 and Gentoo 2008.0 act like
> > before.
>
> I have the same problem with a CDROM, an hard disk, -kernel.
>
> > What kind of setup do you have? At least OpenBIOS config is not
> > standard, you have enabled PCI debugging.
>
> I have built OpenBIOS by hand, native build. This is the unmodified SVN.
>
The PCI debugging is enabled by default on the native build, and disable
on the cross-build. Disabling the PCI code fixes (or workarounds?) the
problem.
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [6271] Use ESCC for PowerMac serial
2009-01-12 20:50 ` Aurelien Jarno
@ 2009-01-12 20:59 ` Blue Swirl
2009-01-12 21:10 ` Aurelien Jarno
2009-01-13 17:03 ` Aurelien Jarno
0 siblings, 2 replies; 17+ messages in thread
From: Blue Swirl @ 2009-01-12 20:59 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1105 bytes --]
On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> On Mon, Jan 12, 2009 at 09:40:49PM +0100, Aurelien Jarno wrote:
> > On Mon, Jan 12, 2009 at 10:32:43PM +0200, Blue Swirl wrote:
> > > On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > > > On Mon, Jan 12, 2009 at 05:40:24PM +0000, Blue Swirl wrote:
> > >
>
> > > Strange, at least Debian 3.1 R8 (CD and direct -kernel), Debian 4.0 R5
> > > (CD and direct -kernel), Debian 4.0 R6 and Gentoo 2008.0 act like
> > > before.
> >
> > I have the same problem with a CDROM, an hard disk, -kernel.
> >
> > > What kind of setup do you have? At least OpenBIOS config is not
> > > standard, you have enabled PCI debugging.
> >
> > I have built OpenBIOS by hand, native build. This is the unmodified SVN.
> >
>
>
> The PCI debugging is enabled by default on the native build, and disable
> on the cross-build. Disabling the PCI code fixes (or workarounds?) the
> problem.
It looks like the address of the boot serial is bad, if I change it to
0x7f013000, PCI debug output works. Maybe something maps over the
address at some point.
[-- Attachment #2: q_adjust_boot_serial_address.diff --]
[-- Type: plain/text, Size: 1139 bytes --]
[-- Attachment #3: o_adjust_boot_serial_address.diff --]
[-- Type: plain/text, Size: 516 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [6271] Use ESCC for PowerMac serial
2009-01-12 20:48 ` Blue Swirl
@ 2009-01-12 21:10 ` Aurelien Jarno
0 siblings, 0 replies; 17+ messages in thread
From: Aurelien Jarno @ 2009-01-12 21:10 UTC (permalink / raw)
To: qemu-devel
On Mon, Jan 12, 2009 at 10:48:06PM +0200, Blue Swirl wrote:
> On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > On Mon, Jan 12, 2009 at 10:32:43PM +0200, Blue Swirl wrote:
> > > On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > > > On Mon, Jan 12, 2009 at 05:40:24PM +0000, Blue Swirl wrote:
> > > > > Revision: 6271
> > > > > http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6271
> > > > > Author: blueswir1
> > > > > Date: 2009-01-12 17:40:23 +0000 (Mon, 12 Jan 2009)
> > > > >
> > > > > Log Message:
> > > > > -----------
> > > > > Use ESCC for PowerMac serial
> > > > >
> > > >
> > > >
> > > > [snip]
> > > >
> > > >
> > > > > Modified: trunk/hw/ppc_oldworld.c
> > > > > ===================================================================
> > > > > --- trunk/hw/ppc_oldworld.c 2009-01-12 17:38:28 UTC (rev 6270)
> > > > > +++ trunk/hw/ppc_oldworld.c 2009-01-12 17:40:23 UTC (rev 6271)
> > > > > @@ -33,6 +33,7 @@
> > > > > #include "pci.h"
> > > > > #include "boards.h"
> > > > > #include "fw_cfg.h"
> > > > > +#include "escc.h"
> > > > >
> > > > > #define MAX_IDE_BUS 2
> > > > > #define VGA_BIOS_SIZE 65536
> > > > > @@ -126,7 +127,7 @@
> > > > > int vga_bios_size, bios_size;
> > > > > qemu_irq *dummy_irq;
> > > > > int pic_mem_index, nvram_mem_index, dbdma_mem_index, cuda_mem_index;
> > > > > - int ide_mem_index[2];
> > > > > + int escc_mem_index, ide_mem_index[2];
> > > > > int ppc_boot_device;
> > > > > BlockDriverState *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
> > > > > int index;
> > > > > @@ -296,8 +297,8 @@
> > > > > /* XXX: suppress that */
> > > > > dummy_irq = i8259_init(NULL);
> > > > >
> > > > > - /* XXX: use Mac Serial port */
> > > > > - serial_init(0x3f8, dummy_irq[4], 115200, serial_hds[0]);
> > > > > + escc_mem_index = escc_init(0x80013000, pic[0x10], serial_hds[0],
> > > > > + serial_hds[1], ESCC_CLOCK, 4);
> > > >
> > > >
> > > > I don't think this address is correct. Also this is later mapped by
> > > > macio_init() later.
> > >
> > > It's there to enable some kind of serial console before PCI probing
> > > and device mapping has been done, the address is arbitrary.
> > >
> > > Maybe the new mapping could remove the old one.
> >
> >
> > Ok, I see.
> >
> >
> > > > Also I have tried with the latest SVN of OpenBIOS (which includes the
> > > > corresponding patches for ESCC), and the machine doesn't boot anymore.
> > > > Using -serial stdio, I see
> > > >
> > > > | >> =============================================================
> > > > | >> OpenBIOS 1.0RC1 [Jan 12 2009 19:28]
> > > > | >> Configuration device id QEMU version 1 machine id 2
> > > > | >> CPUs: 1
> > > > | >> Memory: 144M
> > > > | >> UUID: 00000000-0000-0000-0000-000000000000
> > > > | >> CPU type PowerPC,750
> > > > | >> Initializing PCI devices...
> > > > | >> 0:0.0 - 1057:2 - /pci -
> > > > | >> 0:1.0 - 1234:1111 - /pci/QEMU,VGA -
> > > >
> > > > Then it hangs there.
> > >
> > > Strange, at least Debian 3.1 R8 (CD and direct -kernel), Debian 4.0 R5
> > > (CD and direct -kernel), Debian 4.0 R6 and Gentoo 2008.0 act like
> > > before.
> >
> >
> > I have the same problem with a CDROM, an hard disk, -kernel.
> >
> >
> > > What kind of setup do you have? At least OpenBIOS config is not
> > > standard, you have enabled PCI debugging.
> >
> >
> > I have built OpenBIOS by hand, native build. This is the unmodified SVN.
>
> Try r396 :-).
>
> Actually, it looks like serial output during PCI probing breaks something.
>
I confirm it works. Thanks.
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [6271] Use ESCC for PowerMac serial
2009-01-12 20:59 ` Blue Swirl
@ 2009-01-12 21:10 ` Aurelien Jarno
2009-01-13 17:03 ` Aurelien Jarno
1 sibling, 0 replies; 17+ messages in thread
From: Aurelien Jarno @ 2009-01-12 21:10 UTC (permalink / raw)
To: qemu-devel
On Mon, Jan 12, 2009 at 10:59:11PM +0200, Blue Swirl wrote:
> On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > On Mon, Jan 12, 2009 at 09:40:49PM +0100, Aurelien Jarno wrote:
> > > On Mon, Jan 12, 2009 at 10:32:43PM +0200, Blue Swirl wrote:
> > > > On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > > > > On Mon, Jan 12, 2009 at 05:40:24PM +0000, Blue Swirl wrote:
> > > >
> >
> > > > Strange, at least Debian 3.1 R8 (CD and direct -kernel), Debian 4.0 R5
> > > > (CD and direct -kernel), Debian 4.0 R6 and Gentoo 2008.0 act like
> > > > before.
> > >
> > > I have the same problem with a CDROM, an hard disk, -kernel.
> > >
> > > > What kind of setup do you have? At least OpenBIOS config is not
> > > > standard, you have enabled PCI debugging.
> > >
> > > I have built OpenBIOS by hand, native build. This is the unmodified SVN.
> > >
> >
> >
> > The PCI debugging is enabled by default on the native build, and disable
> > on the cross-build. Disabling the PCI code fixes (or workarounds?) the
> > problem.
>
> It looks like the address of the boot serial is bad, if I change it to
> 0x7f013000, PCI debug output works. Maybe something maps over the
> address at some point.
It also works here.
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [6271] Use ESCC for PowerMac serial
2009-01-12 20:59 ` Blue Swirl
2009-01-12 21:10 ` Aurelien Jarno
@ 2009-01-13 17:03 ` Aurelien Jarno
2009-01-13 17:21 ` Blue Swirl
2009-01-13 20:46 ` Laurent Vivier
1 sibling, 2 replies; 17+ messages in thread
From: Aurelien Jarno @ 2009-01-13 17:03 UTC (permalink / raw)
To: Blue Swirl; +Cc: qemu-devel
On Mon, Jan 12, 2009 at 10:59:11PM +0200, Blue Swirl wrote:
> On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > On Mon, Jan 12, 2009 at 09:40:49PM +0100, Aurelien Jarno wrote:
> > > On Mon, Jan 12, 2009 at 10:32:43PM +0200, Blue Swirl wrote:
> > > > On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > > > > On Mon, Jan 12, 2009 at 05:40:24PM +0000, Blue Swirl wrote:
> > > >
> >
> > > > Strange, at least Debian 3.1 R8 (CD and direct -kernel), Debian 4.0 R5
> > > > (CD and direct -kernel), Debian 4.0 R6 and Gentoo 2008.0 act like
> > > > before.
> > >
> > > I have the same problem with a CDROM, an hard disk, -kernel.
> > >
> > > > What kind of setup do you have? At least OpenBIOS config is not
> > > > standard, you have enabled PCI debugging.
> > >
> > > I have built OpenBIOS by hand, native build. This is the unmodified SVN.
> > >
> >
> >
> > The PCI debugging is enabled by default on the native build, and disable
> > on the cross-build. Disabling the PCI code fixes (or workarounds?) the
> > problem.
>
> It looks like the address of the boot serial is bad, if I change it to
> 0x7f013000, PCI debug output works. Maybe something maps over the
> address at some point.
0x80013000 is in the middle of the PCI space, so you are hitting another
device, probably the VGA card. 0x7f013000 is unused but we have to limit
the memory to 2032MiB
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [6271] Use ESCC for PowerMac serial
2009-01-13 17:03 ` Aurelien Jarno
@ 2009-01-13 17:21 ` Blue Swirl
2009-01-13 17:28 ` Aurelien Jarno
2009-01-13 20:46 ` Laurent Vivier
1 sibling, 1 reply; 17+ messages in thread
From: Blue Swirl @ 2009-01-13 17:21 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: qemu-devel
On 1/13/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> On Mon, Jan 12, 2009 at 10:59:11PM +0200, Blue Swirl wrote:
> > On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > > On Mon, Jan 12, 2009 at 09:40:49PM +0100, Aurelien Jarno wrote:
> > > > On Mon, Jan 12, 2009 at 10:32:43PM +0200, Blue Swirl wrote:
> > > > > On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > > > > > On Mon, Jan 12, 2009 at 05:40:24PM +0000, Blue Swirl wrote:
> > > > >
> > >
> > > > > Strange, at least Debian 3.1 R8 (CD and direct -kernel), Debian 4.0 R5
> > > > > (CD and direct -kernel), Debian 4.0 R6 and Gentoo 2008.0 act like
> > > > > before.
> > > >
> > > > I have the same problem with a CDROM, an hard disk, -kernel.
> > > >
> > > > > What kind of setup do you have? At least OpenBIOS config is not
> > > > > standard, you have enabled PCI debugging.
> > > >
> > > > I have built OpenBIOS by hand, native build. This is the unmodified SVN.
> > > >
> > >
> > >
> > > The PCI debugging is enabled by default on the native build, and disable
> > > on the cross-build. Disabling the PCI code fixes (or workarounds?) the
> > > problem.
> >
> > It looks like the address of the boot serial is bad, if I change it to
> > 0x7f013000, PCI debug output works. Maybe something maps over the
> > address at some point.
>
>
> 0x80013000 is in the middle of the PCI space, so you are hitting another
> device, probably the VGA card. 0x7f013000 is unused but we have to limit
> the memory to 2032MiB
How about some higher address then, like 0xef013000?
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [6271] Use ESCC for PowerMac serial
2009-01-13 17:21 ` Blue Swirl
@ 2009-01-13 17:28 ` Aurelien Jarno
2009-01-13 20:12 ` Blue Swirl
2009-01-13 21:28 ` Laurent Vivier
0 siblings, 2 replies; 17+ messages in thread
From: Aurelien Jarno @ 2009-01-13 17:28 UTC (permalink / raw)
To: Blue Swirl; +Cc: qemu-devel
Blue Swirl a écrit :
> On 1/13/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
>> On Mon, Jan 12, 2009 at 10:59:11PM +0200, Blue Swirl wrote:
>> > On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
>> > > On Mon, Jan 12, 2009 at 09:40:49PM +0100, Aurelien Jarno wrote:
>> > > > On Mon, Jan 12, 2009 at 10:32:43PM +0200, Blue Swirl wrote:
>> > > > > On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
>> > > > > > On Mon, Jan 12, 2009 at 05:40:24PM +0000, Blue Swirl wrote:
>> > > > >
>> > >
>> > > > > Strange, at least Debian 3.1 R8 (CD and direct -kernel), Debian 4.0 R5
>> > > > > (CD and direct -kernel), Debian 4.0 R6 and Gentoo 2008.0 act like
>> > > > > before.
>> > > >
>> > > > I have the same problem with a CDROM, an hard disk, -kernel.
>> > > >
>> > > > > What kind of setup do you have? At least OpenBIOS config is not
>> > > > > standard, you have enabled PCI debugging.
>> > > >
>> > > > I have built OpenBIOS by hand, native build. This is the unmodified SVN.
>> > > >
>> > >
>> > >
>> > > The PCI debugging is enabled by default on the native build, and disable
>> > > on the cross-build. Disabling the PCI code fixes (or workarounds?) the
>> > > problem.
>> >
>> > It looks like the address of the boot serial is bad, if I change it to
>> > 0x7f013000, PCI debug output works. Maybe something maps over the
>> > address at some point.
>>
>>
>> 0x80013000 is in the middle of the PCI space, so you are hitting another
>> device, probably the VGA card. 0x7f013000 is unused but we have to limit
>> the memory to 2032MiB
>
> How about some higher address then, like 0xef013000?
>
The PCI space uses 80000000-fdffffff. The ISA IO space uses
fe000000-fe0200000. OpenBios uses 0xfff00000-0xffffffff. This leaves
very few possibilities.
Alternatively we can map the whole MacIO device at a fixed location
which also makes the location of the serial ports fixed. The G3 beige
uses f3000000-f307ffff for the MacIO device.
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [6271] Use ESCC for PowerMac serial
2009-01-13 17:28 ` Aurelien Jarno
@ 2009-01-13 20:12 ` Blue Swirl
2009-01-13 21:24 ` Aurelien Jarno
2009-01-13 21:28 ` Laurent Vivier
1 sibling, 1 reply; 17+ messages in thread
From: Blue Swirl @ 2009-01-13 20:12 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: qemu-devel
On 1/13/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> Blue Swirl a écrit :
>
> > On 1/13/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> >> On Mon, Jan 12, 2009 at 10:59:11PM +0200, Blue Swirl wrote:
> >> > On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> >> > > On Mon, Jan 12, 2009 at 09:40:49PM +0100, Aurelien Jarno wrote:
> >> > > > On Mon, Jan 12, 2009 at 10:32:43PM +0200, Blue Swirl wrote:
> >> > > > > On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> >> > > > > > On Mon, Jan 12, 2009 at 05:40:24PM +0000, Blue Swirl wrote:
> >> > > > >
> >> > >
> >> > > > > Strange, at least Debian 3.1 R8 (CD and direct -kernel), Debian 4.0 R5
> >> > > > > (CD and direct -kernel), Debian 4.0 R6 and Gentoo 2008.0 act like
> >> > > > > before.
> >> > > >
> >> > > > I have the same problem with a CDROM, an hard disk, -kernel.
> >> > > >
> >> > > > > What kind of setup do you have? At least OpenBIOS config is not
> >> > > > > standard, you have enabled PCI debugging.
> >> > > >
> >> > > > I have built OpenBIOS by hand, native build. This is the unmodified SVN.
> >> > > >
> >> > >
> >> > >
> >> > > The PCI debugging is enabled by default on the native build, and disable
> >> > > on the cross-build. Disabling the PCI code fixes (or workarounds?) the
> >> > > problem.
> >> >
> >> > It looks like the address of the boot serial is bad, if I change it to
> >> > 0x7f013000, PCI debug output works. Maybe something maps over the
> >> > address at some point.
> >>
> >>
> >> 0x80013000 is in the middle of the PCI space, so you are hitting another
> >> device, probably the VGA card. 0x7f013000 is unused but we have to limit
> >> the memory to 2032MiB
> >
> > How about some higher address then, like 0xef013000?
> >
>
>
> The PCI space uses 80000000-fdffffff. The ISA IO space uses
> fe000000-fe0200000. OpenBios uses 0xfff00000-0xffffffff. This leaves
> very few possibilities.
>
> Alternatively we can map the whole MacIO device at a fixed location
> which also makes the location of the serial ports fixed. The G3 beige
> uses f3000000-f307ffff for the MacIO device.
I just wonder what this means for PCI mapping, will MacIO appear twice
(like ESCC now)?
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [6271] Use ESCC for PowerMac serial
2009-01-13 17:03 ` Aurelien Jarno
2009-01-13 17:21 ` Blue Swirl
@ 2009-01-13 20:46 ` Laurent Vivier
2009-01-13 21:41 ` Aurelien Jarno
1 sibling, 1 reply; 17+ messages in thread
From: Laurent Vivier @ 2009-01-13 20:46 UTC (permalink / raw)
To: qemu-devel
Le 13 janv. 09 à 18:03, Aurelien Jarno a écrit :
> On Mon, Jan 12, 2009 at 10:59:11PM +0200, Blue Swirl wrote:
>> On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
>>> On Mon, Jan 12, 2009 at 09:40:49PM +0100, Aurelien Jarno wrote:
>>>> On Mon, Jan 12, 2009 at 10:32:43PM +0200, Blue Swirl wrote:
>>>>> On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
>>>>>> On Mon, Jan 12, 2009 at 05:40:24PM +0000, Blue Swirl wrote:
>>>>>
>>>
>>>>> Strange, at least Debian 3.1 R8 (CD and direct -kernel), Debian
>>>>> 4.0 R5
>>>>> (CD and direct -kernel), Debian 4.0 R6 and Gentoo 2008.0 act like
>>>>> before.
>>>>
>>>> I have the same problem with a CDROM, an hard disk, -kernel.
>>>>
>>>>> What kind of setup do you have? At least OpenBIOS config is not
>>>>> standard, you have enabled PCI debugging.
>>>>
>>>> I have built OpenBIOS by hand, native build. This is the
>>>> unmodified SVN.
>>>>
>>>
>>>
>>> The PCI debugging is enabled by default on the native build, and
>>> disable
>>> on the cross-build. Disabling the PCI code fixes (or workarounds?)
>>> the
>>> problem.
>>
>> It looks like the address of the boot serial is bad, if I change it
>> to
>> 0x7f013000, PCI debug output works. Maybe something maps over the
>> address at some point.
>
> 0x80013000 is in the middle of the PCI space, so you are hitting
> another
> device, probably the VGA card. 0x7f013000 is unused but we have to
> limit
> the memory to 2032MiB
Maximum ram size of G3/beige is 768 MB:
http://apple-history.com/?page=gallery&model=g3
Laurent
-------------------- laurent@lvivier.info --------------------
"Tout ce qui est impossible reste à accomplir" Jules Verne
"Things are only impossible until they're not" Jean-Luc Picard
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [6271] Use ESCC for PowerMac serial
2009-01-13 20:12 ` Blue Swirl
@ 2009-01-13 21:24 ` Aurelien Jarno
0 siblings, 0 replies; 17+ messages in thread
From: Aurelien Jarno @ 2009-01-13 21:24 UTC (permalink / raw)
To: Blue Swirl; +Cc: qemu-devel
On Tue, Jan 13, 2009 at 10:12:10PM +0200, Blue Swirl wrote:
> On 1/13/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > Blue Swirl a écrit :
> >
> > > On 1/13/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > >> On Mon, Jan 12, 2009 at 10:59:11PM +0200, Blue Swirl wrote:
> > >> > On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > >> > > On Mon, Jan 12, 2009 at 09:40:49PM +0100, Aurelien Jarno wrote:
> > >> > > > On Mon, Jan 12, 2009 at 10:32:43PM +0200, Blue Swirl wrote:
> > >> > > > > On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > >> > > > > > On Mon, Jan 12, 2009 at 05:40:24PM +0000, Blue Swirl wrote:
> > >> > > > >
> > >> > >
> > >> > > > > Strange, at least Debian 3.1 R8 (CD and direct -kernel), Debian 4.0 R5
> > >> > > > > (CD and direct -kernel), Debian 4.0 R6 and Gentoo 2008.0 act like
> > >> > > > > before.
> > >> > > >
> > >> > > > I have the same problem with a CDROM, an hard disk, -kernel.
> > >> > > >
> > >> > > > > What kind of setup do you have? At least OpenBIOS config is not
> > >> > > > > standard, you have enabled PCI debugging.
> > >> > > >
> > >> > > > I have built OpenBIOS by hand, native build. This is the unmodified SVN.
> > >> > > >
> > >> > >
> > >> > >
> > >> > > The PCI debugging is enabled by default on the native build, and disable
> > >> > > on the cross-build. Disabling the PCI code fixes (or workarounds?) the
> > >> > > problem.
> > >> >
> > >> > It looks like the address of the boot serial is bad, if I change it to
> > >> > 0x7f013000, PCI debug output works. Maybe something maps over the
> > >> > address at some point.
> > >>
> > >>
> > >> 0x80013000 is in the middle of the PCI space, so you are hitting another
> > >> device, probably the VGA card. 0x7f013000 is unused but we have to limit
> > >> the memory to 2032MiB
> > >
> > > How about some higher address then, like 0xef013000?
> > >
> >
> >
> > The PCI space uses 80000000-fdffffff. The ISA IO space uses
> > fe000000-fe0200000. OpenBios uses 0xfff00000-0xffffffff. This leaves
> > very few possibilities.
> >
> > Alternatively we can map the whole MacIO device at a fixed location
> > which also makes the location of the serial ports fixed. The G3 beige
> > uses f3000000-f307ffff for the MacIO device.
>
> I just wonder what this means for PCI mapping, will MacIO appear twice
> (like ESCC now)?
What I mean is to make QEMU assign the address f3000000 to the MacIO
device like on the real machine. Then OpenBIOS should not modify this
memory assignation while looping on the PCI devices. This way, the
address of the serial port will be known (0xf3013020) and we can map
the address of the serial port only once.
This may be difficult technically though.
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [6271] Use ESCC for PowerMac serial
2009-01-13 17:28 ` Aurelien Jarno
2009-01-13 20:12 ` Blue Swirl
@ 2009-01-13 21:28 ` Laurent Vivier
1 sibling, 0 replies; 17+ messages in thread
From: Laurent Vivier @ 2009-01-13 21:28 UTC (permalink / raw)
To: qemu-devel
Le 13 janv. 09 à 18:28, Aurelien Jarno a écrit :
>>> [...]
>>> 0x80013000 is in the middle of the PCI space, so you are hitting
>>> another
>>> device, probably the VGA card. 0x7f013000 is unused but we have to
>>> limit
>>> the memory to 2032MiB
>>
>> How about some higher address then, like 0xef013000?
>>
>
> The PCI space uses 80000000-fdffffff. The ISA IO space uses
> fe000000-fe0200000. OpenBios uses 0xfff00000-0xffffffff. This leaves
> very few possibilities.
>
> Alternatively we can map the whole MacIO device at a fixed location
> which also makes the location of the serial ports fixed. The G3 beige
> uses f3000000-f307ffff for the MacIO device.
According to the mac-io "reg" property of the beige device-tree this
value seems hardcoded in the hardware, so perhaps Qemu can do the same
thing ?
Laurent
-------------------- laurent@lvivier.info --------------------
"Tout ce qui est impossible reste à accomplir" Jules Verne
"Things are only impossible until they're not" Jean-Luc Picard
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Qemu-devel] [6271] Use ESCC for PowerMac serial
2009-01-13 20:46 ` Laurent Vivier
@ 2009-01-13 21:41 ` Aurelien Jarno
0 siblings, 0 replies; 17+ messages in thread
From: Aurelien Jarno @ 2009-01-13 21:41 UTC (permalink / raw)
To: qemu-devel
On Tue, Jan 13, 2009 at 09:46:09PM +0100, Laurent Vivier wrote:
>
> Le 13 janv. 09 à 18:03, Aurelien Jarno a écrit :
>
>> On Mon, Jan 12, 2009 at 10:59:11PM +0200, Blue Swirl wrote:
>>> On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
>>>> On Mon, Jan 12, 2009 at 09:40:49PM +0100, Aurelien Jarno wrote:
>>>>> On Mon, Jan 12, 2009 at 10:32:43PM +0200, Blue Swirl wrote:
>>>>>> On 1/12/09, Aurelien Jarno <aurelien@aurel32.net> wrote:
>>>>>>> On Mon, Jan 12, 2009 at 05:40:24PM +0000, Blue Swirl wrote:
>>>>>>
>>>>
>>>>>> Strange, at least Debian 3.1 R8 (CD and direct -kernel), Debian
>>>>>> 4.0 R5
>>>>>> (CD and direct -kernel), Debian 4.0 R6 and Gentoo 2008.0 act like
>>>>>> before.
>>>>>
>>>>> I have the same problem with a CDROM, an hard disk, -kernel.
>>>>>
>>>>>> What kind of setup do you have? At least OpenBIOS config is not
>>>>>> standard, you have enabled PCI debugging.
>>>>>
>>>>> I have built OpenBIOS by hand, native build. This is the
>>>>> unmodified SVN.
>>>>>
>>>>
>>>>
>>>> The PCI debugging is enabled by default on the native build, and
>>>> disable
>>>> on the cross-build. Disabling the PCI code fixes (or workarounds?)
>>>> the
>>>> problem.
>>>
>>> It looks like the address of the boot serial is bad, if I change it
>>> to
>>> 0x7f013000, PCI debug output works. Maybe something maps over the
>>> address at some point.
>>
>> 0x80013000 is in the middle of the PCI space, so you are hitting
>> another
>> device, probably the VGA card. 0x7f013000 is unused but we have to
>> limit
>> the memory to 2032MiB
>
>
> Maximum ram size of G3/beige is 768 MB:
>
> http://apple-history.com/?page=gallery&model=g3
>
Agreed, but a Linux kernel works perfectly with up to 2037MB(*) on the
emulated version of the machine. I don't think it is really useful to
limit the size of the memory to 768MB in QEMU.
Aurelien
(*) The PCI bus is mapped at 0x80000000. At the end of the RAM we load
the video bios (video.x). BTW, I don't know if Mac OS uses that but
Linux doesn't use it.
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2009-01-13 21:41 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-12 17:40 [Qemu-devel] [6271] Use ESCC for PowerMac serial Blue Swirl
2009-01-12 20:18 ` Aurelien Jarno
2009-01-12 20:32 ` Blue Swirl
2009-01-12 20:40 ` Aurelien Jarno
2009-01-12 20:48 ` Blue Swirl
2009-01-12 21:10 ` Aurelien Jarno
2009-01-12 20:50 ` Aurelien Jarno
2009-01-12 20:59 ` Blue Swirl
2009-01-12 21:10 ` Aurelien Jarno
2009-01-13 17:03 ` Aurelien Jarno
2009-01-13 17:21 ` Blue Swirl
2009-01-13 17:28 ` Aurelien Jarno
2009-01-13 20:12 ` Blue Swirl
2009-01-13 21:24 ` Aurelien Jarno
2009-01-13 21:28 ` Laurent Vivier
2009-01-13 20:46 ` Laurent Vivier
2009-01-13 21:41 ` Aurelien Jarno
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).