Skip to contentSkip to conversation

qemu: change pci mapping to start from 0xc000000

PATCH In review Izik Eidus 2 participants 3 messages Jan 18, 2009 – Jan 19, 2009

lore
Share & tools
lore

Izik Eidus

author
#0 lore raw

PATCH 1/1 qemu: change pci mapping to start from 0xc000000

changing the pci mapping to start from 0xc000000 give much more memory resources to pci devices inside qemu.

note: none pea guests wont be able to see more than 3Giga of ram but it doesnt seems like a problem.

---

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 +
...hange-vbe-mapping-to-start-from-0xc000000.patch |   41 ++++++++++++
pc-bios/vgabios-pq/series                          |    1 +
7 files changed, 116 insertions(+), 6 deletions(-)

create mode 100644 pc-bios/bios-pq/0001-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-0xc000000.patch

hw/pc.c +3 -3
index dd5fb8f..cfe30cc 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 +0 -0
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 +0 -0
index 950a98c..1110f99 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/0001-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 +0 -0
index 556c0e4..8ea91a2 100644
@@ -1 +1,2 @@

0001_bx-qemu.patch +0001-bios-change-pci-mem-address-to-start-at-0xc0000000.patch

pc-bios/vgabios-pq/0001-vga-bios-change-vbe-mapping-to-start-from-0xc000000.patch new file +40 -0
new file mode 100644
index 0000000..cff97bf
@@ -0,0 +1,41 @@
+From ed2bdeed6ecc68f968ef1a398b8d65022e1db236 Mon Sep 17 00:00:00 2001
+From: izike <[email protected]>
+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 <[email protected]>
+---
+ 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
+
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.0.6
#1 lore raw
Quoted 7 lines · Izik Eidus

changing the pci mapping to start from 0xc000000 give much more memory resources to pci devices inside qemu.

note: none pea guests wont be able to see more than 3Giga of ram but it doesnt seems like a problem.

you mail is line wrapped
and maybe you could be more specific in the commit message about which arch/board you update

Best Regards,
J.

author
#2 lore raw
Quoted 5 lines · Jean-Christophe PLAGNIOL-VILLARD
Quoted 3 lines · Izik Eidus

changing the pci mapping to start from 0xc000000 give much more memory resources to pci devices inside qemu.

Quoted 8 lines
Quoted 8 lines

note: none pea guests wont be able to see more than 3Giga of ram but it doesnt seems like a problem.

and maybe you could be more specific in the commit message about which arch/board you update

The update is just for x86 systems..