TWI414936B - 電腦系統之除錯方法 - Google Patents

電腦系統之除錯方法 Download PDF

Info

Publication number
TWI414936B
TWI414936B TW099118226A TW99118226A TWI414936B TW I414936 B TWI414936 B TW I414936B TW 099118226 A TW099118226 A TW 099118226A TW 99118226 A TW99118226 A TW 99118226A TW I414936 B TWI414936 B TW I414936B
Authority
TW
Taiwan
Prior art keywords
debug
debug data
controller
memory block
debugging
Prior art date
Application number
TW099118226A
Other languages
English (en)
Other versions
TW201145014A (en
Inventor
Chun Jie Yu
Chun Yi Lu
Yu Huei Chen
Chih Hung Kuo
Original Assignee
Quanta Comp Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Quanta Comp Inc filed Critical Quanta Comp Inc
Priority to TW099118226A priority Critical patent/TWI414936B/zh
Priority to US12/950,005 priority patent/US8423830B2/en
Publication of TW201145014A publication Critical patent/TW201145014A/zh
Application granted granted Critical
Publication of TWI414936B publication Critical patent/TWI414936B/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • G06F11/0787Storage of error reports, e.g. persistent data storage, storage using memory protection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3636Software debugging by tracing the execution of the program
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3648Software debugging using additional hardware

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Description

電腦系統之除錯方法
本發明是有關於一種電腦系統之除錯方法,且特別是有關於一種不需使用除錯卡之電腦系統之除錯方法。
在電腦開機程序中,係由中央處理器先讀取基本輸入輸出系統(Basic Input/Output System,BIOS)以執行電腦周邊硬體(如硬碟、光碟機等)的初始設定和測試,而在確認電腦周邊硬體元件均正常運作之後,接著電腦的中央處理器就會開始讀取儲存於硬碟中的開機作業系統資料,藉以載入電腦中各個軟硬體元件的控制與運算。然而,若是在上述的開機程序中有出現硬體設定異常或是軟體運算錯誤等問題,則會使電腦無法順利地啟動,甚至會產生當機的現象,此時,就需要使用除錯卡來進行電腦運作檢測,以輔助使用者順利地找出問題所在,進而排除開機錯誤。
一般常見的除錯卡係利用單個或多個以上的七段顯示器(7-segment display),藉以顯示電腦開機時所傳來的除錯資料。請參閱第1圖,第1圖繪示係為傳統電腦藉由除錯卡進行除錯之示意圖。傳統電腦1包括中央處理器12及主機板11。中央處理器12係安裝於主機板11上,而除錯卡13係藉由安裝於主機板11上與中央處理器12耦接。
除錯卡13包括匯流排傳輸介面132、微處理晶片134及七段顯示器136,且微處理晶片134係電連接於匯流排傳輸介面132及七段顯示器136。微處理晶片134係用來經由匯流排傳輸介面132讀取中央處理器12執行基本輸入輸出系統時所傳來之除錯資料,如開機自我測試(Power On Self Test,POST)碼。微處理晶片134並控制七段顯示器136顯示除錯資料,以作為開機程序除錯之用。
然而,此種作法不僅需額外購置除錯卡,且必須先打開電腦機殼才能安裝除錯卡。倘若有多台電腦需進行開機程序除錯,則必須於各電腦反覆地插入及移除除錯卡以進行開機,不僅耗時費力且相當不便
本發明係有關於一種電腦系統之除錯方法,不僅不需要額外購置除錯卡且不需打開電腦機殼安裝除錯卡,大幅地提高使用上的便利性。
根據本發明之一方面,提出一種電腦系統之除錯方法。電腦系統之除錯方法包括:遞增第一索引值;藉由控制器之除錯埠(Debug Port)接收第1筆除錯資料至第j筆除錯資料;根據控制器之第二索引值將第1筆除錯資料至第j筆除錯資料依序儲存至控制器之儲存單元之第一記憶區塊;於控制器之工作電源移除前,根據遞增後之第一索引值將第i+1筆除錯資料至第j筆除錯資料由第一記憶區塊複製至儲存單元之第二記憶區塊;以及執行應用程式,並根據第一索引值讀取第二記憶區塊;其中,i及j係為整數。
為讓本發明之上述內容能更明顯易懂,下文特舉一較佳實施例,並配合所附圖式,作詳細說明如下:
為了改善傳統開機程序除錯必需使用除錯卡之不便,下述實施例揭露一種電腦系統之除錯方法,且包括如下步驟:遞增第一索引值;藉由控制器之除錯埠(Debug Port)接收第1筆除錯資料至第j筆除錯資料;根據控制器之第二索引值將第1筆除錯資料至第j筆除錯資料依序儲存至控制器之儲存單元之第一記憶區塊;於控制器之工作電源移除前,根據遞增後之第一索引值將第i+1筆除錯資料至第j筆除錯資料由第一記憶區塊複製至儲存單元之第二記憶區塊;以及執行應用程式,並根據第一索引值讀取第二記憶區塊;其中,i及j係為整數。
請同時參照第2圖及第3圖,第2圖繪示係為一種電腦系統之方塊圖,第3圖繪示係為一種電腦系統之除錯方法之流程圖。電腦系統2例如為筆記型電腦或桌上型電腦,且電腦系統2包括中央處理器21及控制器22。控制器22例如為嵌入式控制器(Embedded Controller,EC)或鍵盤控制器(Keyboard Controller,KBC),且控制器22包括除錯埠(Debug Port)222及儲存單元224。除錯埠222例如為輸入輸出埠80h(I/O port 80h),且除錯埠222用以接收中央處理器21執行基本輸入輸出系統(Basic Input/Output System)後所輸出之第1筆除錯資料至第j筆除錯資料。第1筆除錯資料至第j筆除錯資料例如為除錯碼(Debug Code)或稱為開機自我測試(Power On Self Test,POST)碼。
儲存單元224例如為嵌入式控制器(Embedded Controller,EC)隨機存取記憶體(Random Access Memory,RAM)或即時時鐘(Real Time Clock,RTC)隨機存取記憶體(Random Access Memory,RAM)。儲存單元224包括第一記憶區塊224a及第二記憶區塊224b。第一記憶區塊224a儲存第二索引值Index Y及除錯埠222所接收之第1筆除錯資料至第j筆除錯資料,而第二記憶區塊224b儲存第一索引值Index X及由第一記憶區塊224a複製的第i++1筆除錯資料至第j筆除錯資料。其中,X例如係由0至M,而i及j係整數。前述i例如係等於0或大於0。換言之,第二記憶區塊224b可以複製第一記憶區塊224a中的所有除錯資料或是最後幾筆除錯資料。
電腦系統1之除錯方法包括如下步驟:首先如步驟310所示,控制器22於電源啟動時遞增第一索引值Index X。舉例來說,第一索引值Index X由Index 0遞增為Index 1。接著如步驟320,中央處理器21執行基本輸入輸出系統(Basic Input/Output System),以產生第1筆除錯資料至第j筆除錯資料。接著如步驟330所示,藉由控制器22之除錯埠接收第1筆除錯資料至第j筆除錯資料。然後如步驟340所示,根據控制器22之第二索引值Index Y將第1筆除錯資料至第j筆除錯資料依序儲存至控制器22之儲存單元224之第一記憶區塊224a。
若電腦系統2於開機過程中發生當機情況,使用者會按下電源鍵強制關機。若電源鍵被按下後將如步驟350所示,於控制器22之工作電源移除前,根據遞增後之第一索引值index X將第i+1筆除錯資料至第j筆除錯資料由第一記憶區塊224a複製至儲存單元224之第二記憶區塊224b。之後,當使用者欲查看除錯資料時,則可如步驟360所示,中央處理器21執行應用程式,並根據第一索引值Index X讀取第二記憶區塊224b。前述應用程式例如係儲存於可攜式儲存裝置,如通用序列匯流排(Universal Serial Bus,USB)隨身碟,以方便使用者隨身攜帶。
前述電腦系統2之除錯方法不僅不需要額外購置除錯卡且不需打開電腦機殼安裝除錯卡,大幅地提高使用上的便利性。除此之外,由於每次電源啟動時控制器22都會遞增第一索引值Index X,因此第二記憶區塊224b可以保留先前發生多次當機所產生的除錯資料。如此一來,程式設計者可以徹底地根據先前多次當機所產生的除錯資料進行較完整徹底的除錯工作。
綜上所述,雖然本發明已以一較佳實施例揭露如上,然其並非用以限定本發明。本發明所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作各種之更動與潤飾。因此,本發明之保護範圍當視後附之申請專利範圍所界定者為準。
1...傳統電腦
2...依照本發明實施例之電腦系統
11...中央處理器
12...主機板
13...除錯卡
21...中央處理器
22...控制器
132...匯流排傳輸介面
134...微處理晶片
136...七段顯示器
222...除錯埠
224...儲存單元
224a...第一記憶區塊
224b...第二記憶區塊
310、320、330、340、350、360...步驟
Index X、Index 1~M...第一索引值
Index Y...第二索引值
第1圖繪示係為傳統電腦藉由除錯卡進行除錯之示意圖。
第2圖繪示係為一種電腦系統之方塊圖。
第3圖繪示係為一種電腦系統之除錯方法之流程圖。
310、320、330、340、350、360...步驟

Claims (7)

  1. 一種電腦系統之除錯方法,包括:遞增一第一索引值;藉由一控制器之一除錯埠(Debug Port)接收一第1筆除錯資料至一第j筆除錯資料;根據該控制器之一第二索引值將該第1筆除錯資料至該第j筆除錯資料依序儲存至該控制器之一儲存單元之一第一記憶區塊;於該控制器之工作電源移除前,根據遞增後之該第一索引值將一第i+1筆除錯資料至該第j筆除錯資料由該第一記憶區塊複製至該儲存單元之一第二記憶區塊;以及執行一應用程式,並根據該第一索引值讀取該第二記憶區塊;其中,i及j係為整數。
  2. 如申請專利範圍第1項所述之除錯方法,其中i等於0。
  3. 如申請專利範圍第1項所述之除錯方法,其中i大於0。
  4. 如申請專利範圍第1項所述之除錯方法,更包括:執行一基本輸入輸出系統,以產生該第1筆除錯資料至該第j筆除錯資料。
  5. 如申請專利範圍第1項所述之除錯方法,其中該控制器係為嵌入式控制器(Embedded Controller,EC)。
  6. 如申請專利範圍第1項所述之除錯方法,其中該控制器係為鍵盤控制器(Keyboard Controller,KBC)。
  7. 如申請專利範圍第1項所述之除錯方法,其中該應用程式係儲存於一可攜式儲存裝置。
TW099118226A 2010-06-04 2010-06-04 電腦系統之除錯方法 TWI414936B (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
TW099118226A TWI414936B (zh) 2010-06-04 2010-06-04 電腦系統之除錯方法
US12/950,005 US8423830B2 (en) 2010-06-04 2010-11-19 Debug method for computer system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW099118226A TWI414936B (zh) 2010-06-04 2010-06-04 電腦系統之除錯方法

Publications (2)

Publication Number Publication Date
TW201145014A TW201145014A (en) 2011-12-16
TWI414936B true TWI414936B (zh) 2013-11-11

Family

ID=45065425

Family Applications (1)

Application Number Title Priority Date Filing Date
TW099118226A TWI414936B (zh) 2010-06-04 2010-06-04 電腦系統之除錯方法

Country Status (2)

Country Link
US (1) US8423830B2 (zh)
TW (1) TWI414936B (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102415218B1 (ko) * 2017-11-24 2022-07-01 에스케이하이닉스 주식회사 메모리 시스템 및 이의 동작 방법
TWI726616B (zh) * 2020-02-13 2021-05-01 神雲科技股份有限公司 儲存基本輸入輸出系統之除錯訊息的方法
KR20230007041A (ko) * 2021-07-05 2023-01-12 삼성전자주식회사 스토리지 장치의 디버깅 로그 관리 방법

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030061020A1 (en) * 2001-09-21 2003-03-27 Sam Michael Test and debug processor and method

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5488688A (en) * 1994-03-30 1996-01-30 Motorola, Inc. Data processor with real-time diagnostic capability
US6345383B1 (en) * 1994-09-14 2002-02-05 Kabushiki Kaisha Toshiba Debugging support device and debugging support method
TW571240B (en) * 2002-07-10 2004-01-11 Akom Technology Inc Display method for debugging code of BISO
TWI220471B (en) * 2003-02-20 2004-08-21 Akom Technology Corp Method, controller and apparatus for displaying BIOS debug message
US7269768B2 (en) * 2004-03-18 2007-09-11 Intel Corporation Method and system to provide debugging of a computer system from firmware
JP2005284557A (ja) * 2004-03-29 2005-10-13 Fujitsu Ltd 内部メモリをモニタ可能なマイクロコンピュータ
TW200722990A (en) 2005-12-14 2007-06-16 Inventec Corp Power-on self test debugging system and method
CN100458692C (zh) 2005-12-15 2009-02-04 英业达股份有限公司 开机自我测试除错系统及方法
US7543185B2 (en) * 2006-06-23 2009-06-02 Intel Corporation Debug system with event-based virtual processing agents
JP5022110B2 (ja) * 2007-06-05 2012-09-12 ルネサスエレクトロニクス株式会社 半導体集積回路
US8276043B2 (en) * 2008-03-01 2012-09-25 Kabushiki Kaisha Toshiba Memory system
JP4439569B2 (ja) * 2008-04-24 2010-03-24 株式会社東芝 メモリシステム
TWI399647B (zh) * 2009-10-15 2013-06-21 Wistron Corp 回復電腦系統之基本輸出入系統之方法及相關電腦系統
TW201145016A (en) * 2010-06-15 2011-12-16 Nat Univ Chung Cheng Non-intrusive debugging framework for parallel software based on super multi-core framework

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030061020A1 (en) * 2001-09-21 2003-03-27 Sam Michael Test and debug processor and method

Also Published As

Publication number Publication date
US8423830B2 (en) 2013-04-16
TW201145014A (en) 2011-12-16
US20110302453A1 (en) 2011-12-08

Similar Documents

Publication Publication Date Title
JP5363187B2 (ja) コンピュータ・システム、コンピュータ・システムを初期化するための方法及びコンピュータ・プログラム
TWI599877B (zh) 作業系統發生核心崩潰情況下讀取完整核心日誌之方法
US6119248A (en) Operating system notification of correctable error in computer information
US10642678B1 (en) PCI/PCIe-non-compliance-vulnerability detection apparatus and method
TWI546660B (zh) 除錯系統與方法
TWI414936B (zh) 電腦系統之除錯方法
US9348603B2 (en) Electronic apparatus and booting method
US7849300B2 (en) Method for changing booting sources of a computer system and a related backup/restore method thereof
TW200415461A (en) Program debugging method
TW521212B (en) Updating program code method for embedded type micro control unit
WO2020113469A1 (zh) 开机检测方法、开机检测装置及移动终端
CN102298544A (zh) 计算机系统的除错方法
CN110321171B (zh) 开机检测装置、系统及其方法
TWI324727B (en) Method for diagnosing power management table
CN100416502C (zh) 启动计算机系统的方法
US20100205598A1 (en) Method for installing operating system in computer
TWI779630B (zh) 儲存除錯資訊的系統及方法
TW200823655A (en) System and method for setting testing procedures of motherboards
TW501006B (en) Information processing system with power-on debugging function and the power-on debugging method
CN113986721A (zh) Ssd fnv功能恢复写性能的测试方法、装置、计算机设备及存储介质
TWI334980B (zh)
TW202238366A (zh) 用以記錄電腦系統的硬體元件狀態的儲存裝置及其電腦實施方法
CN111176735A (zh) 一种心电图机启动加速方法
Chang et al. Design of Digital Video Recorder Based on TMS320DM642
TW200420895A (en) System on chip with an in-circuit emulator function

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees