📄 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.
//
//-----------------------------------------------------------------------------
//
// Copyright (C) 2004-2006, Freescale Semiconductor, Inc. All Rights Reserved.
// THIS SOURCE CODE, AND ITS USE AND DISTRIBUTION, IS SUBJECT TO THE TERMS
// AND CONDITIONS OF THE APPLICABLE LICENSE AGREEMENT
//
//-----------------------------------------------------------------------------
//
// 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 0
#define EBOOT_TOTAL_RAM_SIZE 0x100000 // see eboot.bib to compute size
#define EBOOT_FLASHBLOCK_CACHE_START ((UINT32) OALPAtoVA(IMAGE_BOOT_RAMDEV_RAM_PA_START, FALSE) + EBOOT_TOTAL_RAM_SIZE)
#define XLDR_NB0_FILE "xldr.nb0"
#define XLDR_NB0_FILE_LEN 8 // 8 chars in name
#define EBOOT_NB0_FILE "eboot.nb0"
#define EBOOT_NB0_FILE_LEN 9 // 9 chars in name
//------------------------------------------------------------------------------
// External functions
//
extern void SpinForever(void);
extern void OEMRepeatDebugByte(UINT8 ch, UINT32 repeatCnt);
extern DWORD OEMEthGetSecs(void);
extern UINT32 InitSpecifiedEthDevice(OAL_KITL_ARGS *pKITLArgs, UINT32 EthDevice);
//------------------------------------------------------------------------------
// Structure definitions.
//
// The BOOT_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 WORDS. Pad the structure if necessary.
// Add new members at the end. Also remember to increment the EBOOT version
// numbers.
#define EBOOT_CFG_MAGIC_NUMBER 0x01020304
#define EBOOT_CFG_AUTODOWNLOAD_NONE 0
#define EBOOT_CFG_AUTODOWNLOAD_NK_NOR 1
#define EBOOT_CFG_AUTODOWNLOAD_NK_NAND 2
#define EBOOT_CFG_AUTODOWNLOAD_IPL_NAND 3
typedef struct
{
DWORD autoDownloadImage;
DWORD IP;
DWORD subnetMask;
DWORD numBootMe;
DWORD delay;
DWORD DHCPEnable;
DWORD dwPhysStart;
DWORD dwPhysLen;
DWORD dwLaunchAddr;
DWORD dwDbgSerPhysAddr;
WORD mac[4];
DWORD ConfigMagicNumber;
DWORD dwBootDevice;
} EBOOT_CFG, *PEBOOT_CFG;
typedef struct
{
UINT32 recordOffset;
UINT8 *pReadBuffer;
UINT32 readSize;
} EBOOT_BINDIO_CONTEXT;
//------------------------------------------------------------------------------
// Enumerated type definitions.
//
typedef enum
{
ETH_DEVICE_CS8900A = 0,
} ETH_DEVICE_TYPE;
typedef enum
{
IMAGE_TYPE_NK,
IMAGE_TYPE_EBOOT,
IMAGE_TYPE_IPL,
IMAGE_TYPE_BINDIO,
IMAGE_TYPE_XLDR
} IMAGE_TYPE, *PIMAGE_TYPE;
typedef enum
{
IMAGE_MEMORY_RAM,
IMAGE_MEMORY_NAND,
IMAGE_MEMORY_NOR
} IMAGE_MEMORY, *PIMAGE_MEMORY;
#endif // _LOADER_H_.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -