⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 loader.h

📁 Windows CE 6.0 BSP for VOIPAC Board (PXA270) Version 2b.
💻 H
字号:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES.
//
//------------------------------------------------------------------------------
//
//  File: loader.h
//
//  This file contains definitions specific to the bootloader.
//
#ifndef _LOADER_H_
#define _LOADER_H_

#include <blcommon.h>
#include <halether.h>
#include <image_cfg.h>
#include <oal_kitl.h>
#include <dbgserial.h>

//------------------------------------------------------------------------------
// Defines
//
#define EBOOT_VERSION_MAJOR             1
#define EBOOT_VERSION_MINOR             22

#define EBOOT_FLASH_CFG_START           ((UINT32) OALPAtoVA(MAINSTONEII_BASE_PA_BOOT_FLASH, FALSE) + IMAGE_BOOT_CONFIG_FLASH_OFFSET)

//#define EBOOT_FLASHBLOCK_CACHE_START    ((UINT32) OALPAtoVA(MAINSTONEII_BASE_PA_SDRAM, FALSE) + IMAGE_BOOT_DOWNLOADCACHE_RAM_OFFSET)
//#define EBOOT_FLASHBLOCK_CACHE_SIZE     IMAGE_BOOT_DOWNLOADCACHE_RAM_SIZE

//------------------------------------------------------------------------------
// External functions
//
extern void SpinForever(void);

extern BOOL FlashInit(UINT32 FlashStart, UINT32 FlashLength);
extern BOOL FlashRead(UINT32 StartAddr, UINT8 *pDataBuffer, UINT32 BufferLen);
extern BOOL FlashWrite(UINT32 FlashStart, UINT8 *pDataBuffer, UINT32 DataLength);

extern DWORD OEMKitlGetSecs(void);

extern UINT32 InitSpecifiedEthDevice(OAL_KITL_ARGS *pKITLArgs, UINT32 EthDevice);

//------------------------------------------------------------------------------
// Structure definitions. 
//
// The EBOOT_CFG structure holds a variety of configuration parameters.
// When adding new parameters, make sure that the size of the structure in bytes is 
// an integral number of DWORDS.  Pad the structure if necessary.
#define EBOOT_CFG_MAGIC_NUMBER                0x01020304
typedef struct
{
    DWORD autoDownloadImage;
    DWORD IP;
    DWORD subnetMask;
    DWORD numBootMe;
    DWORD delay;
    DWORD DHCPEnable;
    DWORD bootDeviceOrder;
    DWORD dwPhysStart;
    DWORD dwPhysLen;
    DWORD dwLaunchAddr;
    DWORD dwDbgSerPhysAddr;
    DWORD XmodemDefault;
    DWORD ConfigMagicNumber;
    DWORD dwStoreAddr;
    UINT16 RNDISMac[3];
    DWORD CheckSignatures;
} EBOOT_CFG, *PEBOOT_CFG;

//------------------------------------------------------------------------------
// Enumerated type definitions. 
//
typedef enum
{
    ETH_DEVICE_PCMCIA0 = 0,
    ETH_DEVICE_PCMCIA1,
    ETH_DEVICE_DM9000,
    ETH_DEVICE_USB,
    SER_DEVICE_USB
} BOOT_DEVICE_TYPE;

typedef enum
{
    IMAGE_TYPE_RAMIMAGE,
    IMAGE_TYPE_FLASHIMAGE,
    IMAGE_TYPE_BOOTLOADER
} IMAGE_TYPE, *PIMAGE_TYPE;
//------------------------------------------------------------------------------

#endif  // _LOADER_H_.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -