亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫(kù)
最近訪問(wèn)板塊 發(fā)新帖
查看: 1533 | 回復(fù): 0
打印 上一主題 下一主題

Usage of debug_ll [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2009-12-10 22:59 |只看該作者 |倒序?yàn)g覽

                Only two patch file attached in this article, which implements detailed __debug_ll()__ implementation for xxx platform.
Long long ago, I want to implement this function, now, I got it. Feel good.
More detailed descriptions, please refer to :
Usage of subroutine printascill in Assemble
Actually, this function only deals with the transmission operations to UART1.
As we know that, during the bootup of linux kernel, it will look up the machine type ID provided by uboot, if the ID found, the kernel might be brought up properly, else, the bootup terminated, and error message will be printed out by printasscii, namely, debug_ll. Now to trigger the error, modify the machine type ID in arch/arm/tools/mach-types.
The two patches needed are attached, one is to add __debug_ll_ in _printk_, the other is to modify the settings to UART?, which is used to transmit chars.
diff --git a/kernel/printk.c b/kernel/printk.cindex e3602d0..e39866e 100644--- a/kernel/printk.c+++ b/kernel/printk.c@@ -44,6 +44,10 @@ void asmlinkage __attribute__((weak)) early_printk(const char *fmt, ...)  #define __LOG_BUF_LEN    (1  +#ifdef        CONFIG_DEBUG_LL+extern void printascii(char *);+#endif+ /* printk's without a loglevel use this.. */ #define DEFAULT_MESSAGE_LOGLEVEL 4 /* KERN_WARNING */ @@ -668,6 +672,10 @@ asmlinkage int vprintk(const char *fmt, va_list args)                   sizeof(printk_buf) - printed_len, fmt, args);  +#ifdef    CONFIG_DEBUG_LL+    printascii(printk_buf);+#endif+     /*      * Copy the output into log_buf.  If the caller didn't provide      * appropriate log level tags, we insert them here
------------------------------------------------------------------------
diff --git a/arch/arm/include/asm/hardware/debug-pl01x.S b/arch/arm/include/asm/hardware/debug-pl01x.Sindex f9fd083..1e30092 100644--- a/arch/arm/include/asm/hardware/debug-pl01x.S+++ b/arch/arm/include/asm/hardware/debug-pl01x.S@@ -17,13 +17,18 @@         .endm          .macro    waituart,rd,rx-1001:        ldr    \rd, [\rx, #UART01x_FR]-        tst    \rd, #UART01x_FR_TXFF-        bne    1001b++@Refer to function __NS16550_putc()__ in uboot/drivers/ns16550.c+1001:    ldr    \rd, [\rx, #0x14] @Line Status Register / UART1_LSR_REG+        tst    \rd, #0x20 @THRE bit of above register+                        @which is Transmitter below threshold indicator.+        beq    1001b         .endm          .macro    busyuart,rd,rx+#if 0 1001:        ldr    \rd, [\rx, #UART01x_FR]         tst    \rd, #UART01x_FR_BUSY         bne    1001b+#endif         .endmdiff --git a/arch/arm/mach-im9815/include/mach/debug-macro.S b/arch/arm/mach-im9815/include/mach/debug-macro.Sindex 165e083..4816f80 100644--- a/arch/arm/mach-im9815/include/mach/debug-macro.S+++ b/arch/arm/mach-im9815/include/mach/debug-macro.S@@ -10,14 +10,14 @@  * published by the Free Software Foundation.  * */-+#include          .macro    addruart,rx         mrc    p15, 0, \rx, c1, c0         tst    \rx, #1            @ MMU enabled?-        moveq    \rx,      #0xf0000000-        movne    \rx,      #0xef000000    @ virtual base-        orr    \rx, \rx, #0x00010000-        orr    \rx, \rx, #0x00000000+        ldreq    \rx,     =0xf0010000 @ physical base address of UART1+        ldrne    \rx,     =(IO_ADDRESS(EVB1226_UART0_BASE))    @ virtual base+@        orr    \rx, \rx, #0x00010000+@        orr    \rx, \rx, #0x00000000         .endm  #include
--------------------------------------------------------------------------------
The following is error message printed out triggered by the above settings:
U-Boot 1.1.6-gf616b9a4-dirty (Dec  1 2009 - 11:39:52)
DRAM:  128 MB
pll_switch
鯯witch PLL clock:
MCU_CLK: 208MHz.
DSP_CLK: 104MHz.
UART1~3 are assigned to ARM9!
SIM1 has initialized as VSIM1=3.3V!
PLL TEST cnt= 2
Flash:  8 MB
In:    serial
Out:   serial
Err:   serial
boot_type_process: 1
The parameter "bootcmd" is synchronized.
bank: 1
Un-Protect Flash Bank # 1
bootcmd: nr 0x400000 0x46400000 0x33478; bootm 0x40000000
## Booting image at 40000000 ...
   Image Name:   Linux-2.6.29-00001-g8afb024-dirt
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1732552 Bytes =  1.7 MB
   Load Address: 40008000
   Entry Point:  40008000
   Verifying Checksum ... OK
OK
## Transferring control to Linux (at address 40008000) ...
Starting kernel ...
Error: unrecognized/unsupported machine ID (r1 = 0x0000047c).Available machine support:ID (hex)        NAME0000047d        iM9815 1226RC-1Please check your kernel config and/or bootloader.
               
               
               
               
               

本文來(lái)自ChinaUnix博客,如果查看原文請(qǐng)點(diǎn):http://blog.chinaunix.net/u1/43047/showart_2116835.html
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過(guò)ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP