Hi,

to not have to change source code to change debug output of YABEL, i
came up with this patches...

the two 0001 patches add the variable to the config system for v2 and
v3, the 0002 uses the variable in yabel startup.

Regards, Pattrick
From 9713d4764523f5c70e07296c7d8a6383d763c6bc Mon Sep 17 00:00:00 2001
From: Pattrick Hueper <[email protected]>
Date: Tue, 10 Mar 2009 14:25:38 +0100
Subject: [PATCH 1/2] add YABEL Debug Flags to Options

Signed-off-by: Pattrick Hueper <[email protected]>
---
 src/config/Options.lb |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/config/Options.lb b/src/config/Options.lb
index 88f57e2..4bc20c6 100644
--- a/src/config/Options.lb
+++ b/src/config/Options.lb
@@ -1087,6 +1087,12 @@ define CONFIG_PCI_OPTION_ROM_RUN_YABEL
 	comment "Use Yabel instead of old bios emulator"
 end
 
+define CONFIG_YABEL_DEBUG_FLAGS
+	default 0
+	export used
+	comment "YABEL debug flags, for possible values, see util/x86emu/yabel/debug.h"
+end
+
 define CONFIG_PCI_OPTION_ROM_RUN_VM86
 	default 0
 	export used
-- 
1.6.2

From 0144cad7df464f5d58a423a74c38ed396387df0b Mon Sep 17 00:00:00 2001
From: Pattrick Hueper <[email protected]>
Date: Fri, 13 Mar 2009 22:40:40 +0100
Subject: [PATCH 1/2] add YABEL Debug Flag config variable

Signed-off-by: Pattrick Hueper <[email protected]>
---
 device/Kconfig |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/device/Kconfig b/device/Kconfig
index 9f944a4..ac37cdc 100644
--- a/device/Kconfig
+++ b/device/Kconfig
@@ -105,6 +105,12 @@ menu "Advanced YABEL Settings"
 		  If YABEL_ADVANCED_SETTINGS is not enabled, the code defaults 
 		  to 0x1000000 (16 MB).
 
+	config YABEL_DEBUG_FLAGS
+		hex "YABEL Debug Flags"
+		default 0
+		help
+		  Set YABEL debug flags, for possible values, see util/x86emu/yabel/debug.h
+
 endmenu
 
 # TODO: This should probably become a CMOS option.
-- 
1.6.2

From 1342ab0a6fe3ec72ddabaa87cf72bcd56b6883f8 Mon Sep 17 00:00:00 2001
From: Pattrick Hueper <[email protected]>
Date: Fri, 13 Mar 2009 22:42:37 +0100
Subject: [PATCH 2/2] use CONFIG_YABEL_DEBUG_FLAGS when setting debug_flags

Signed-off-by: Pattrick Hueper <[email protected]>
---
 util/x86emu/yabel/biosemu.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/util/x86emu/yabel/biosemu.c b/util/x86emu/yabel/biosemu.c
index 4491479..e0010d8 100644
--- a/util/x86emu/yabel/biosemu.c
+++ b/util/x86emu/yabel/biosemu.c
@@ -70,9 +70,12 @@ biosemu(u8 *biosmem, u32 biosmem_size, struct device * dev, unsigned long rom_ad
 	u8 *rom_image;
 	int i = 0;
 #ifdef DEBUG
-	debug_flags = DEBUG_PRINT_INT10 | DEBUG_PNP | DEBUG_PMM | DEBUG_INTR;
+	debug_flags = 0;//DEBUG_PRINT_INT10 | DEBUG_PNP | DEBUG_INTR | DEBUG_CHECK_VMEM_ACCESS | DEBUG_MEM | DEBUG_IO;
 		// | DEBUG_CHECK_VMEM_ACCESS | DEBUG_MEM | DEBUG_IO;
 		// | DEBUG_TRACE_X86EMU | DEBUG_JMP;
+
+	/* use CONFIG_YABEL_DEBUG_FLAGS, too... */
+	debug_flags |= CONFIG_YABEL_DEBUG_FLAGS;
 #endif
 	if (biosmem_size < MIN_REQUIRED_VMEM_SIZE) {
 		printf("Error: Not enough virtual memory: %x, required: %x!\n",
-- 
1.6.2

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

Reply via email to