* [Qemu-devel] [PATCH] isapc: give system address space when pci is disabled
@ 2011-09-18 16:04 Hervé Poussineau
2011-09-19 7:57 ` Jan Kiszka
2011-09-23 16:05 ` [Qemu-devel] [PATCH] isapc: give system address space when pci is disabled Anthony Liguori
0 siblings, 2 replies; 9+ messages in thread
From: Hervé Poussineau @ 2011-09-18 16:04 UTC (permalink / raw)
To: qemu-devel; +Cc: Hervé Poussineau
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
---
hw/pc_piix.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/pc_piix.c b/hw/pc_piix.c
index da6fa55..c0b8a3a 100644
--- a/hw/pc_piix.c
+++ b/hw/pc_piix.c
@@ -121,7 +121,7 @@ static void pc_init1(MemoryRegion *system_memory,
pc_memory_init(system_memory,
kernel_filename, kernel_cmdline, initrd_filename,
below_4g_mem_size, above_4g_mem_size,
- pci_memory, &ram_memory);
+ pci_enabled ? pci_memory : system_memory, &ram_memory);
}
if (!xen_enabled()) {
--
1.7.5.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH] isapc: give system address space when pci is disabled
2011-09-18 16:04 [Qemu-devel] [PATCH] isapc: give system address space when pci is disabled Hervé Poussineau
@ 2011-09-19 7:57 ` Jan Kiszka
2011-09-19 18:49 ` Hervé Poussineau
2011-09-23 16:05 ` [Qemu-devel] [PATCH] isapc: give system address space when pci is disabled Anthony Liguori
1 sibling, 1 reply; 9+ messages in thread
From: Jan Kiszka @ 2011-09-19 7:57 UTC (permalink / raw)
To: Hervé Poussineau; +Cc: qemu-devel
On 2011-09-18 18:04, Hervé Poussineau wrote:
>
> Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
> ---
> hw/pc_piix.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/hw/pc_piix.c b/hw/pc_piix.c
> index da6fa55..c0b8a3a 100644
> --- a/hw/pc_piix.c
> +++ b/hw/pc_piix.c
> @@ -121,7 +121,7 @@ static void pc_init1(MemoryRegion *system_memory,
> pc_memory_init(system_memory,
> kernel_filename, kernel_cmdline, initrd_filename,
> below_4g_mem_size, above_4g_mem_size,
> - pci_memory, &ram_memory);
> + pci_enabled ? pci_memory : system_memory, &ram_memory);
> }
>
> if (!xen_enabled()) {
Makes sense. I guess we should rename 'pci_memory' inside pc_memory_init
to reflect this - 'rom_memory'?
But -M isapc still only gives me a black screen. Are there further fixes
required?
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH] isapc: give system address space when pci is disabled
2011-09-19 7:57 ` Jan Kiszka
@ 2011-09-19 18:49 ` Hervé Poussineau
2011-09-20 8:27 ` Jan Kiszka
0 siblings, 1 reply; 9+ messages in thread
From: Hervé Poussineau @ 2011-09-19 18:49 UTC (permalink / raw)
To: Jan Kiszka; +Cc: qemu-devel
Jan Kiszka a écrit :
> On 2011-09-18 18:04, Hervé Poussineau wrote:
>> Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
>> ---
>> hw/pc_piix.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/hw/pc_piix.c b/hw/pc_piix.c
>> index da6fa55..c0b8a3a 100644
>> --- a/hw/pc_piix.c
>> +++ b/hw/pc_piix.c
>> @@ -121,7 +121,7 @@ static void pc_init1(MemoryRegion *system_memory,
>> pc_memory_init(system_memory,
>> kernel_filename, kernel_cmdline, initrd_filename,
>> below_4g_mem_size, above_4g_mem_size,
>> - pci_memory, &ram_memory);
>> + pci_enabled ? pci_memory : system_memory, &ram_memory);
>> }
>>
>> if (!xen_enabled()) {
>
> Makes sense. I guess we should rename 'pci_memory' inside pc_memory_init
> to reflect this - 'rom_memory'?
>
> But -M isapc still only gives me a black screen. Are there further fixes
> required?
>
Yes, you also need to rollback pc-bios/bios.bin to previous version (ie
8b06c62ae48b67b320f7420dcd4854c5559e1532)
Hervé
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH] isapc: give system address space when pci is disabled
2011-09-19 18:49 ` Hervé Poussineau
@ 2011-09-20 8:27 ` Jan Kiszka
2011-09-20 21:25 ` Hervé Poussineau
0 siblings, 1 reply; 9+ messages in thread
From: Jan Kiszka @ 2011-09-20 8:27 UTC (permalink / raw)
To: Hervé Poussineau; +Cc: qemu-devel@nongnu.org
On 2011-09-19 20:49, Hervé Poussineau wrote:
> Jan Kiszka a écrit :
>> On 2011-09-18 18:04, Hervé Poussineau wrote:
>>> Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
>>> ---
>>> hw/pc_piix.c | 2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/hw/pc_piix.c b/hw/pc_piix.c
>>> index da6fa55..c0b8a3a 100644
>>> --- a/hw/pc_piix.c
>>> +++ b/hw/pc_piix.c
>>> @@ -121,7 +121,7 @@ static void pc_init1(MemoryRegion *system_memory,
>>> pc_memory_init(system_memory,
>>> kernel_filename, kernel_cmdline, initrd_filename,
>>> below_4g_mem_size, above_4g_mem_size,
>>> - pci_memory, &ram_memory);
>>> + pci_enabled ? pci_memory : system_memory, &ram_memory);
>>> }
>>>
>>> if (!xen_enabled()) {
>>
>> Makes sense. I guess we should rename 'pci_memory' inside pc_memory_init
>> to reflect this - 'rom_memory'?
>>
>> But -M isapc still only gives me a black screen. Are there further fixes
>> required?
>>
>
> Yes, you also need to rollback pc-bios/bios.bin to previous version (ie
> 8b06c62ae48b67b320f7420dcd4854c5559e1532)
Did you already try to bisect that probable regression in SeaBIOS?
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH] isapc: give system address space when pci is disabled
2011-09-20 8:27 ` Jan Kiszka
@ 2011-09-20 21:25 ` Hervé Poussineau
2011-09-21 6:16 ` [Qemu-devel] [PATCH] Probe PCI existence Jan Kiszka
0 siblings, 1 reply; 9+ messages in thread
From: Hervé Poussineau @ 2011-09-20 21:25 UTC (permalink / raw)
To: Jan Kiszka; +Cc: qemu-devel@nongnu.org, Gerd Hoffmann
Jan Kiszka a écrit :
> On 2011-09-19 20:49, Hervé Poussineau wrote:
>> Jan Kiszka a écrit :
>>> On 2011-09-18 18:04, Hervé Poussineau wrote:
>>>> Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
>>>> ---
>>>> hw/pc_piix.c | 2 +-
>>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>>
>>>> diff --git a/hw/pc_piix.c b/hw/pc_piix.c
>>>> index da6fa55..c0b8a3a 100644
>>>> --- a/hw/pc_piix.c
>>>> +++ b/hw/pc_piix.c
>>>> @@ -121,7 +121,7 @@ static void pc_init1(MemoryRegion *system_memory,
>>>> pc_memory_init(system_memory,
>>>> kernel_filename, kernel_cmdline, initrd_filename,
>>>> below_4g_mem_size, above_4g_mem_size,
>>>> - pci_memory, &ram_memory);
>>>> + pci_enabled ? pci_memory : system_memory, &ram_memory);
>>>> }
>>>>
>>>> if (!xen_enabled()) {
>>> Makes sense. I guess we should rename 'pci_memory' inside pc_memory_init
>>> to reflect this - 'rom_memory'?
>>>
>>> But -M isapc still only gives me a black screen. Are there further fixes
>>> required?
>>>
>> Yes, you also need to rollback pc-bios/bios.bin to previous version (ie
>> 8b06c62ae48b67b320f7420dcd4854c5559e1532)
>
> Did you already try to bisect that probable regression in SeaBIOS?
>
Yes, I regtested the problem to this SeaBIOS commit:
01a5c8813b2e709809c07c5d7fab9d1c3ddb4989 is the first bad commit
commit 01a5c8813b2e709809c07c5d7fab9d1c3ddb4989
Author: Gerd Hoffmann <kraxel@redhat.com>
Date: Mon Jul 11 09:20:29 2011 +0200
pci: activate two-pass pci initialization code
This patch actually enables the two-pass pci initialization and
deactivates the old pci initialization bits.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Binary is current qemu + this patch
Command line is: qemu-system-i386 -M isapc -vga std
Hervé
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] [PATCH] Probe PCI existence
2011-09-20 21:25 ` Hervé Poussineau
@ 2011-09-21 6:16 ` Jan Kiszka
2011-09-23 4:23 ` Kevin O'Connor
2011-10-10 14:29 ` Gerd Hoffmann
0 siblings, 2 replies; 9+ messages in thread
From: Jan Kiszka @ 2011-09-21 6:16 UTC (permalink / raw)
To: seabios; +Cc: Hervé Poussineau, qemu-devel@nongnu.org, Gerd Hoffmann
From: Jan Kiszka <jan.kiszka@siemens.com>
This prevents lockups when trying to allocate PCI resources on an
ISA-only system like QEMU can emulate.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
src/pci.c | 14 +++++++++++++-
src/pci.h | 3 ++-
src/pciinit.c | 7 +++++--
3 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/src/pci.c b/src/pci.c
index 49698ac..6031c9f 100644
--- a/src/pci.c
+++ b/src/pci.c
@@ -88,9 +88,21 @@ pci_next(int bdf, int bus)
struct pci_device *PCIDevices;
int MaxPCIBus VAR16VISIBLE;
+// Check if PCI is available at all
+int
+pci_probe_host(void)
+{
+ outl(0x80000000, PORT_PCI_CMD);
+ if (inl(PORT_PCI_CMD) != 0x80000000) {
+ dprintf(1, "Detected non-PCI system\n");
+ return -1;
+ }
+ return 0;
+}
+
// Find all PCI devices and populate PCIDevices linked list.
void
-pci_probe(void)
+pci_probe_devices(void)
{
dprintf(3, "PCI probe\n");
struct pci_device *busdevs[256];
diff --git a/src/pci.h b/src/pci.h
index 3e28af2..a2a5a4c 100644
--- a/src/pci.h
+++ b/src/pci.h
@@ -62,7 +62,8 @@ struct pci_device {
};
extern struct pci_device *PCIDevices;
extern int MaxPCIBus;
-void pci_probe(void);
+int pci_probe_host(void);
+void pci_probe_devices(void);
static inline u32 pci_classprog(struct pci_device *pci) {
return (pci->class << 8) | pci->prog_if;
}
diff --git a/src/pciinit.c b/src/pciinit.c
index 597c8ea..a857da0 100644
--- a/src/pciinit.c
+++ b/src/pciinit.c
@@ -577,7 +577,7 @@ pci_setup(void)
{
if (CONFIG_COREBOOT || usingXen()) {
// PCI setup already done by coreboot or Xen - just do probe.
- pci_probe();
+ pci_probe_devices();
return;
}
@@ -587,10 +587,13 @@ pci_setup(void)
u32 end = BUILD_PCIMEM_END;
dprintf(1, "=== PCI bus & bridge init ===\n");
+ if (pci_probe_host() != 0) {
+ return;
+ }
pci_bios_init_bus();
dprintf(1, "=== PCI device probing ===\n");
- pci_probe();
+ pci_probe_devices();
dprintf(1, "=== PCI new allocation pass #1 ===\n");
busses = malloc_tmp(sizeof(*busses) * busses_count);
--
1.7.3.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH] Probe PCI existence
2011-09-21 6:16 ` [Qemu-devel] [PATCH] Probe PCI existence Jan Kiszka
@ 2011-09-23 4:23 ` Kevin O'Connor
2011-10-10 14:29 ` Gerd Hoffmann
1 sibling, 0 replies; 9+ messages in thread
From: Kevin O'Connor @ 2011-09-23 4:23 UTC (permalink / raw)
To: Jan Kiszka
Cc: seabios, Hervé Poussineau, qemu-devel@nongnu.org,
Gerd Hoffmann
On Wed, Sep 21, 2011 at 08:16:21AM +0200, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> This prevents lockups when trying to allocate PCI resources on an
> ISA-only system like QEMU can emulate.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Looks okay to me.
-Kevin
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH] Probe PCI existence
2011-09-21 6:16 ` [Qemu-devel] [PATCH] Probe PCI existence Jan Kiszka
2011-09-23 4:23 ` Kevin O'Connor
@ 2011-10-10 14:29 ` Gerd Hoffmann
1 sibling, 0 replies; 9+ messages in thread
From: Gerd Hoffmann @ 2011-10-10 14:29 UTC (permalink / raw)
To: Jan Kiszka; +Cc: seabios, Hervé Poussineau, qemu-devel@nongnu.org
On 09/21/11 08:16, Jan Kiszka wrote:
> From: Jan Kiszka<jan.kiszka@siemens.com>
>
> This prevents lockups when trying to allocate PCI resources on an
> ISA-only system like QEMU can emulate.
Looks good to me.
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
cheers,
Gerd
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [PATCH] isapc: give system address space when pci is disabled
2011-09-18 16:04 [Qemu-devel] [PATCH] isapc: give system address space when pci is disabled Hervé Poussineau
2011-09-19 7:57 ` Jan Kiszka
@ 2011-09-23 16:05 ` Anthony Liguori
1 sibling, 0 replies; 9+ messages in thread
From: Anthony Liguori @ 2011-09-23 16:05 UTC (permalink / raw)
To: Hervé Poussineau; +Cc: qemu-devel
On 09/18/2011 11:04 AM, Hervé Poussineau wrote:
>
> Signed-off-by: Hervé Poussineau<hpoussin@reactos.org>
Applied. Thanks.
Regards,
Anthony Liguori
> ---
> hw/pc_piix.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/hw/pc_piix.c b/hw/pc_piix.c
> index da6fa55..c0b8a3a 100644
> --- a/hw/pc_piix.c
> +++ b/hw/pc_piix.c
> @@ -121,7 +121,7 @@ static void pc_init1(MemoryRegion *system_memory,
> pc_memory_init(system_memory,
> kernel_filename, kernel_cmdline, initrd_filename,
> below_4g_mem_size, above_4g_mem_size,
> - pci_memory,&ram_memory);
> + pci_enabled ? pci_memory : system_memory,&ram_memory);
> }
>
> if (!xen_enabled()) {
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-10-10 14:29 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-18 16:04 [Qemu-devel] [PATCH] isapc: give system address space when pci is disabled Hervé Poussineau
2011-09-19 7:57 ` Jan Kiszka
2011-09-19 18:49 ` Hervé Poussineau
2011-09-20 8:27 ` Jan Kiszka
2011-09-20 21:25 ` Hervé Poussineau
2011-09-21 6:16 ` [Qemu-devel] [PATCH] Probe PCI existence Jan Kiszka
2011-09-23 4:23 ` Kevin O'Connor
2011-10-10 14:29 ` Gerd Hoffmann
2011-09-23 16:05 ` [Qemu-devel] [PATCH] isapc: give system address space when pci is disabled Anthony Liguori
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).