📄 eboot.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.
//
//------------------------------------------------------------------------------
//
// Header: eboot.h
//
// This header file is comprised of component header files that defines
// the standard include hierarchy for the bootloader. It also defines few
// trivial constant.
//
#ifndef __EBOOT_H
#define __EBOOT_H
//------------------------------------------------------------------------------
#include <windows.h>
#include <ceddk.h>
#include <blcommon.h>
#include <nkintr.h>
#include <halether.h>
#include <fmd.h>
#include <bootpart.h>
#include <oal.h>
#include <oal_blmenu.h>
#include <omap2420.h>
#include <bsp_base_regs.h>
#include <bsp_cfg.h>
#include <boot_args.h>
#include <args.h>
#include <image_cfg.h>
//------------------------------------------------------------------------------
#define EBOOT_VERSION_MAJOR 1
#define EBOOT_VERSION_MINOR 0
#define TIMEOUT_RECV 3 // seconds serial timeout
//------------------------------------------------------------------------------
typedef struct {
UINT32 start;
UINT32 length;
UINT32 base;
} REGION_INFO_EX;
//------------------------------------------------------------------------------
#define DOWNLOAD_TYPE_UNKNOWN 0
#define DOWNLOAD_TYPE_RAM 1
#define DOWNLOAD_TYPE_BINDIO 2
#define DOWNLOAD_TYPE_XLDR 3
#define DOWNLOAD_TYPE_EBOOT 4
#define DOWNLOAD_TYPE_IPL 5
#define DOWNLOAD_TYPE_FLASHRAM 6
//------------------------------------------------------------------------------
typedef struct {
OAL_KITL_TYPE bootDeviceType;
UINT32 type;
UINT32 numRegions;
UINT32 launchAddress;
REGION_INFO_EX region[BL_MAX_BIN_REGIONS];
UINT32 recordOffset;
UINT8 *pReadBuffer;
UINT32 readSize;
} EBOOT_CONTEXT;
//------------------------------------------------------------------------------
extern BOOT_CFG g_bootCfg;
extern UINT16 g_mac[3];
extern EBOOT_CONTEXT g_eboot;
extern OAL_KITL_DEVICE g_bootDevices[];
extern OAL_KITL_DEVICE g_kitlDevices[];
//------------------------------------------------------------------------------
VOID OEMMultiBinNotify(MultiBINInfo *pInfo);
BOOL OEMVerifyMemory(DWORD dwStartAddr, DWORD dwLength);
//------------------------------------------------------------------------------
VOID BLMenu();
BOOL BLReadBootCfg(BOOT_CFG *pBootCfg);
BOOL BLWriteBootCfg(BOOT_CFG *pBootCfg);
BOOL BLReadMAC(BOOT_CFG *pConfig, UINT16 *pMAC);
BOOL BLWriteMAC(BOOT_CFG *pConfig, UINT16 MAC[3]);
UINT32 BLEthDownload(BOOT_CFG *pBootCfg, OAL_KITL_DEVICE *pBootDevices, UINT16 *pMac);
UINT32 BLSerDownload(BOOT_CFG *pConfig, OAL_KITL_DEVICE *pBootDevices);
VOID BLEthConfig(BSP_ARGS *pArgs);
UINT32 BLFlashDownload(BOOT_CFG *pConfig, OAL_KITL_DEVICE *pBootDevices);
VOID* BLVAtoPA(UINT32 address);
//------------------------------------------------------------------------------
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -