[OpenBIOS] [PATCH] Use exception vectors from ROM instead of copying them to page zero

BALATON Zoltan balaton at eik.bme.hu
Thu May 29 01:31:08 CEST 2014


On Thu, 29 May 2014, Alexander Graf wrote:
>> diff --git a/openbios-devel/drivers/macio.c 
>> b/openbios-devel/drivers/macio.c
>> index 00d7149..fc08c30 100644
>> --- a/openbios-devel/drivers/macio.c
>> +++ b/openbios-devel/drivers/macio.c
>> @@ -311,7 +312,7 @@ ob_macio_keylargo_init(const char *path, phys_addr_t 
>> addr)
>>          /* The NewWorld NVRAM is not located in the MacIO device */
>>          macio_nvram_init("", 0);
>>          escc_init(path, addr);
>> -        macio_ide_init(path, addr, 3);
>> +        macio_ide_init(path, addr, 2);
>
> If real hardware emulates 3 ports, QEMU should do so as well. If it emulates 
> 2, then this patch is correct. Do you have any reference dts that can show 
> which one it is?

In qemu/hw/misc/macio/macio.c only 2 ide ports are initialised. Also 
there's a comment in qemu/hw/ppc/mac_newworld.c saying the same. But look 
at the device tree dumps that I referenced at the end of my QEMU patch. 
Real hardware has three ports that are named:

ff87e5a0:       /ata-4 at 1f000
ff880318:         /disk
ff8809e8:       /ata-3 at 20000
ff882760:         /disk
ff882da8:       /ata-3 at 21000
ff884b20:         /disk

Really! There are two times ata-3 but no 1 and 2 and MorphOS actually 
expects these names. So to avoid confusion it's better to stay at 
emulating 2 ports and call them ata-3 and ata-4.

> Maybe these references are of some help:
>
> http://git.qemu.org/?p=qemu.git;a=blob;f=hw/ppc/e500.c;h=223bab9eea18dad799041040291b7ad5be7f5e3e;hb=HEAD#l73
>
> http://www.devicetree.org/Device_Tree_Usage#Advanced_Interrupt_Mapping

Thanks for these. I've already seen the second one but I still can't tell 
if the current mappings are correct or not.

Regards,
BALATON Zoltan



More information about the OpenBIOS mailing list