📄 loader.h
字号:
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
//------------------------------------------------------------------------------
//
// 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>
//------------------------------------------------------------------------------
// Defines
//
#define EBOOT_VERSION_MAJOR 1
#define EBOOT_VERSION_MINOR 7
#define EBOOT_FLASH_CFG_START ((UINT32) OALPAtoVA(XSBASE270_G_BASE_PA_BOOT_FLASH, FALSE) + IMAGE_BOOT_CONFIG_FLASH_OFFSET)
#define EBOOT_FLASHBLOCK_CACHE_START ((UINT32) OALPAtoVA(XSBASE270_G_BASE_PA_SDRAM, FALSE) + IMAGE_BOOT_DOWNLOADCACHE_RAM_OFFSET)
#define EBOOT_FLASHBLOCK_CACHE_SIZE IMAGE_BOOT_DOWNLOADCACHE_RAM_SIZE
#define CACHED_TO_UNCACHED_OFFSET 0x20000000
//------------------------------------------------------------------------------
// External functions
//
extern void InitDebugSerial(UINT32 DbgSerPhysAddr);
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 OEMEthGetSecs(void);
extern UINT32 InitSpecifiedEthDevice(OAL_KITL_ARGS *pKITLArgs, UINT32 EthDevice);
extern UINT32 setMAC_Address(OAL_KITL_ARGS *pKITLArgs);
//------------------------------------------------------------------------------
// 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 ConfigMagicNumber;
DWORD dwStoreAddr;
DWORD CheckSignatures;
} EBOOT_CFG, *PEBOOT_CFG;
//------------------------------------------------------------------------------
// Enumerated type definitions.
//
typedef enum
{
ETH_DEVICE_PCMCIA0 = 0,
ETH_DEVICE_SMSC
} ETH_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 + -