Skip to contentSkip to conversation

qemu: changing the pci memory address

PATCH In review Izik Eidus 2 participants 6 messages Feb 6, 2009 – Feb 12, 2009

lore
Share & tools
lore

Izik Eidus

author
#0 lore raw

cover qemu: changing the pci memory address

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)

author
#1 lore raw

PATCH 1/1 qemu: changing the pci mapping to start from 0xc0000000.

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

---
 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
hw/pc.c +3 -3
index 176730e..dba371e 100644
@@ -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;
     }
hw/vga_int.h +1 -1
index f97e98f..57f20bf 100644
@@ -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
 
hw/vmware_vga.c +2 -2
index d1cba28..5ee0ad6 100644
@@ -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
 
pc-bios/bios-pq/0011-bios-change-pci-mem-address-to-start-at-0xc0000000.patch new file +67 -0

67 lines not on this page · raw message

pc-bios/bios-pq/series +1 -0
index 728d041..2240b4c 100644
@@ -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
pc-bios/vgabios-pq/0001-vga-bios-change-vbe-mapping-to-start-from-0xc0000000.patch new file +41 -0

41 lines not on this page · raw message

pc-bios/vgabios-pq/series +1 -0
index e69de29..5503640 100644
@@ -0,0 +1 @@
+0001-vga-bios-change-vbe-mapping-to-start-from-0xc000000.patch
Signature · 1 line
1.6.1
author
#2 lore raw

Re: [Qemu-devel] [PATCH] qemu: changing the pci mapping to start from 0xc0000000.

Quoted 5 lines · Izik Eidus

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

---

Anthony, can you please take a look at this?

Thanks.

#3 lore raw
In reply to Izik Eidus

Hi!

Quoted 4 lines

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

author
#4 lore raw
Quoted 11 lines · Volker Ruppert

Hi!

Quoted 5 lines

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

Quoted 7 lines

--
Thanks

Volker

author
#5 lore raw
In reply to Volker Ruppert
Quoted 11 lines · Volker Ruppert

Hi!

Quoted 5 lines

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?

Quoted 7 lines

--
Thanks

Volker