From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LOQE5-000551-PQ for qemu-devel@nongnu.org; Sun, 18 Jan 2009 00:29:37 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LOQE4-00054h-Nz for qemu-devel@nongnu.org; Sun, 18 Jan 2009 00:29:37 -0500 Received: from [199.232.76.173] (port=52439 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LOQE4-00054e-Id for qemu-devel@nongnu.org; Sun, 18 Jan 2009 00:29:36 -0500 Received: from mx2.redhat.com ([66.187.237.31]:37339) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LOQE3-0006tv-QY for qemu-devel@nongnu.org; Sun, 18 Jan 2009 00:29:36 -0500 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n0I5TWS8005776 for ; Sun, 18 Jan 2009 00:29:34 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n0I5TWVg017857 for ; Sun, 18 Jan 2009 00:29:33 -0500 Received: from [10.32.10.36] (vpn-10-36.str.redhat.com [10.32.10.36]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n0I5TVB2030481 for ; Sun, 18 Jan 2009 00:29:32 -0500 Message-ID: <4972BE39.3020203@redhat.com> Date: Sun, 18 Jan 2009 07:29:29 +0200 From: Izik Eidus MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] qemu: change pci mapping to start from 0xc000000 Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- 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 +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 +--- + 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 +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 +--- + 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