On Tue, Dec 16, 2008 at 5:28 PM, Myles Watson <[email protected]> wrote:
>>
>> Ok, thats true... i will remove it... i have played with more than 1MB
>> virtual memory once, but it isnt really needed...
>>
...
>
> You're right, that also doesn't make sense.  I meant make it so that you
> have to provide a value if you want to change it.  So could you introduce a
> boolean that deafaults to false and depends on expert that is "set the
> address for yabel", then not have a default for the address.
>
> Thanks,
> Myles
>
>

Update patch attached. Removed size setting, changed location setting
as proposed.

Patty
From f48b502feb32ef1612d8c5256f63604ccfea909d Mon Sep 17 00:00:00 2001
From: Pattrick Hueper <[email protected]>
Date: Tue, 16 Dec 2008 12:30:20 +0100
Subject: [PATCH 1/1] make the virtual memory location used by YABEL configurable in Kconfig

Signed-off-by: Pattrick Hueper <[email protected]>
---
 device/Kconfig                       |   23 +++++++++++++++++++++++
 util/x86emu/yabel/compat/functions.c |   11 ++++++++---
 2 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/device/Kconfig b/device/Kconfig
index ae0e259..8d20489 100644
--- a/device/Kconfig
+++ b/device/Kconfig
@@ -83,6 +83,29 @@ config PCI_OPTION_ROM_RUN_NONE
 
 endchoice
 
+config YABEL_ADVANCED_SETTINGS
+	depends EXPERT && PCI_OPTION_ROM_RUN_YABEL
+	bool "Enable advanced YABEL Settings"
+	default n
+	help
+	  Set this to enable advanced YABEL settings
+
+menu "Advanced YABEL Settings"
+	depends YABEL_ADVANCED_SETTINGS
+
+	config YABEL_VIRTMEM_LOCATION
+		hex "YABEL Virtual Memory Location"
+		help
+		  Set the location that YABEL uses for "virtual" memory. 
+		  YABEL uses its own memory where INT handlers, BIOS Config
+		  Area and Option ROM code is copied to. This is needed to 
+		  keep YABEL in its own environment. This memory area will be
+		  overwritten by YABEL, so no necessary data for coreboot 
+		  must reside here. 
+		  Defaults to 0x1000000 (16 MB)
+
+endmenu
+
 # TODO: This should probably become a CMOS option.
 config MULTIPLE_VGA_INIT
 	bool "Initialize all VGA cards"
diff --git a/util/x86emu/yabel/compat/functions.c b/util/x86emu/yabel/compat/functions.c
index 2603957..c1a6d9a 100644
--- a/util/x86emu/yabel/compat/functions.c
+++ b/util/x86emu/yabel/compat/functions.c
@@ -5,10 +5,15 @@
 
 #include <types.h>
 #include <device/device.h>
+#include <config.h>
 
-/* vmem array... TODO: malloc?? or hardcode someplace? */
-#define VMEM_SIZE 1024 *1024
-u8* vmem = (u8 *) (16*1024*1024); /* hardcode our vmem to 16MB... TODO: verify, if this is ok! */
+#define VMEM_SIZE 1024 *1024 /* 1 MB */
+
+#ifdef CONFIG_YABEL_VIRTMEM_LOCATION
+u8* vmem = (u8 *) CONFIG_YABEL_VIRTMEM_LOCATION;
+#else
+u8* vmem = (u8 *) (16*1024*1024); /* default to 16MB */
+#endif
 
 u32 biosemu(u8 *biosmem, u32 biosmem_size, struct device * dev);
 
-- 
1.6.0.4

--
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to