[SeaBIOS] [PATCH v2] Make pci memory window configurable.
Gerd Hoffmann
kraxel at redhat.com
Thu Apr 28 16:49:52 CEST 2011
This patch makes the memory window for PCI
memory bars configurable via Kconfig.
[ v2: handle old pcimem assignment method ]
Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
src/Kconfig | 10 ++++++++++
src/config.h | 9 ++++-----
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/Kconfig b/src/Kconfig
index 6d55b23..91a89e3 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -187,6 +187,16 @@ menu "Hardware support"
depends on EXTRA_PCI_ROOTS
hex "Extra secondary PCI root bus number"
default 0x00
+ config PCIMEM_ENABLE_PREFETCH
+ bool "Use separate window for prefetchable PCI memory"
+ default y
+ config PCIMEM_START
+ hex "PCI memory window start address"
+ default 0xf0000000
+ config PCIMEM_SIZE
+ depends on PCIMEM_ENABLE_PREFETCH
+ hex "PCI memory window size for non-prefetchable memory"
+ default 0x08000000
config USE_SMM
depends on !COREBOOT
diff --git a/src/config.h b/src/config.h
index 5b40488..2aa14c5 100644
--- a/src/config.h
+++ b/src/config.h
@@ -47,18 +47,17 @@
#define BUILD_BIOS_TMP_ADDR 0x30000
#define BUILD_MAX_HIGHMEM 0xe0000000
+#ifndef CONFIG_PCIMEM_ENABLE_PREFETCH
// Support old pci mem assignment behaviour
-//#define CONFIG_OLD_PCIMEM_ASSIGNMENT 1
-#if CONFIG_OLD_PCIMEM_ASSIGNMENT
-#define BUILD_PCIMEM_START 0xf0000000
+#define BUILD_PCIMEM_START CONFIG_PCIMEM_START
#define BUILD_PCIMEM_SIZE (BUILD_PCIMEM_END - BUILD_PCIMEM_START)
#define BUILD_PCIMEM_END 0xfec00000 /* IOAPIC is mapped at */
#define BUILD_PCIPREFMEM_START 0
#define BUILD_PCIPREFMEM_SIZE 0
#define BUILD_PCIPREFMEM_END 0
#else
-#define BUILD_PCIMEM_START 0xf0000000
-#define BUILD_PCIMEM_SIZE 0x08000000 /* half- of pci window */
+#define BUILD_PCIMEM_START CONFIG_PCIMEM_START
+#define BUILD_PCIMEM_SIZE CONFIG_PCIMEM_SIZE
#define BUILD_PCIMEM_END (BUILD_PCIMEM_START + BUILD_PCIMEM_SIZE)
#define BUILD_PCIPREFMEM_START BUILD_PCIMEM_END
#define BUILD_PCIPREFMEM_SIZE (BUILD_PCIPREFMEM_END - BUILD_PCIPREFMEM_START)
--
1.7.1
More information about the SeaBIOS
mailing list