Note: SourceDebugging by Intel in EDKII

EDKII provide a package for UEFI Open Source community, UDK(UEFI Development Kit) and Intel provide a Source level debugger library for target from UDK 2010 UP3, Host computer must have Intel UDK Debugger Tool and WinDbg to connect Target manchine.

The Debug abstract communicaiton interface is very simple. currently have been support Serial Port and USB debug cable

DebugPortInitialize (
  IN VOID                 *Context,
  IN DEBUG_PORT_CONTINUE  Function
  );

UINTN
EFIAPI
DebugPortReadBuffer (
  IN DEBUG_PORT_HANDLE     Handle,
  IN UINT8                 *Buffer,
  IN UINTN                 NumberOfBytes,
  IN UINTN                 Timeout
  );

UINTN
EFIAPI
DebugPortWriteBuffer (
  IN DEBUG_PORT_HANDLE     Handle,
  IN UINT8                 *Buffer,
  IN UINTN                 NumberOfBytes
  );

BOOLEAN
EFIAPI
DebugPortPollBuffer (
  IN DEBUG_PORT_HANDLE     Handle
  );

detail in .\SourceLevelDebugPkg\Include\Library\DebugCommunicationLib.h

Serial port transport(.\SourceLevelDebugPkg\Library\DebugCommunicationLibSerialPort\DebugCommunicationLibSerialPort.c), use MdePkg\Library to implement relationship function

USB Debug transport(.\SourceLevelDebugPkg\Library\DebugCommunicationLibUsb\DebugCommunicationLibUsb.c), use PCI lib to directly operation the EHCI debug port.

UDK with Source level debugging will use a DebugAgent/monitor(PEIM/DXE DRIVER) and CPU Debug Exception handler to send CPU register value to Host.

廣告

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

您的留言將使用 WordPress.com 帳號。 登出 / 變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 / 變更 )

Facebook照片

您的留言將使用 Facebook 帳號。 登出 / 變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 / 變更 )

連結到 %s

%d 位部落客按了讚: