⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 powerpc-lite.patch

📁 Linux-2.6.18内核调试工具补丁程序KGDB。
💻 PATCH
📖 第 1 页 / 共 5 页
字号:
@@ -50,6 +50,7 @@ obj-$(CONFIG_SERIAL_MPC52xx) += mpc52xx_uart.o obj-$(CONFIG_SERIAL_ICOM) += icom.o obj-$(CONFIG_SERIAL_M32R_SIO) += m32r_sio.o+obj-$(CONFIG_KGDB_MPSC) += mpsc_kgdb.o obj-$(CONFIG_SERIAL_MPSC) += mpsc.o obj-$(CONFIG_ETRAX_SERIAL) += crisv10.o obj-$(CONFIG_SERIAL_JSM) += jsm/Index: linux-2.6.16/arch/ppc/Kconfig.debug===================================================================--- linux-2.6.16.orig/arch/ppc/Kconfig.debug	2006-03-20 11:23:29.000000000 +0530+++ linux-2.6.16/arch/ppc/Kconfig.debug	2006-04-25 11:31:05.000000000 +0530@@ -2,42 +2,6 @@  source "lib/Kconfig.debug" -config KGDB-	bool "Include kgdb kernel debugger"-	depends on DEBUG_KERNEL && (BROKEN || PPC_GEN550 || 4xx)-	select DEBUG_INFO-	help-	  Include in-kernel hooks for kgdb, the Linux kernel source level-	  debugger.  See <http://kgdb.sourceforge.net/> for more information.-	  Unless you are intending to debug the kernel, say N here.--choice-	prompt "Serial Port"-	depends on KGDB-	default KGDB_TTYS1--config KGDB_TTYS0-	bool "ttyS0"--config KGDB_TTYS1-	bool "ttyS1"--config KGDB_TTYS2-	bool "ttyS2"--config KGDB_TTYS3-	bool "ttyS3"--endchoice--config KGDB_CONSOLE-	bool "Enable serial console thru kgdb port"-	depends on KGDB && 8xx || CPM2-	help-	  If you enable this, all serial console messages will be sent-	  over the gdb stub.-	  If unsure, say N.- config XMON 	bool "Include xmon kernel debugger" 	depends on DEBUG_KERNELIndex: linux-2.6.16/arch/ppc/platforms/4xx/xilinx_ml300.c===================================================================--- linux-2.6.16.orig/arch/ppc/platforms/4xx/xilinx_ml300.c	2006-03-20 11:23:29.000000000 +0530+++ linux-2.6.16/arch/ppc/platforms/4xx/xilinx_ml300.c	2006-04-25 11:31:05.000000000 +0530@@ -42,9 +42,6 @@  *      ppc4xx_map_io				arch/ppc/syslib/ppc4xx_setup.c  *  start_kernel				init/main.c  *    setup_arch				arch/ppc/kernel/setup.c- * #if defined(CONFIG_KGDB)- *      *ppc_md.kgdb_map_scc() == gen550_kgdb_map_scc- * #endif  *      *ppc_md.setup_arch == ml300_setup_arch	this file  *        ppc4xx_setup_arch			arch/ppc/syslib/ppc4xx_setup.c  *          ppc4xx_find_bridges			arch/ppc/syslib/ppc405_pci.c@@ -83,7 +80,6 @@ static void __init ml300_early_serial_map(void) {-#ifdef CONFIG_SERIAL_8250 	struct serial_state old_ports[] = { SERIAL_PORT_DFNS }; 	struct uart_port port; 	int i;@@ -99,11 +95,14 @@ 		port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; 		port.line = i; -		if (early_serial_setup(&port) != 0) {+#ifdef CONFIG_SERIAL_8250+		if (early_serial_setup(&port) != 0) 			printk("Early serial init of port %d failed\n", i);-		}+#endif+#ifdef CONFIG_KGDB_8250+		kgdb8250_add_port(i, &port)+#endif 	}-#endif /* CONFIG_SERIAL_8250 */ }  void __init@@ -138,9 +137,4 @@ #if defined(XPAR_POWER_0_POWERDOWN_BASEADDR) 	ppc_md.power_off = xilinx_power_off; #endif--#ifdef CONFIG_KGDB-	ppc_md.early_serial_map = ml300_early_serial_map;-#endif }-Index: linux-2.6.16/arch/ppc/platforms/4xx/bubinga.c===================================================================--- linux-2.6.16.orig/arch/ppc/platforms/4xx/bubinga.c	2006-03-20 11:23:29.000000000 +0530+++ linux-2.6.16/arch/ppc/platforms/4xx/bubinga.c	2006-04-25 11:31:05.000000000 +0530@@ -4,7 +4,7 @@  * Author: SAW (IBM), derived from walnut.c.  *         Maintained by MontaVista Software <source@mvista.com>  *- * 2003 (c) MontaVista Softare Inc.  This file is licensed under the+ * 2003-2004 (c) MontaVista Softare Inc.  This file is licensed under the  * terms of the GNU General Public License version 2. This program is  * licensed "as is" without any warranty of any kind, whether express  * or implied.@@ -101,17 +101,26 @@ 	port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; 	port.line = 0; -	if (early_serial_setup(&port) != 0) {+#ifdef CONFIG_SERIAL_8250+	if (early_serial_setup(&port) != 0) 		printk("Early serial init of port 0 failed\n");-	}+#endif++#ifdef CONFIG_KGDB_8250+	kgdb8250_add_port(0, &port);+#endif  	port.membase = (void*)ACTING_UART1_IO_BASE; 	port.irq = ACTING_UART1_INT; 	port.line = 1; -	if (early_serial_setup(&port) != 0) {+#ifdef CONFIG_SERIAL_8250+	if (early_serial_setup(&port) != 0) 		printk("Early serial init of port 1 failed\n");-	}+#endif+#ifdef CONFIG_KGDB_8250+	kgdb8250_add_port(1, &port);+#endif }  void __init@@ -256,8 +265,4 @@ 	ppc_md.nvram_read_val = todc_direct_read_val; 	ppc_md.nvram_write_val = todc_direct_write_val; #endif-#ifdef CONFIG_KGDB-	ppc_md.early_serial_map = bubinga_early_serial_map;-#endif }-Index: linux-2.6.16/arch/ppc/platforms/4xx/ebony.c===================================================================--- linux-2.6.16.orig/arch/ppc/platforms/4xx/ebony.c	2006-03-20 11:23:29.000000000 +0530+++ linux-2.6.16/arch/ppc/platforms/4xx/ebony.c	2006-04-25 11:31:05.000000000 +0530@@ -35,6 +35,7 @@ #include <linux/tty.h> #include <linux/serial.h> #include <linux/serial_core.h>+#include <linux/kgdb.h>  #include <asm/system.h> #include <asm/pgtable.h>@@ -229,14 +230,20 @@ 	port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; 	port.line = 0; -	if (early_serial_setup(&port) != 0) {+#ifdef CONFIG_SERIAL_8250+	if (early_serial_setup(&port) != 0) 		printk("Early serial init of port 0 failed\n");-	}+#endif -#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)+#ifdef CONFIG_SERIAL_TEXT_DEBUG 	/* Configure debug serial access */ 	gen550_init(0, &port);+#endif+#ifdef CONFIG_KGDB_8250+	kgdb8250_add_port(0, &port);+#endif +#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB_8250) 	/* Purge TLB entry added in head_44x.S for early serial access */ 	_tlbie(UART0_IO_BASE); #endif@@ -246,14 +253,18 @@ 	port.uartclk = clocks.uart1; 	port.line = 1; -	if (early_serial_setup(&port) != 0) {+#ifdef CONFIG_SERIAL_8250+	if (early_serial_setup(&port) != 1) 		printk("Early serial init of port 1 failed\n");-	}+#endif -#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)+#ifdef CONFIG_SERIAL_TEXT_DEBUG 	/* Configure debug serial access */ 	gen550_init(1, &port); #endif+#ifdef CONFIG_KGDB_8250+	kgdb8250_add_port(1, &port);+#endif }  static void __init@@ -330,8 +341,4 @@  	ppc_md.nvram_read_val = todc_direct_read_val; 	ppc_md.nvram_write_val = todc_direct_write_val;-#ifdef CONFIG_KGDB-	ppc_md.early_serial_map = ebony_early_serial_map;-#endif }-Index: linux-2.6.16/arch/ppc/platforms/4xx/ocotea.c===================================================================--- linux-2.6.16.orig/arch/ppc/platforms/4xx/ocotea.c	2006-03-20 11:23:29.000000000 +0530+++ linux-2.6.16/arch/ppc/platforms/4xx/ocotea.c	2006-04-25 11:31:05.000000000 +0530@@ -33,6 +33,7 @@ #include <linux/tty.h> #include <linux/serial.h> #include <linux/serial_core.h>+#include <linux/kgdb.h>  #include <asm/system.h> #include <asm/pgtable.h>@@ -252,14 +253,20 @@ 	port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST; 	port.line = 0; -	if (early_serial_setup(&port) != 0) {+#ifdef CONFIG_SERIAL_8250+	if (early_serial_setup(&port) != 0) 		printk("Early serial init of port 0 failed\n");-	}+#endif -#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)+#ifdef CONFIG_SERIAL_TEXT_DEBUG 	/* Configure debug serial access */ 	gen550_init(0, &port);+#endif+#ifdef CONFIG_KGDB_8250+	kgdb8250_add_port(0, &port);+#endif +#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB_8250) 	/* Purge TLB entry added in head_44x.S for early serial access */ 	_tlbie(UART0_IO_BASE); #endif@@ -269,14 +276,18 @@ 	port.uartclk = clocks.uart1; 	port.line = 1; -	if (early_serial_setup(&port) != 0) {+#ifdef CONFIG_SERIAL_8250+	if (early_serial_setup(&port) != 1) 		printk("Early serial init of port 1 failed\n");-	}+#endif -#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)+#ifdef CONFIG_SERIAL_TEXT_DEBUG 	/* Configure debug serial access */ 	gen550_init(1, &port); #endif+#ifdef CONFIG_KGDB_8250+	kgdb8250_add_port(1, &port);+#endif }  static void __init@@ -346,8 +357,5 @@  	ppc_md.nvram_read_val = todc_direct_read_val; 	ppc_md.nvram_write_val = todc_direct_write_val;-#ifdef CONFIG_KGDB-	ppc_md.early_serial_map = ocotea_early_serial_map;-#endif 	ppc_md.init = ocotea_init; }Index: linux-2.6.16/arch/ppc/platforms/chestnut.c===================================================================--- linux-2.6.16.orig/arch/ppc/platforms/chestnut.c	2006-03-20 11:23:29.000000000 +0530+++ linux-2.6.16/arch/ppc/platforms/chestnut.c	2006-04-25 11:31:05.000000000 +0530@@ -495,7 +495,7 @@ static void __init chestnut_map_io(void) {-#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)+#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB_8250) 	io_block_mapping(CHESTNUT_UART_BASE, CHESTNUT_UART_BASE, 0x100000, 		_PAGE_IO); #endif@@ -569,9 +569,6 @@ #if defined(CONFIG_SERIAL_TEXT_DEBUG) 	ppc_md.progress = gen550_progress; #endif-#if defined(CONFIG_KGDB)-	ppc_md.kgdb_map_scc = gen550_kgdb_map_scc;-#endif  	if (ppc_md.progress)                 ppc_md.progress("chestnut_init(): exit", 0);Index: linux-2.6.16/arch/ppc/platforms/sandpoint.c===================================================================--- linux-2.6.16.orig/arch/ppc/platforms/sandpoint.c	2006-03-20 11:23:29.000000000 +0530+++ linux-2.6.16/arch/ppc/platforms/sandpoint.c	2006-04-25 11:31:05.000000000 +0530@@ -733,9 +733,6 @@ 	ppc_md.nvram_read_val = todc_mc146818_read_val; 	ppc_md.nvram_write_val = todc_mc146818_write_val; -#ifdef CONFIG_KGDB-	ppc_md.kgdb_map_scc = gen550_kgdb_map_scc;-#endif #ifdef CONFIG_SERIAL_TEXT_DEBUG 	ppc_md.progress = gen550_progress; #endifIndex: linux-2.6.16/arch/ppc/platforms/pplus.c===================================================================--- linux-2.6.16.orig/arch/ppc/platforms/pplus.c	2006-03-20 11:23:29.000000000 +0530+++ linux-2.6.16/arch/ppc/platforms/pplus.c	2006-04-25 11:31:05.000000000 +0530@@ -896,9 +896,6 @@ #ifdef CONFIG_SERIAL_TEXT_DEBUG 	ppc_md.progress = gen550_progress; #endif				/* CONFIG_SERIAL_TEXT_DEBUG */-#ifdef CONFIG_KGDB-	ppc_md.kgdb_map_scc = gen550_kgdb_map_scc;-#endif #ifdef CONFIG_SMP 	smp_ops = &pplus_smp_ops; #endif				/* CONFIG_SMP */Index: linux-2.6.16/arch/ppc/platforms/spruce.c===================================================================--- linux-2.6.16.orig/arch/ppc/platforms/spruce.c	2006-03-20 11:23:29.000000000 +0530+++ linux-2.6.16/arch/ppc/platforms/spruce.c	2006-04-25 11:31:05.000000000 +0530@@ -181,26 +181,32 @@ 	serial_req.membase = (u_char *)UART0_IO_BASE; 	serial_req.regshift = 0; -#if defined(CONFIG_KGDB) || defined(CONFIG_SERIAL_TEXT_DEBUG)-	gen550_init(0, &serial_req);-#endif #ifdef CONFIG_SERIAL_8250 	if (early_serial_setup(&serial_req) != 0) 		printk("Early serial init of port 0 failed\n"); #endif+#ifdef CONFIG_SERIAL_TEXT_DEBUG+	gen550_init(0, &serial_req);+#endif+#ifdef CONFIG_KGDB_8250+	kgdb8250_add_port(0, &port);+#endif  	/* Assume early_serial_setup() doesn't modify serial_req */ 	serial_req.line = 1; 	serial_req.irq = UART1_INT; 	serial_req.membase = (u_char *)UART1_IO_BASE; -#if defined(CONFIG_KGDB) || defined(CONFIG_SERIAL_TEXT_DEBUG)-	gen550_init(1, &serial_req);-#endif #ifdef CONFIG_SERIAL_8250 	if (early_serial_setup(&serial_req) != 0) 		printk("Early serial init of port 1 failed\n"); #endif+#ifdef CONFIG_SERIAL_TEXT_DEBUG+	gen550_init(1, &serial_req);+#endif+#ifdef CONFIG_KGDB_8250+	kgdb8250_add_port(1, &serial_req);+#endif }  TODC_ALLOC();@@ -319,7 +325,4 @@ #ifdef CONFIG_SERIAL_TEXT_DEBUG 	ppc_md.progress = gen550_progress; #endif /* CONFIG_SERIAL_TEXT_DEBUG */-#ifdef CONFIG_KGDB-	ppc_md.kgdb_map_scc = gen550_kgdb_map_scc;-#endif }Index: linux-2.6.16/arch/ppc/platforms/85xx/sbc8560.c===================================================================--- linux-2.6.16.orig/arch/ppc/platforms/85xx/sbc8560.c	2006-03-20 11:23:29.000000000 +0530+++ linux-2.6.16/arch/ppc/platforms/85xx/sbc8560.c	2006-04-25 11:31:05.000000000 +0530@@ -53,7 +53,6 @@ #include <syslib/ppc85xx_common.h> #include <syslib/ppc85xx_setup.h> -#ifdef CONFIG_SERIAL_8250 static void __init sbc8560_early_serial_map(void) {@@ -69,12 +68,16 @@         uart_req.membase = ioremap(uart_req.mapbase, MPC85xx_UART0_SIZE); 	uart_req.type = PORT_16650; -#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)-        gen550_init(0, &uart_req);+#ifdef CONFIG_SERIAL_8250+	if (early_serial_setup(&uart_req) != 0)+		printk("Early serial init of port 0 failed\n");+#endif+#ifdef CONFIG_SERIAL_TEXT_DEBUG+	gen550_init(0, &uart_req);+#endif+#ifdef CONFIG_KGDB_8250+	kgdb8250_add_port(0, &uart_req); #endif- -        if (early_serial_setup(&uart_req) != 0)-                printk("Early serial init of port 0 failed\n");           /* Assume early_serial_setup() doesn't modify uart_req */ 	uart_req.line = 1;@@ -82,14 +85,17 @@         uart_req.membase = ioremap(uart_req.mapbase, MPC85xx_UART1_SIZE); 	uart_req.irq = MPC85xx_IRQ_EXT10;  -#if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB)-        gen550_init(1, &uart_req);+#ifdef CONFIG_SERIAL_8250+	if (early_serial_setup(&uart_req) != 0)+		printk("Early serial init of port 0 failed\n"); #endif- -        if (early_serial_setup(&uart_req) != 0)-                printk("Early serial init of port 1 failed\n");-}+#ifdef CONFIG_SERIAL_TEXT_DEBUG+	gen550_init(0, &uart_req);+#endif+#ifdef CONFIG_KGDB_8250+	kgdb8250_add_port(0, &uart_req); #endif+}  /* ************************************************************************  *@@ -118,9 +124,7 @@ 	/* setup PCI host bridges */ 	mpc85xx_setup_hose(); #endif-#ifdef CONFIG_SERIAL_8250 	sbc8560_early_serial_map();-#endif #ifdef CONFIG_SERIAL_TEXT_DEBUG 	/* Invalidate the entry we stole earlier the serial ports 	 * should be properly mapped */ 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -