DM9000连接在bank4;CMD连接在ADD2脚
bank4物理地址与虚拟地址对应关系:
DCD 0x88000000, 0x20000000, 32 ; 32 MB SROM(SRAM/ROM) BANK 4
#define DM9000DBG_IOBASE (0xXXXXXXXX)
#define DM9000DBG_MEMBASE (0xXXXXXXXX)复制内容到剪贴板
代码:
相关代码:
BOOL InitEthDevice(PBOOT_CFG pBootCfg)
{
USHORT wMAC[3];
PBYTE pBaseIOAddress = NULL;
DWORD dwMultiplier = 0;
// Boot CS8900.
//
if (!pBaseIOAddress)
{
// Use the MAC address programmed into flash by the user.
//
memcpy(wMAC, pBootCfg->EdbgAddr.wMAC, 6);
pfnEDbgInit = DM9000DBG_Init;
pfnEDbgGetFrame = DM9000DBG_GetFrame;
pfnEDbgSendFrame = DM9000DBG_SendFrame;
pBaseIOAddress = (PBYTE)DM9000DBG_IOBASE;
dwMultiplier = DM9000DBG_MEMBASE;
memcpy(pDriverGlobals->eth.TargetAddr.wMAC, pBootCfg->EdbgAddr.wMAC, 6);
pDriverGlobals->misc.EbootDevice = (UCHAR)DOWNLOAD_DEVICE_CS8900;
}
// Initialize the built-in Ethenet controller.
//
if (!pfnEDbgInit((PBYTE)pBaseIOAddress, dwMultiplier, wMAC))
{
EdbgOutputDebugString(\"ERROR: InitEthDevice: Failed to initialize Ethernet controller.\r\n\");
return(FALSE);
}
。。。。。。
}DM9000DBG_IOBASE应该为多少呢??
0x88000000?0x88000300还是89000300???
DM9000DBG_MEMBASE是做什么的??大小为0x88000000???
哪位大侠,能否讲解下??