eglobal.h
来自「WinCE 3.0 BSP, 包含Inter SA1110, Intel_815」· C头文件 代码 · 共 150 行
H
150 行
/*++
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, 1996, 1997, 1998 Microsoft Corporation
Module Name:
eglobal.h
Abstract:
This file contains the global structure stored inside flash.
This structure is used by dec21140.lib, boot loader and kernel.
Author:
stjong 08-18-1998
Revision History:
--*/
/////////////////////////////////////////////////////////////////////////////////
// Okay, here is the pain:
// EDBG_ADDR is defined in halether.h which can only be included in Kernel build.
// Our eglobal.h uses this type and we are not including halether.h in bootloader.
// So, Please define EDBG_ADDR before including eglobal.h
//
/*
typedef struct _EDBG_ADDR {
DWORD dwIP;
USHORT wMAC[3];
USHORT wPort;
} EDBG_ADDR;
*/
#include <flashres.h>
#ifndef __EGLOBAL_H_
#define __EGLOBAL_H_
/////////////////////////////////////////////////////////////////////////////////
// What get stored in flash.
// The information below lives in the flash memory.
// Bootloader will use it if DHCP server is down.
typedef struct _DEVICE_NETWORK_INFO
{
DWORD dwSignature; // Should contain 0x55aa55aa for valid entries.
DWORD dwIP; // Device IP address as assigned by DHCP.
DWORD dwSubnetMask;
DWORD dwMACSignature; // Indicator whether MAC address is valid.
USHORT wMAC[3]; // MAC Address assigned for this device...
USHORT Rsvd0; // For alignment.
DWORD dwLaunchAddr; // Image launch address.
}DEVICE_NETWORK_INFO, *PDEVICE_NETWORK_INFO;
#define VALID_INFO_SIGNATURE 0x55aa55aa
#define VALID_MAC_ADDRESS 0xbeefbeef
// Flash on ALTOONA is E28F016SA.
// 1Mbit x 16 with block size of 128K (20000h) [hence 32 blocks available]
// Bootloader will occupy the first 1 block (20000h), starting at 0xbfc00000
// Device network info will occupy the next 1 block (starting at 0xbfc20000).
// The rest (30 blocks or 0x3c0000 or 3932160 bytes are available for mini os).
#define DEVICE_NETWORK_INFO_LOCATION FLASH_RESIDENCE_NETWORK_INFO
/////////////////////////////////////////////////////////////////////////////////
// EtherGlobal initialized by puzzle bootloader or Mini OS
//
#define MAX_ETHER_GLOBAL_SIZE 0x100 /* 256 bytes for ether global */
/* i.e between kernel and bootloader */
#define ETHER_GLOBAL_ADDR (0x84000000 - MAX_ETHER_GLOBAL_SIZE)
#define pDriverGlobals ((PDBG_ETH_GLOBALS) ETHER_GLOBAL_ADDR)
#define PUZZLE_BOOT_MAGIC_NUM 0x45424F54 // "EBOT"
#define PAD(label,amt) UCHAR Pad##label[amt]
#define DEC21140_DEBUG 0x00 // 2 MSB used for indicator...[00]
#define NE2000_DEBUG 0x40 // 2 MSB used for indicator...[01]
#define AMD_DEBUG 0x80 // 2 MSB used for indicator...[10]
#define CLEAN_UP 0x3f // Clean up 2 MSB, to just extract the interrupt number...
#define MINI_OS_MAGIC_NO 0xBEEF0388 // Mini OS magic number inserted by minshell.exe if it gets to run.
#define PLATFORM_STRING "BOSTON"
/////////////////////////////////////////////////////////////////////////////////
// EtherGlobal structure
//
typedef struct _DBG_ETH_GLOBALS
{
/////////////////////////////////////////////////////////////////////////////
// This portion of structure is used by bootloader to tell the kernel's
// ether debug the ip and port addresses of services available on desktop.
// Bootloader obtains this from eshell.
// Hence to avoid kernel talking to eshell again in obtaining this info...
//
DWORD EbootMagicNum; // To detect if ether bootloader is present
UCHAR etherEnabled; // If non-zero, ethernet card present
UCHAR etherFlags; // Set by eboot loader. Controls which components are enabled over ether (see ethdbg.h)
USHORT EtherIoAddr; // PCI IO address for this card.
USHORT EtherIntrNumber; // Ether assigned interrupt number.
EDBG_ADDR PuzzleAddr; // IP and ether address of Puzzle
DWORD SubnetMask; // Subnet mask
EDBG_ADDR DownloadHostAddr; // IP and ether address of host who started us
EDBG_ADDR DbgHostAddr; // IP/ether addr and UDP port of host receiving dbg msgs
EDBG_ADDR KdbgHostAddr; // IP/ether addr and UDP port of host running kernel debugger
EDBG_ADDR PpshHostAddr; // IP/ether addr and UDP port of host running ether text shell
DWORD DHCPLeaseTime; // Length of DHCP IP lease in seconds
/////////////////////////////////////////////////////////////////////////////
// The following is structure used by mini os (minshell.exe) to tell boot
// loader that this reset is not meant to talk to eshell...
//
DWORD dwMiniOsMagicNum; // Initialized by MiniOS when it successfully receives valid nk.bin
DWORD dwStartAddress; // Physical Address of where mini os stored the nk.bin
/////////////////////////////////////////////////////////////////////////////
// The rest of this structure should make up 256 bytes allocated...
//
UCHAR fmtBuf[168]; // Tx Buffer for debug messages (ASCII)
} DBG_ETH_GLOBALS, *PDBG_ETH_GLOBALS;
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?