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

📄 loader.h

📁 老外的一个开源项目
💻 H
字号:
// Copyright (c) David Vescovi.  All rights reserved.
// Part of Project DrumStix
// Windows Embedded Developers Interest Group (WE-DIG) community project.
// http://www.we-dig.org
// Copyright (c) Microsoft Corporation.  All rights reserved.
//------------------------------------------------------------------------------
//
//  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             4
#define EBOOT_VERSION_MINOR             1

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

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

#define EBOOT_FLASH_BUFFER_START		(IMAGE_NK_CA_START)

#define IMAGEFLASH_LOADER_BLOCKOFFSET	0
#define IMAGEFLASH_NK_BLOCKOFFSET		3
#define IMAGEFLASH_NK_OFFSET			0x00060000
#define IMAGEFLASH_NK_START				(IMAGE_BOOT_BLDRIMAGE_FLASH_PA_START + IMAGEFLASH_NK_OFFSET)

//------------------------------------------------------------------------------
// Enumerated type definitions. 
//
typedef enum
{
    BOOT_DEVICE_CF = 0,
    BOOT_DEVICE_ETH1,
    BOOT_DEVICE_ETH2,
    BOOT_DEVICE_STUART,
    BOOT_DEVICE_FFUART,
    BOOT_DEVICE_HWUART,
    BOOT_DEVICE_BTUART,
    MAX_BOOT_DEVICE
} BOOT_DEVICE_TYPE;

typedef enum
{
	IMG_LOAD_DOWNLOAD = 0,
    IMG_LOAD_FLASH,
    IMG_LOAD_MMC,
    IMG_LOAD_CF,
	MAX_IMG_LOAD
} IMG_LOAD_TYPE;

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

//------------------------------------------------------------------------------
// 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 dwPlatformHardware;
	DWORD imageLoadDevice;
    DWORD IP;
    DWORD subnetMask;
	UINT16 Eth1mac[3];
	UINT16 Eth2mac[3];
    DWORD numBootMe;
    DWORD delay;
	DWORD Extra0;
	DWORD Extra1;
	DWORD Extra2;
	DWORD Extra3;
    DWORD DHCPEnable;
    DWORD priBootDevice;
    DWORD secBootDevice;
    DWORD downloadBaud;
    DWORD Extra5;
    DWORD Extra6;
    DWORD dwDbgSerPhysAddr;
    DWORD ConfigMagicNumber;
    DWORD Extra7;
    DWORD CheckSignatures;
} EBOOT_CFG, *PEBOOT_CFG;

//------------------------------------------------------------------------------
// External functions
//
extern UINT32 InitSpecifiedEthDevice(OAL_KITL_ARGS *pKITLArgs, UINT32 EthDevice, EBOOT_CFG *pEbootCfg);
extern BOOL InitSpecifiedImgBootDevice(UINT32 ImgBootDevice, UINT32 dwPlatformHardware);

//------------------------------------------------------------------------------

#endif  // _LOADER_H_.

⌨️ 快捷键说明

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