From: Izik Eidus <ieidus@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] qemu: change pci mapping to start from 0xc000000
Date: Sun, 18 Jan 2009 07:29:29 +0200 [thread overview]
Message-ID: <4972BE39.3020203@redhat.com> (raw)
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.
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 +
...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
diff --git a/hw/pc.c b/hw/pc.c
index dd5fb8f..cfe30cc 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 950a98c..1110f99 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/0001-bios-change-pci-mem-address-to-start-at-0xc0000000.patch
b/pc-bios/bios-pq/0001-bios-change-pci-mem-address-to-start-at-0xc0000000.patch
new file mode 100644
index 0000000..d6fd42f
--- /dev/null
+++
b/pc-bios/bios-pq/0001-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 556c0e4..8ea91a2 100644
--- a/pc-bios/bios-pq/series
+++ b/pc-bios/bios-pq/series
@@ -1 +1,2 @@
0001_bx-qemu.patch
+0001-bios-change-pci-mem-address-to-start-at-0xc0000000.patch
diff --git
a/pc-bios/vgabios-pq/0001-vga-bios-change-vbe-mapping-to-start-from-0xc000000.patch
b/pc-bios/vgabios-pq/0001-vga-bios-change-vbe-mapping-to-start-from-0xc000000.patch
new file mode 100644
index 0000000..cff97bf
--- /dev/null
+++
b/pc-bios/vgabios-pq/0001-vga-bios-change-vbe-mapping-to-start-from-0xc000000.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.0.6
next reply other threads:[~2009-01-18 5:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-18 5:29 Izik Eidus [this message]
2009-01-18 16:02 ` [Qemu-devel] [PATCH] qemu: change pci mapping to start from 0xc000000 Jean-Christophe PLAGNIOL-VILLARD
2009-01-19 10:37 ` Izik Eidus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4972BE39.3020203@redhat.com \
--to=ieidus@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.