* [Qemu-devel] [PATCH 0/4] ISA PC fixes
@ 2011-09-21 18:49 Jan Kiszka
2011-09-21 18:49 ` [Qemu-devel] [PATCH 1/4] pc: Unbreak ROM mapping for ISA machine Jan Kiszka
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Jan Kiszka @ 2011-09-21 18:49 UTC (permalink / raw)
To: Anthony Liguori, qemu-devel; +Cc: Hervé Poussineau, Avi Kivity
This plus [1] reanimates -M isapc for me again.
Jan Kiszka (4):
pc: Unbreak ROM mapping for ISA machine
pc: Disable HPET for ISA machine
vga: Unbreak ISA support
cirrus: Unbreak ISA support
hw/cirrus_vga.c | 4 ++--
hw/pc.c | 8 ++++----
hw/pc.h | 2 +-
hw/pc_piix.c | 14 +++++++++++---
hw/vga-isa.c | 1 +
5 files changed, 19 insertions(+), 10 deletions(-)
--
1.7.3.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 1/4] pc: Unbreak ROM mapping for ISA machine
2011-09-21 18:49 [Qemu-devel] [PATCH 0/4] ISA PC fixes Jan Kiszka
@ 2011-09-21 18:49 ` Jan Kiszka
2011-09-21 18:49 ` [Qemu-devel] [PATCH 2/4] pc: Disable HPET " Jan Kiszka
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Jan Kiszka @ 2011-09-21 18:49 UTC (permalink / raw)
To: Anthony Liguori, qemu-devel; +Cc: Hervé Poussineau, Avi Kivity
From: Jan Kiszka <jan.kiszka@siemens.com>
This is based on the original fix by Hervé Poussineau: pc_memory_init
actually takes a memory region for mapping BIOS and extension ROMs. That
equals the PCI memory region if PCI is available, but must be system
memory in the ISA case.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
hw/pc.c | 8 ++++----
hw/pc.h | 2 +-
hw/pc_piix.c | 13 ++++++++++---
3 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index fcaae9f..992c61d 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -962,7 +962,7 @@ void pc_memory_init(MemoryRegion *system_memory,
const char *initrd_filename,
ram_addr_t below_4g_mem_size,
ram_addr_t above_4g_mem_size,
- MemoryRegion *pci_memory,
+ MemoryRegion *rom_memory,
MemoryRegion **ram_memory)
{
char *filename;
@@ -1026,7 +1026,7 @@ void pc_memory_init(MemoryRegion *system_memory,
isa_bios = g_malloc(sizeof(*isa_bios));
memory_region_init_alias(isa_bios, "isa-bios", bios,
bios_size - isa_bios_size, isa_bios_size);
- memory_region_add_subregion_overlap(pci_memory,
+ memory_region_add_subregion_overlap(rom_memory,
0x100000 - isa_bios_size,
isa_bios,
1);
@@ -1034,13 +1034,13 @@ void pc_memory_init(MemoryRegion *system_memory,
option_rom_mr = g_malloc(sizeof(*option_rom_mr));
memory_region_init_ram(option_rom_mr, NULL, "pc.rom", PC_ROM_SIZE);
- memory_region_add_subregion_overlap(pci_memory,
+ memory_region_add_subregion_overlap(rom_memory,
PC_ROM_MIN_VGA,
option_rom_mr,
1);
/* map all the bios at the top of memory */
- memory_region_add_subregion(pci_memory,
+ memory_region_add_subregion(rom_memory,
(uint32_t)(-bios_size),
bios);
diff --git a/hw/pc.h b/hw/pc.h
index 958c77d..36749b0 100644
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -137,7 +137,7 @@ void pc_memory_init(MemoryRegion *system_memory,
const char *initrd_filename,
ram_addr_t below_4g_mem_size,
ram_addr_t above_4g_mem_size,
- MemoryRegion *pci_memory,
+ MemoryRegion *rom_memory,
MemoryRegion **ram_memory);
qemu_irq *pc_allocate_cpu_irq(void);
void pc_vga_init(PCIBus *pci_bus);
diff --git a/hw/pc_piix.c b/hw/pc_piix.c
index 75d96d9..52939f5 100644
--- a/hw/pc_piix.c
+++ b/hw/pc_piix.c
@@ -97,6 +97,7 @@ static void pc_init1(MemoryRegion *system_memory,
ISADevice *rtc_state;
MemoryRegion *ram_memory;
MemoryRegion *pci_memory;
+ MemoryRegion *rom_memory;
pc_cpus_init(cpu_model);
@@ -112,15 +113,21 @@ static void pc_init1(MemoryRegion *system_memory,
below_4g_mem_size = ram_size;
}
- pci_memory = g_new(MemoryRegion, 1);
- memory_region_init(pci_memory, "pci", INT64_MAX);
+ if (pci_enabled) {
+ pci_memory = g_new(MemoryRegion, 1);
+ memory_region_init(pci_memory, "pci", INT64_MAX);
+ rom_memory = pci_memory;
+ } else {
+ pci_memory = NULL;
+ rom_memory = system_memory;
+ }
/* allocate ram and load rom/bios */
if (!xen_enabled()) {
pc_memory_init(system_memory,
kernel_filename, kernel_cmdline, initrd_filename,
below_4g_mem_size, above_4g_mem_size,
- pci_memory, &ram_memory);
+ rom_memory, &ram_memory);
}
if (!xen_enabled()) {
--
1.7.3.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 2/4] pc: Disable HPET for ISA machine
2011-09-21 18:49 [Qemu-devel] [PATCH 0/4] ISA PC fixes Jan Kiszka
2011-09-21 18:49 ` [Qemu-devel] [PATCH 1/4] pc: Unbreak ROM mapping for ISA machine Jan Kiszka
@ 2011-09-21 18:49 ` Jan Kiszka
2011-09-21 18:49 ` [Qemu-devel] [PATCH 3/4] vga: Unbreak ISA support Jan Kiszka
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Jan Kiszka @ 2011-09-21 18:49 UTC (permalink / raw)
To: Anthony Liguori, qemu-devel; +Cc: Hervé Poussineau, Avi Kivity
From: Jan Kiszka <jan.kiszka@siemens.com>
There was no HPET on ISA boxes.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
hw/pc_piix.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/hw/pc_piix.c b/hw/pc_piix.c
index 52939f5..ec7da6d 100644
--- a/hw/pc_piix.c
+++ b/hw/pc_piix.c
@@ -157,6 +157,7 @@ static void pc_init1(MemoryRegion *system_memory,
pci_bus = NULL;
i440fx_state = NULL;
isa_bus_new(NULL);
+ no_hpet = 1;
}
isa_bus_irqs(isa_irq);
--
1.7.3.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 3/4] vga: Unbreak ISA support
2011-09-21 18:49 [Qemu-devel] [PATCH 0/4] ISA PC fixes Jan Kiszka
2011-09-21 18:49 ` [Qemu-devel] [PATCH 1/4] pc: Unbreak ROM mapping for ISA machine Jan Kiszka
2011-09-21 18:49 ` [Qemu-devel] [PATCH 2/4] pc: Disable HPET " Jan Kiszka
@ 2011-09-21 18:49 ` Jan Kiszka
2011-09-21 18:49 ` [Qemu-devel] [PATCH 4/4] cirrus: " Jan Kiszka
2011-09-23 16:06 ` [Qemu-devel] [PATCH 0/4] ISA PC fixes Anthony Liguori
4 siblings, 0 replies; 8+ messages in thread
From: Jan Kiszka @ 2011-09-21 18:49 UTC (permalink / raw)
To: Anthony Liguori, qemu-devel; +Cc: Hervé Poussineau, Avi Kivity
From: Jan Kiszka <jan.kiszka@siemens.com>
We need to initialize legacy_address_space during ISA VGA setup so that
the chain-4 alias can be registered properly.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
hw/vga-isa.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/hw/vga-isa.c b/hw/vga-isa.c
index 0d19901..6b5c8ed 100644
--- a/hw/vga-isa.c
+++ b/hw/vga-isa.c
@@ -49,6 +49,7 @@ static int vga_initfn(ISADevice *dev)
MemoryRegion *vga_io_memory;
vga_common_init(s, VGA_RAM_SIZE);
+ s->legacy_address_space = isa_address_space(dev);
vga_io_memory = vga_init_io(s);
memory_region_add_subregion_overlap(isa_address_space(dev),
isa_mem_base + 0x000a0000,
--
1.7.3.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 4/4] cirrus: Unbreak ISA support
2011-09-21 18:49 [Qemu-devel] [PATCH 0/4] ISA PC fixes Jan Kiszka
` (2 preceding siblings ...)
2011-09-21 18:49 ` [Qemu-devel] [PATCH 3/4] vga: Unbreak ISA support Jan Kiszka
@ 2011-09-21 18:49 ` Jan Kiszka
2011-09-23 16:06 ` [Qemu-devel] [PATCH 0/4] ISA PC fixes Anthony Liguori
4 siblings, 0 replies; 8+ messages in thread
From: Jan Kiszka @ 2011-09-21 18:49 UTC (permalink / raw)
To: Anthony Liguori, qemu-devel; +Cc: Hervé Poussineau, Avi Kivity
From: Jan Kiszka <jan.kiszka@siemens.com>
Do not try to map against the PCI bar in the ISA version of the device.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
hw/cirrus_vga.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
index ec7ea82..c7e365b 100644
--- a/hw/cirrus_vga.c
+++ b/hw/cirrus_vga.c
@@ -2401,7 +2401,7 @@ static void map_linear_vram_bank(CirrusVGAState *s, unsigned bank)
static void map_linear_vram(CirrusVGAState *s)
{
- if (!s->linear_vram) {
+ if (s->bustype == CIRRUS_BUSTYPE_PCI && !s->linear_vram) {
s->linear_vram = true;
memory_region_add_subregion_overlap(&s->pci_bar, 0, &s->vga.vram, 1);
}
@@ -2411,7 +2411,7 @@ static void map_linear_vram(CirrusVGAState *s)
static void unmap_linear_vram(CirrusVGAState *s)
{
- if (s->linear_vram) {
+ if (s->bustype == CIRRUS_BUSTYPE_PCI && s->linear_vram) {
s->linear_vram = false;
memory_region_del_subregion(&s->pci_bar, &s->vga.vram);
}
--
1.7.3.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH 0/4] ISA PC fixes
2011-09-21 18:49 [Qemu-devel] [PATCH 0/4] ISA PC fixes Jan Kiszka
` (3 preceding siblings ...)
2011-09-21 18:49 ` [Qemu-devel] [PATCH 4/4] cirrus: " Jan Kiszka
@ 2011-09-23 16:06 ` Anthony Liguori
2011-09-23 16:15 ` Jan Kiszka
4 siblings, 1 reply; 8+ messages in thread
From: Anthony Liguori @ 2011-09-23 16:06 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Hervé Poussineau, qemu-devel, Avi Kivity
On 09/21/2011 01:49 PM, Jan Kiszka wrote:
> This plus [1] reanimates -M isapc for me again.
Applied all. Thanks. What's [1] BTW?
Regards,
Anthony Liguori
>
> Jan Kiszka (4):
> pc: Unbreak ROM mapping for ISA machine
> pc: Disable HPET for ISA machine
> vga: Unbreak ISA support
> cirrus: Unbreak ISA support
>
> hw/cirrus_vga.c | 4 ++--
> hw/pc.c | 8 ++++----
> hw/pc.h | 2 +-
> hw/pc_piix.c | 14 +++++++++++---
> hw/vga-isa.c | 1 +
> 5 files changed, 19 insertions(+), 10 deletions(-)
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH 0/4] ISA PC fixes
2011-09-23 16:06 ` [Qemu-devel] [PATCH 0/4] ISA PC fixes Anthony Liguori
@ 2011-09-23 16:15 ` Jan Kiszka
2011-09-23 16:28 ` Anthony Liguori
0 siblings, 1 reply; 8+ messages in thread
From: Jan Kiszka @ 2011-09-23 16:15 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Hervé Poussineau, qemu-devel, Avi Kivity
[-- Attachment #1: Type: text/plain, Size: 263 bytes --]
On 2011-09-23 18:06, Anthony Liguori wrote:
> On 09/21/2011 01:49 PM, Jan Kiszka wrote:
>> This plus [1] reanimates -M isapc for me again.
>
> Applied all. Thanks. What's [1] BTW?
Oops: http://thread.gmane.org/gmane.comp.emulators.qemu/118195
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH 0/4] ISA PC fixes
2011-09-23 16:15 ` Jan Kiszka
@ 2011-09-23 16:28 ` Anthony Liguori
0 siblings, 0 replies; 8+ messages in thread
From: Anthony Liguori @ 2011-09-23 16:28 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Hervé Poussineau, qemu-devel, Avi Kivity
On 09/23/2011 11:15 AM, Jan Kiszka wrote:
> On 2011-09-23 18:06, Anthony Liguori wrote:
>> On 09/21/2011 01:49 PM, Jan Kiszka wrote:
>>> This plus [1] reanimates -M isapc for me again.
>>
>> Applied all. Thanks. What's [1] BTW?
>
> Oops: http://thread.gmane.org/gmane.comp.emulators.qemu/118195
Okay, when Kevin applies it, please poke so that we update bios.bin.
Regards,
Anthony Liguori
>
> Jan
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-09-23 16:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-21 18:49 [Qemu-devel] [PATCH 0/4] ISA PC fixes Jan Kiszka
2011-09-21 18:49 ` [Qemu-devel] [PATCH 1/4] pc: Unbreak ROM mapping for ISA machine Jan Kiszka
2011-09-21 18:49 ` [Qemu-devel] [PATCH 2/4] pc: Disable HPET " Jan Kiszka
2011-09-21 18:49 ` [Qemu-devel] [PATCH 3/4] vga: Unbreak ISA support Jan Kiszka
2011-09-21 18:49 ` [Qemu-devel] [PATCH 4/4] cirrus: " Jan Kiszka
2011-09-23 16:06 ` [Qemu-devel] [PATCH 0/4] ISA PC fixes Anthony Liguori
2011-09-23 16:15 ` Jan Kiszka
2011-09-23 16:28 ` Anthony Liguori
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.