qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/1] qemu: changing the pci memory address
@ 2009-02-06 14:53 Izik Eidus
  2009-02-06 14:53 ` [Qemu-devel] [PATCH] qemu: changing the pci mapping to start from 0xc0000000 Izik Eidus
  2009-02-06 16:34 ` [Qemu-devel] [PATCH 0/1] qemu: changing the pci memory address Volker Ruppert
  0 siblings, 2 replies; 6+ messages in thread
From: Izik Eidus @ 2009-02-06 14:53 UTC (permalink / raw)
  To: qemu-devel


Change the pci mem address to start at 0xc0000000,
Allow more memory resources for the pci devices.

(note with this pach non pea guests can see only up to 3Giga of ram)

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

* [Qemu-devel] [PATCH] qemu: changing the pci mapping to start from 0xc0000000.
  2009-02-06 14:53 [Qemu-devel] [PATCH 0/1] qemu: changing the pci memory address Izik Eidus
@ 2009-02-06 14:53 ` Izik Eidus
  2009-02-08 23:43   ` Izik Eidus
  2009-02-06 16:34 ` [Qemu-devel] [PATCH 0/1] qemu: changing the pci memory address Volker Ruppert
  1 sibling, 1 reply; 6+ messages in thread
From: Izik Eidus @ 2009-02-06 14:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: Izik Eidus

With this change pci devices inside qemu can recive more memory resources

Signed-off-by: Izik Eidus <ieidus@redhat.com>
---
 hw/pc.c                                            |    6 +-
 hw/vga_int.h                                       |    2 +-
 hw/vmware_vga.c                                    |    4 +-
 ...ge-pci-mem-address-to-start-at-0xc0000000.patch |   67 ++++++++++++++++++++
 pc-bios/bios-pq/series                             |    1 +
 ...ange-vbe-mapping-to-start-from-0xc0000000.patch |   41 ++++++++++++
 pc-bios/vgabios-pq/series                          |    1 +
 7 files changed, 116 insertions(+), 6 deletions(-)
 create mode 100644 pc-bios/bios-pq/0011-bios-change-pci-mem-address-to-start-at-0xc0000000.patch
 create mode 100644 pc-bios/vgabios-pq/0001-vga-bios-change-vbe-mapping-to-start-from-0xc0000000.patch

diff --git a/hw/pc.c b/hw/pc.c
index 176730e..dba371e 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -771,9 +771,9 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,
     BlockDriverState *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
     BlockDriverState *fd[MAX_FD];
 
-    if (ram_size >= 0xe0000000 ) {
-        above_4g_mem_size = ram_size - 0xe0000000;
-        below_4g_mem_size = 0xe0000000;
+    if (ram_size >= 0xc0000000 ) {
+        above_4g_mem_size = ram_size - 0xc0000000;
+        below_4g_mem_size = 0xc0000000;
     } else {
         below_4g_mem_size = ram_size;
     }
diff --git a/hw/vga_int.h b/hw/vga_int.h
index f97e98f..57f20bf 100644
--- a/hw/vga_int.h
+++ b/hw/vga_int.h
@@ -59,7 +59,7 @@
 #define VBE_DISPI_LFB_ENABLED           0x40
 #define VBE_DISPI_NOCLEARMEM            0x80
 
-#define VBE_DISPI_LFB_PHYSICAL_ADDRESS  0xE0000000
+#define VBE_DISPI_LFB_PHYSICAL_ADDRESS  0xC0000000
 
 #ifdef CONFIG_BOCHS_VBE
 
diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
index d1cba28..5ee0ad6 100644
--- a/hw/vmware_vga.c
+++ b/hw/vmware_vga.c
@@ -118,14 +118,14 @@ struct pci_vmsvga_state_s {
 # define SVGA_IO_BASE		SVGA_LEGACY_BASE_PORT
 # define SVGA_IO_MUL		1
 # define SVGA_FIFO_SIZE		0x10000
-# define SVGA_MEM_BASE		0xe0000000
+# define SVGA_MEM_BASE		0xc0000000
 # define SVGA_PCI_DEVICE_ID	PCI_DEVICE_ID_VMWARE_SVGA2
 #else
 # define SVGA_ID		SVGA_ID_1
 # define SVGA_IO_BASE		SVGA_LEGACY_BASE_PORT
 # define SVGA_IO_MUL		4
 # define SVGA_FIFO_SIZE		0x10000
-# define SVGA_MEM_BASE		0xe0000000
+# define SVGA_MEM_BASE		0xc0000000
 # define SVGA_PCI_DEVICE_ID	PCI_DEVICE_ID_VMWARE_SVGA
 #endif
 
diff --git a/pc-bios/bios-pq/0011-bios-change-pci-mem-address-to-start-at-0xc0000000.patch b/pc-bios/bios-pq/0011-bios-change-pci-mem-address-to-start-at-0xc0000000.patch
new file mode 100644
index 0000000..7ac5bce
--- /dev/null
+++ b/pc-bios/bios-pq/0011-bios-change-pci-mem-address-to-start-at-0xc0000000.patch
@@ -0,0 +1,67 @@
+From 7841b724e744b1790b1d4b29a1cc42a05b04d2c8 Mon Sep 17 00:00:00 2001
+From: izike <izike@home-4.localdomain>
+Date: Sun, 18 Jan 2009 07:15:40 +0200
+Subject: [PATCH] bios: change pci mem addr to start at 0xc0000000 + 0x1000000
+ changing the bios to start at 0xc0000000 + 0x1000000 instead of
+ 0xf0000000 is needed in order to increase the pci mem hole
+
+Signed-off-by: Izik Eidus <ieidus@redhat.com>
+---
+ bios/acpi-dsdt.dsl |    2 +-
+ bios/rombios.c     |    2 +-
+ bios/rombios32.c   |    6 +++---
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/bios/acpi-dsdt.dsl b/bios/acpi-dsdt.dsl
+index a5bc8b3..4249506 100644
+--- a/bios/acpi-dsdt.dsl
++++ b/bios/acpi-dsdt.dsl
+@@ -123,7 +123,7 @@ DefinitionBlock (
+                     ,, , AddressRangeMemory, TypeStatic)
+                 DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
+                     0x00000000,         // Address Space Granularity
+-                    0xE0000000,         // Address Range Minimum
++                    0xC0000000,         // Address Range Minimum
+                     0xFEBFFFFF,         // Address Range Maximum
+                     0x00000000,         // Address Translation Offset
+                     0x1EC00000,         // Address Length
+diff --git a/bios/rombios.c b/bios/rombios.c
+index ee46e42..48fdecc 100644
+--- a/bios/rombios.c
++++ b/bios/rombios.c
+@@ -9795,7 +9795,7 @@ pcibios_init_sel_reg:
+ pcibios_init_iomem_bases:
+   push bp
+   mov  bp, sp
+-  mov  eax, #0xe0000000 ;; base for memory init
++  mov  eax, #0xc0000000 ;; base for memory init
+   push eax
+   mov  ax, #0xc000 ;; base for i/o init
+   push ax
+diff --git a/bios/rombios32.c b/bios/rombios32.c
+index 944d2e7..2dc17d7 100644
+--- a/bios/rombios32.c
++++ b/bios/rombios32.c
+@@ -812,8 +812,8 @@ static void pci_bios_init_device(PCIDevice *d)
+     case 0x0300: /* Display controller - VGA compatible controller */
+         if (vendor_id != 0x1234)
+             goto default_map;
+-        /* VGA: map frame buffer to default Bochs VBE address */
+-        pci_set_io_region_addr(d, 0, 0xE0000000);
++        /* VGA: map frame buffer */
++        pci_set_io_region_addr(d, 0, 0xC0000000);
+         break;
+     case 0x0800: /* Generic system peripheral - PIC */
+         if (vendor_id == PCI_VENDOR_ID_IBM) {
+@@ -900,7 +900,7 @@ void pci_for_each_device(void (*init_func)(PCIDevice *d))
+ void pci_bios_init(void)
+ {
+     pci_bios_io_addr = 0xc000;
+-    pci_bios_mem_addr = 0xf0000000;
++    pci_bios_mem_addr = 0xc0000000 + 0x1000000;
+     pci_bios_bigmem_addr = ram_size;
+     if (pci_bios_bigmem_addr < 0x90000000)
+         pci_bios_bigmem_addr = 0x90000000;
+--
+1.6.0.6
+
diff --git a/pc-bios/bios-pq/series b/pc-bios/bios-pq/series
index 728d041..2240b4c 100644
--- a/pc-bios/bios-pq/series
+++ b/pc-bios/bios-pq/series
@@ -1,4 +1,5 @@
 0001_bx-qemu.patch
+0011-bios-change-pci-mem-address-to-start-at-0xc0000000.patch
 0002_kvm-bios-update-smbios-table-to-report-memory-above-4g.patch
 0003_kvm-bios-generate-mptable-unconditionally.patch
 0004_kvm-bios-add-mtrr-support.patch
diff --git a/pc-bios/vgabios-pq/0001-vga-bios-change-vbe-mapping-to-start-from-0xc0000000.patch b/pc-bios/vgabios-pq/0001-vga-bios-change-vbe-mapping-to-start-from-0xc0000000.patch
new file mode 100644
index 0000000..fb32dd3
--- /dev/null
+++ b/pc-bios/vgabios-pq/0001-vga-bios-change-vbe-mapping-to-start-from-0xc0000000.patch
@@ -0,0 +1,41 @@
+From ed2bdeed6ecc68f968ef1a398b8d65022e1db236 Mon Sep 17 00:00:00 2001
+From: izike <ieidus@redhat.com>
+Date: Sun, 18 Jan 2009 07:13:34 +0200
+Subject: [PATCH] vga-bios: change vbe mapping to start from 0xc0000000
+ changing the mapping from 0xe0000000 to 0xc0000000 is needed in order to
+ allow to increase the size of the pci mem hole
+
+Signed-off-by: Izik Eidus <ieidus@redhat.com>
+---
+ vbe.h               |    2 +-
+ vbe_display_api.txt |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/vbe.h b/vbe.h
+index 60434ac..a199c7d 100644
+--- a/vbe.h
++++ b/vbe.h
+@@ -308,6 +308,6 @@ typedef struct ModeInfoListItem
+   #define VBE_DISPI_LFB_ENABLED           0x40
+   #define VBE_DISPI_NOCLEARMEM            0x80
+
+-  #define VBE_DISPI_LFB_PHYSICAL_ADDRESS  0xE0000000
++  #define VBE_DISPI_LFB_PHYSICAL_ADDRESS  0xC0000000
+
+ #endif
+diff --git a/vbe_display_api.txt b/vbe_display_api.txt
+index fddb78b..c6be039 100644
+--- a/vbe_display_api.txt
++++ b/vbe_display_api.txt
+@@ -119,7 +119,7 @@ vbe.h
+   #define VBE_DISPI_VBE_ENABLED           0x40
+   #define VBE_DISPI_NOCLEARMEM            0x80
+
+-  #define VBE_DISPI_LFB_PHYSICAL_ADDRESS  0xE0000000
++  #define VBE_DISPI_LFB_PHYSICAL_ADDRESS  0xC0000000
+
+ API
+ ---
+--
+1.6.0.6
+
diff --git a/pc-bios/vgabios-pq/series b/pc-bios/vgabios-pq/series
index e69de29..5503640 100644
--- a/pc-bios/vgabios-pq/series
+++ b/pc-bios/vgabios-pq/series
@@ -0,0 +1 @@
+0001-vga-bios-change-vbe-mapping-to-start-from-0xc000000.patch
-- 
1.6.1

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

* Re: [Qemu-devel] [PATCH 0/1] qemu: changing the pci memory address
  2009-02-06 14:53 [Qemu-devel] [PATCH 0/1] qemu: changing the pci memory address Izik Eidus
  2009-02-06 14:53 ` [Qemu-devel] [PATCH] qemu: changing the pci mapping to start from 0xc0000000 Izik Eidus
