initedbg.c
来自「WinCE 3.0 BSP, 包含Inter SA1110, Intel_815」· C语言 代码 · 共 78 行
C
78 行
/*++
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
Copyright (c) 1995-2000 Microsoft Corporation. All rights reserved.
Module Name:
traninit.c
Abstract:
initialize debug transport for EDBG
Functions:
Notes:
--*/
/*****************************************************************************
*
* @doc EXTERNAL OEM
*
* @module debug.c | OEM Debug Serial Monitor Routines
*
******************************************************************************/
#include <windows.h>
#include <nkintr.h>
#include <armintboot.h>
extern DWORD EdbgDebugZone;
extern HARP_BOOT_ARGS *pBootArgs;
/* InitDebugEther
*
* Initialize debug Ether support for platform if requested (flag must be
* set in boot parameters area). Called from OEMInit().
*/
void
InitDebugEther()
{
// Check for magic number to make sure parameter area is valid.
OEMWriteDebugString(TEXT("Using Debug Ethernet card\n"));
// Read debug zone mask from boot args
if ( pBootArgs->dwEdbgDebugZone )
EdbgDebugZone = pBootArgs->dwEdbgDebugZone;
// EdbgInit() will call our OEMEthInit routine to initialize debug Ether HW.
if ( EdbgInit() ) {
// Attempt to configure debug services over ethernet. SetKernelCommDev will block
// (calling EdbgRegisterDfltClient) until the desktop application is started, and
// will set up the necessary kernel hooks to route data to the peer.
if ( (pBootArgs->ucEshellFlags & EDBG_FL_DBGMSG) &&
SetKernelCommDev(KERNEL_SVC_DBGMSG,KERNEL_COMM_ETHER) ) {
EdbgOutputDebugString("Switched to ethernet for debug messages, host: %s, port: %d\r\n",
inet_ntoa(pBootArgs->DbgHostAddr.dwIP),
ntohs(pBootArgs->DbgHostAddr.wPort));
}
if ( (pBootArgs->ucEshellFlags & EDBG_FL_PPSH) &&
SetKernelCommDev(KERNEL_SVC_PPSH,KERNEL_COMM_ETHER) ) {
EdbgOutputDebugString("Switched to ethernet for PPSH, host: %s, port: %d\r\n",
inet_ntoa(pBootArgs->CeshHostAddr.dwIP),
ntohs(pBootArgs->CeshHostAddr.wPort));
}
if ( (pBootArgs->ucEshellFlags & EDBG_FL_KDBG) &&
SetKernelCommDev(KERNEL_SVC_KDBG,KERNEL_COMM_ETHER) ) {
EdbgOutputDebugString("Switched to ethernet for KDBG, host: %s, port: %d\r\n",
inet_ntoa(pBootArgs->KdbgHostAddr.dwIP),
ntohs(pBootArgs->KdbgHostAddr.wPort));
}
} else
OEMWriteDebugString(TEXT("EdbgInit failed, not using debug Ethernet services\r\n"));
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?