* [Qemu-devel] [PATCH] PPC: Support flags -boot, -uuid and -kernel using fw_cfg
@ 2008-12-21 19:46 Blue Swirl
2008-12-21 20:16 ` Laurent Vivier
0 siblings, 1 reply; 5+ messages in thread
From: Blue Swirl @ 2008-12-21 19:46 UTC (permalink / raw)
To: Laurent Vivier, Aurelien Jarno, qemu-devel@nongnu.org
[-- Attachment #1: Type: text/plain, Size: 1147 bytes --]
Hi,
These two patches (Qemu/OpenBIOS) add support for giving OpenBIOS/PPC
a boot device with -boot command line flag, use a UUID (print only)
and call a preloaded kernel. These are passed from Qemu to OpenBIOS
using the firmware configuration device and NVRAM.
Using the -boot switch works, but I can't boot anything yet so it's
not very well tested. UUID works, but it's not added to the device
tree. Kernel crashes after the first instruction, maybe the memory
size probe corrupts memory.
>> =============================================================
>> OpenBIOS 1.0RC1 [Dec 21 2008 11:55]
>> Configuration device id QEMU version 1 machine id 2
>> CPUs: 1
>> UUID: 12345678-1234-abcd-7654-123456789abc
>> Initializing PCI devices...
>> 0:0.0 - 1057:2 - /pci/pci - pci
>> 0:1.0 - 1234:1111 - /pci/QEMU,VGA - QEMU,VGA
>> 0:2.0 - 10ec:8029 - /pci/NE2000 - NE2000
>> 0:3.0 - 1095:646 - /pci/pci-ata - pci-ata
>> ata-1: [io ports 0x100-0x107,0x182]
>> drive1 [ATAPI cdrom]: QEMU DVD-ROM
>> ata-2: [io ports 0x200-0x207,0x282]
>> 0:4.0 - 106b:17 - /pci/mac-io - mac-io
No disk found.
>> [ppc] Kernel already loaded (0x01000000 + 0x003cadc8)
[-- Attachment #2: q_ppc_use_fw_cfg.diff --]
[-- Type: plain/text, Size: 1238 bytes --]
[-- Attachment #3: o_ppc_use_fw_cfg.diff --]
[-- Type: plain/text, Size: 4953 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] PPC: Support flags -boot, -uuid and -kernel using fw_cfg
2008-12-21 19:46 [Qemu-devel] [PATCH] PPC: Support flags -boot, -uuid and -kernel using fw_cfg Blue Swirl
@ 2008-12-21 20:16 ` Laurent Vivier
2008-12-21 20:25 ` Blue Swirl
2008-12-21 21:44 ` Blue Swirl
0 siblings, 2 replies; 5+ messages in thread
From: Laurent Vivier @ 2008-12-21 20:16 UTC (permalink / raw)
To: qemu-devel; +Cc: Blue Swirl, Aurelien Jarno
Le 21 déc. 08 à 20:46, Blue Swirl a écrit :
> Hi,
>
> These two patches (Qemu/OpenBIOS) add support for giving OpenBIOS/PPC
> a boot device with -boot command line flag, use a UUID (print only)
> and call a preloaded kernel. These are passed from Qemu to OpenBIOS
> using the firmware configuration device and NVRAM.
>
> Using the -boot switch works, but I can't boot anything yet so it's
> not very well tested. UUID works, but it's not added to the device
> tree. Kernel crashes after the first instruction, maybe the memory
> size probe corrupts memory.
>
>>> =============================================================
>>> OpenBIOS 1.0RC1 [Dec 21 2008 11:55]
>>> Configuration device id QEMU version 1 machine id 2
>>> CPUs: 1
>>> UUID: 12345678-1234-abcd-7654-123456789abc
>>> Initializing PCI devices...
>>> 0:0.0 - 1057:2 - /pci/pci - pci
>>> 0:1.0 - 1234:1111 - /pci/QEMU,VGA - QEMU,VGA
>>> 0:2.0 - 10ec:8029 - /pci/NE2000 - NE2000
>>> 0:3.0 - 1095:646 - /pci/pci-ata - pci-ata
>>> ata-1: [io ports 0x100-0x107,0x182]
>>> drive1 [ATAPI cdrom]: QEMU DVD-ROM
>>> ata-2: [io ports 0x200-0x207,0x282]
>>> 0:4.0 - 106b:17 - /pci/mac-io - mac-io
> No disk found.
>>> [ppc] Kernel already loaded (0x01000000 + 0x003cadc8)
> <q_ppc_use_fw_cfg.diff><o_ppc_use_fw_cfg.diff>
The ISA IO base depends on the architecture, so I don't think you can
use I/O port to read the architecture from the fw cfg device.
Regards,
Laurent
----------------------- Laurent Vivier ----------------------
"The best way to predict the future is to invent it."
- Alan Kay
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] PPC: Support flags -boot, -uuid and -kernel using fw_cfg
2008-12-21 20:16 ` Laurent Vivier
@ 2008-12-21 20:25 ` Blue Swirl
2008-12-21 21:46 ` Laurent Vivier
2008-12-21 21:44 ` Blue Swirl
1 sibling, 1 reply; 5+ messages in thread
From: Blue Swirl @ 2008-12-21 20:25 UTC (permalink / raw)
To: Laurent Vivier; +Cc: qemu-devel, Aurelien Jarno
On 12/21/08, Laurent Vivier <Laurent@lvivier.info> wrote:
>
> Le 21 déc. 08 à 20:46, Blue Swirl a écrit :
>
>
> >
> > Hi,
> >
> > These two patches (Qemu/OpenBIOS) add support for giving OpenBIOS/PPC
> > a boot device with -boot command line flag, use a UUID (print only)
> > and call a preloaded kernel. These are passed from Qemu to OpenBIOS
> > using the firmware configuration device and NVRAM.
> >
> > Using the -boot switch works, but I can't boot anything yet so it's
> > not very well tested. UUID works, but it's not added to the device
> > tree. Kernel crashes after the first instruction, maybe the memory
> > size probe corrupts memory.
> >
> >
> > >
> > > >
> =============================================================
> > > > OpenBIOS 1.0RC1 [Dec 21 2008 11:55]
> > > > Configuration device id QEMU version 1 machine id 2
> > > > CPUs: 1
> > > > UUID: 12345678-1234-abcd-7654-123456789abc
> > > > Initializing PCI devices...
> > > > 0:0.0 - 1057:2 - /pci/pci - pci
> > > > 0:1.0 - 1234:1111 - /pci/QEMU,VGA - QEMU,VGA
> > > > 0:2.0 - 10ec:8029 - /pci/NE2000 - NE2000
> > > > 0:3.0 - 1095:646 - /pci/pci-ata - pci-ata
> > > > ata-1: [io ports 0x100-0x107,0x182]
> > > > drive1 [ATAPI cdrom]: QEMU DVD-ROM
> > > > ata-2: [io ports 0x200-0x207,0x282]
> > > > 0:4.0 - 106b:17 - /pci/mac-io - mac-io
> > > >
> > >
> > No disk found.
> >
> > >
> > > > [ppc] Kernel already loaded (0x01000000 + 0x003cadc8)
> > > >
> > >
> > <q_ppc_use_fw_cfg.diff><o_ppc_use_fw_cfg.diff>
> >
>
> The ISA IO base depends on the architecture, so I don't think you can use
> I/O port to read the architecture from the fw cfg device.
I noticed that too, it was the first thing I tried but it never
worked. Is it possible to try different base addresses for the port
and then use the one which responds with the correct signature? Or
does the PCI need to be completely initialized?
Alternatively we could use MMIO at a fixed address.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] PPC: Support flags -boot, -uuid and -kernel using fw_cfg
2008-12-21 20:25 ` Blue Swirl
@ 2008-12-21 21:46 ` Laurent Vivier
0 siblings, 0 replies; 5+ messages in thread
From: Laurent Vivier @ 2008-12-21 21:46 UTC (permalink / raw)
To: qemu-devel; +Cc: Aurelien Jarno
Le 21 déc. 08 à 21:25, Blue Swirl a écrit :
> On 12/21/08, Laurent Vivier <Laurent@lvivier.info> wrote:
>>
>> Le 21 déc. 08 à 20:46, Blue Swirl a écrit :
>>
>>
>>>
>>> Hi,
>>>
>>> These two patches (Qemu/OpenBIOS) add support for giving OpenBIOS/
>>> PPC
>>> a boot device with -boot command line flag, use a UUID (print only)
>>> and call a preloaded kernel. These are passed from Qemu to OpenBIOS
>>> using the firmware configuration device and NVRAM.
>>>
>>> Using the -boot switch works, but I can't boot anything yet so it's
>>> not very well tested. UUID works, but it's not added to the device
>>> tree. Kernel crashes after the first instruction, maybe the memory
>>> size probe corrupts memory.
>>>
>>>
>>>>
>>>>>
>> =============================================================
>>>>> OpenBIOS 1.0RC1 [Dec 21 2008 11:55]
>>>>> Configuration device id QEMU version 1 machine id 2
>>>>> CPUs: 1
>>>>> UUID: 12345678-1234-abcd-7654-123456789abc
>>>>> Initializing PCI devices...
>>>>> 0:0.0 - 1057:2 - /pci/pci - pci
>>>>> 0:1.0 - 1234:1111 - /pci/QEMU,VGA - QEMU,VGA
>>>>> 0:2.0 - 10ec:8029 - /pci/NE2000 - NE2000
>>>>> 0:3.0 - 1095:646 - /pci/pci-ata - pci-ata
>>>>> ata-1: [io ports 0x100-0x107,0x182]
>>>>> drive1 [ATAPI cdrom]: QEMU DVD-ROM
>>>>> ata-2: [io ports 0x200-0x207,0x282]
>>>>> 0:4.0 - 106b:17 - /pci/mac-io - mac-io
>>>>>
>>>>
>>> No disk found.
>>>
>>>>
>>>>> [ppc] Kernel already loaded (0x01000000 + 0x003cadc8)
>>>>>
>>>>
>>> <q_ppc_use_fw_cfg.diff><o_ppc_use_fw_cfg.diff>
>>>
>>
>> The ISA IO base depends on the architecture, so I don't think you
>> can use
>> I/O port to read the architecture from the fw cfg device.
>
> I noticed that too, it was the first thing I tried but it never
> worked. Is it possible to try different base addresses for the port
> and then use the one which responds with the correct signature? Or
> does the PCI need to be completely initialized?
OpenHackWare reads the architecture from an NVRAM device.
The NVRAM is also located in the ISA IO space, but it scan all
possible ISA I/O base, i.e. 0x80000000, 0xfe000000 and 0xf2000000.
If we just don't want be worst than OHW, we can do that too with an fw
cfg device instead of an NVRAM.
Regards,
Laurent
----------------------- Laurent Vivier ----------------------
"The best way to predict the future is to invent it."
- Alan Kay
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] PPC: Support flags -boot, -uuid and -kernel using fw_cfg
2008-12-21 20:16 ` Laurent Vivier
2008-12-21 20:25 ` Blue Swirl
@ 2008-12-21 21:44 ` Blue Swirl
1 sibling, 0 replies; 5+ messages in thread
From: Blue Swirl @ 2008-12-21 21:44 UTC (permalink / raw)
To: Laurent Vivier; +Cc: qemu-devel, Aurelien Jarno
[-- Attachment #1: Type: text/plain, Size: 1695 bytes --]
On 12/21/08, Laurent Vivier <Laurent@lvivier.info> wrote:
>
> Le 21 déc. 08 à 20:46, Blue Swirl a écrit :
>
>
> >
> > Hi,
> >
> > These two patches (Qemu/OpenBIOS) add support for giving OpenBIOS/PPC
> > a boot device with -boot command line flag, use a UUID (print only)
> > and call a preloaded kernel. These are passed from Qemu to OpenBIOS
> > using the firmware configuration device and NVRAM.
> >
> > Using the -boot switch works, but I can't boot anything yet so it's
> > not very well tested. UUID works, but it's not added to the device
> > tree. Kernel crashes after the first instruction, maybe the memory
> > size probe corrupts memory.
> >
> >
> > >
> > > >
> =============================================================
> > > > OpenBIOS 1.0RC1 [Dec 21 2008 11:55]
> > > > Configuration device id QEMU version 1 machine id 2
> > > > CPUs: 1
> > > > UUID: 12345678-1234-abcd-7654-123456789abc
> > > > Initializing PCI devices...
> > > > 0:0.0 - 1057:2 - /pci/pci - pci
> > > > 0:1.0 - 1234:1111 - /pci/QEMU,VGA - QEMU,VGA
> > > > 0:2.0 - 10ec:8029 - /pci/NE2000 - NE2000
> > > > 0:3.0 - 1095:646 - /pci/pci-ata - pci-ata
> > > > ata-1: [io ports 0x100-0x107,0x182]
> > > > drive1 [ATAPI cdrom]: QEMU DVD-ROM
> > > > ata-2: [io ports 0x200-0x207,0x282]
> > > > 0:4.0 - 106b:17 - /pci/mac-io - mac-io
> > > >
> > >
> > No disk found.
> >
> > >
> > > > [ppc] Kernel already loaded (0x01000000 + 0x003cadc8)
> > > >
> > >
> > <q_ppc_use_fw_cfg.diff><o_ppc_use_fw_cfg.diff>
> >
>
> The ISA IO base depends on the architecture, so I don't think you can use
> I/O port to read the architecture from the fw cfg device.
This version uses MMIO so we can check the architecture early.
[-- Attachment #2: q_ppc_use_fw_cfg.diff --]
[-- Type: plain/text, Size: 1222 bytes --]
[-- Attachment #3: o_ppc_use_fw_cfg.diff --]
[-- Type: plain/text, Size: 5143 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-12-21 21:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-21 19:46 [Qemu-devel] [PATCH] PPC: Support flags -boot, -uuid and -kernel using fw_cfg Blue Swirl
2008-12-21 20:16 ` Laurent Vivier
2008-12-21 20:25 ` Blue Swirl
2008-12-21 21:46 ` Laurent Vivier
2008-12-21 21:44 ` Blue Swirl
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).