@ 2009-02-06 16:34 ` Volker Ruppert
  2009-02-06 17:28   ` Izik Eidus
  2009-02-12 19:15   ` Izik Eidus
  1 sibling, 2 replies; 6+ messages in thread
From: Volker Ruppert @ 2009-02-06 16:34 UTC (permalink / raw)
  To: qemu-devel; +Cc: Izik Eidus

Hi!

> Change the pci mem address to start at 0xc0000000,
> Allow more memory resources for the pci devices.
>
> (note with this pach non pea guests can see only up to 3Giga of ram)

It's not necessary to patch the latest CVS version of the LGPL'd VGABIOS, 
since it reads the LFB address from PCI BAR #0. Patching the PCI init code in 
the Bochs BIOS should be enough to make it work.

--
Thanks

Volker

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

* Re: [Qemu-devel] [PATCH 0/1] qemu: changing the pci memory address
  2009-02-06 16:34 ` [Qemu-devel] [PATCH 0/1] qemu: changing the pci memory address Volker Ruppert
@ 2009-02-06 17:28   ` Izik Eidus
  2009-02-12 19:15   ` Izik Eidus
  1 sibling, 0 replies; 6+ messages in thread
From: Izik Eidus @ 2009-02-06 17:28 UTC (permalink / raw)
  To: qemu-devel

