All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] LinuxBIOS support: map BIOS into ISA address space as RAM instead of ROM
@ 2007-02-14  1:32 Ed Swierk
  2007-02-14 21:59 ` [Qemu-devel] " Ed Swierk
  0 siblings, 1 reply; 3+ messages in thread
From: Ed Swierk @ 2007-02-14  1:32 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 595 bytes --]

LinuxBIOS writes the IRQ routing table (PIRQ) to 0xf000 and then reads
it back to verify the write. Currently qemu maps the top 128 KB of the
BIOS into ISA address space (0xe000 - 0xffff) as ROM, which causes the
write to fail, preventing Linux from finding interrupt routing info.

This patch changes qemu to map the BIOS into ISA address space as RAM
instead of ROM, allowing LinuxBIOS to run on qemu with no further
modifications (although the DRAM size is still not detected properly).

I've verified that Windows 2000 and Linux still boot with the Bochs
BIOS with this patch applied.

--Ed

[-- Attachment #2: qemu-isa-bios-ram.patch --]
[-- Type: text/x-patch, Size: 637 bytes --]

Index: qemu-snapshot-2007-02-09_05/hw/pc.c
===================================================================
--- qemu-snapshot-2007-02-09_05.orig/hw/pc.c
+++ qemu-snapshot-2007-02-09_05/hw/pc.c
@@ -530,7 +530,7 @@ static void pc_init1(int ram_size, int v
                                  IO_MEM_UNASSIGNED);
     cpu_register_physical_memory(0x100000 - isa_bios_size, 
                                  isa_bios_size, 
-                                 (bios_offset + bios_size - isa_bios_size) | IO_MEM_ROM);
+                                 bios_offset + bios_size - isa_bios_size);
 
     {
         ram_addr_t option_rom_offset;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] Re: [PATCH] LinuxBIOS support: map BIOS into ISA address space as RAM instead of ROM
  2007-02-14  1:32 [Qemu-devel] [PATCH] LinuxBIOS support: map BIOS into ISA address space as RAM instead of ROM Ed Swierk
@ 2007-02-14 21:59 ` Ed Swierk
  2007-02-14 23:12   ` Fabrice Bellard
  0 siblings, 1 reply; 3+ messages in thread
From: Ed Swierk @ 2007-02-14 21:59 UTC (permalink / raw)
  To: qemu-devel

On 2/13/07, Ed Swierk <eswierk@arastra.com> wrote:
> This patch changes qemu to map the BIOS into ISA address space as RAM
> instead of ROM, allowing LinuxBIOS to run on qemu with no further
> modifications (although the DRAM size is still not detected properly).

Unfortunately this isn't the right answer, as modifying the BIOS area
messes things up on soft reboot. What we really want is shadow RAM
support, which Bochs seems to support but qemu doesn't.

--Ed

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] Re: [PATCH] LinuxBIOS support: map BIOS into ISA address space as RAM instead of ROM
  2007-02-14 21:59 ` [Qemu-devel] " Ed Swierk
@ 2007-02-14 23:12   ` Fabrice Bellard
  0 siblings, 0 replies; 3+ messages in thread
From: Fabrice Bellard @ 2007-02-14 23:12 UTC (permalink / raw)
  To: eswierk; +Cc: qemu-devel

Ed Swierk wrote:
> On 2/13/07, Ed Swierk <eswierk@arastra.com> wrote:
> 
>> This patch changes qemu to map the BIOS into ISA address space as RAM
>> instead of ROM, allowing LinuxBIOS to run on qemu with no further
>> modifications (although the DRAM size is still not detected properly).
> 
> 
> Unfortunately this isn't the right answer, as modifying the BIOS area
> messes things up on soft reboot. What we really want is shadow RAM
> support, which Bochs seems to support but qemu doesn't.

Shadow RAM is supported in QEMU and I modified the Bochs BIOS to use it. 
So you do not need to do any patch in QEMU for it. Please read the 
rombios32.c source in the Bochs BIOS to know what to do in LinuxBIOS.

To be precise, one case of RAM shadowing is not implemented (read from 
BIOS, write to RAM), but it is not strictly needed to write data in the 
shadow RAM. I needed it once to run a real Award BIOS in QEMU, but I did 
not have the time to clean up the patch to commit it.

Regards,

Fabrice.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-02-14 23:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-14  1:32 [Qemu-devel] [PATCH] LinuxBIOS support: map BIOS into ISA address space as RAM instead of ROM Ed Swierk
2007-02-14 21:59 ` [Qemu-devel] " Ed Swierk
2007-02-14 23:12   ` Fabrice Bellard

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.