UEFI Software Remote Debuggers Basics

UEFI BIOS Debugging - The problesm and soluations

 

UEFI Debugging - PROBLEMS

 

The current popular method to debug the x86 system firmware is to use the hardware emulator. There are only one hardware emulator can used for this purpose. Of crouse it is ECM-XDP from American Arium. Intel uses their own simulator called ITP but never sold.

 

But XDP is really very expensive. It costs about 1W USD to for each. It's hard imagine that one comany can buy XDP for each engineers. So we have to find another ways to debug our low-level software.

 

YES, the soluations to this problems is to use software debuggers.

 

Basic Requirements for UEFI software debuggers:

 

- MUST support debug the UEFI system firmware

- Function at both PEI and DXE phrase. 

- C Source level debugging support

- Load debuge modules through the remote connections

- Code Step Into/Over//Trace support

- Memory view/modify

- PCI/PCI-E configuration space access

- Target run Control

- Other useful functions

 

HOW TO IMPLEMENT?

 

The architecture for a remote debugger is hard to describe. Most of the programmers don't write a debugger in his/her life. Implementing a debugger needs some special technologies. For a remote debugger there are two components existed in the system. One is host, which executed in the OS and provide the UI of debugger. The other is debug agent, which intergrate into system firmware. The host gets the user input and send it to agent. The agent performs the operations directly and then send the result to host.

 

PROTOCOLS

 

The UEFI Specification defines two protocols and one table can be used to build a software debugger.  They are:

 

EFI Debug Port Protocol

 

Provide the communication wapper for generic use. A debug agent can use this protocol to communicate with host. There is one and only one driver that produces this protocol allowed at runtime.

 

EFI Debug Support Protocol

 

This protocol is produced by a CPU specific driver. It based on the CPU's interrupt mechanism. It allows users to register some handlers what would execute on some conditions.

 

EFI Debug Table

 

This table is used to to secrach the modules that already loaded and called by the dispatcher. 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值