Volker Ruppert wrote:
> Hi!
>
>   
>> Change the pci mem address to start at 0xc0000000,
>> Allow more memory resources for the pci devices.
>>
>> (note with this pach non pea guests can see only up to 3Giga of ram)
>>     
>
> It's not necessary to patch the latest CVS version of the LGPL'd VGABIOS, 
> since it reads the LFB address from PCI BAR #0. Patching the PCI init code in 
> the Bochs BIOS should be enough to make it work.
>   

Yes, but i think it better to change the default address of the vga bios 
as well

Any aurgoment against that? (i dont really mind to remove this lines if 
you want to... :-))

> --
> Thanks
>
> Volker
>
>
>   

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

* Re: [Qemu-devel] [PATCH] qemu: changing the pci mapping to start from 0xc0000000.
  2009-02-06 14:53 ` [Qemu-devel] [PATCH] qemu: changing the pci mapping to start from 0xc0000000 Izik Eidus
@ 2009-02-08 23:43   ` Izik Eidus
  0 siblings, 0 replies; 6+ messages in thread
From: Izik Eidus @ 2009-02-08 23:43 UTC (permalink / raw)
  To: qemu-devel, anthony

Izik Eidus wrote:
> With this change pci devices inside qemu can recive more memory resources
>
> Signed-off-by: Izik Eidus <ieidus@redhat.com>
> ---
>   
Anthony, can you please take a look at this?

Thanks.

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

* Re: [Qemu-devel] [PATCH 0/1] qemu: changing the pci memory address
  2009-02-06 16:34 ` [Qemu-devel] [PATCH 0/1] qemu: changing the pci memory address Volker Ruppert
  2009-02-06 17:28   ` Izik Eidus
@ 2009-02-12 19:15   ` Izik Eidus
  1 sibling, 0 replies; 6+ messages in thread
From: Izik Eidus @ 2009-02-12 19:15 UTC (permalink / raw)
  To: qemu-devel

Volker Ruppert wrote:
> Hi!
>
>   
>> Change the pci mem address to start at 0xc0000000,
>> Allow more memory resources for the pci devices.
>>
>> (note with this pach non pea guests can see only up to 3Giga of ram)
>>     
>
> It's not necessary to patch the latest CVS version of the LGPL'd VGABIOS, 
> since it reads the LFB address from PCI BAR #0. Patching the PCI init code in 
> the Bochs BIOS should be enough to make it work.
>   


One question, Vbe in qemu can work with isa, would it work then?

> --
> Thanks
>
> Volker
>
>
>   

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

end of thread, other threads:[~2009-02-12 19:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-06 14:53 [Qemu-devel] [PATCH 0/1] qemu: changing the pci memory address Izik Eidus
2009-02-06 14:53 ` [Qemu-devel] [PATCH] qemu: changing the pci mapping to start from 0xc0000000 Izik Eidus
2009-02-08 23:43   ` Izik Eidus
2009-02-06 16:34 ` [Qemu-devel] [PATCH 0/1] qemu: changing the pci memory address Volker Ruppert
2009-02-06 17:28   ` Izik Eidus
2009-02-12 19:15   ` Izik Eidus

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).