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

📄 loader.h

📁 Freescale ARM9系列CPU MX27的WINCE 5.0下的BSP
💻 H
字号:
//
// Copyright (C) 2004,    Motorola Inc. All Rights Reserved
//
//-----------------------------------------------------------------------------
//
// 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
//
//-----------------------------------------------------------------------------
//
// Header: loader.h
//
// Provides Definitions for EBOOT.
//
//------------------------------------------------------------------------------
#ifndef __LOADER_H__
#define __LOADER_H__

#ifdef __cplusplus
extern "C" {
#endif

#include <halether.h>
#include "bsp.h"

//------------------------------------------------------------------------------
// Defines
// Revision information displayed on debug serial output
#define EBOOT_VERSION_MAJOR         0
#define EBOOT_VERSION_MINOR         1

// Magic number
// If stored magic number is different from this, configuration will be
// restored to default.
#define EbootCFGMagicNumber         (EBOOT_VERSION_MAJOR << 8 | EBOOT_VERSION_MINOR)

// Platform String
#define PLATFORM_STRING             "MX27"
#define EDBG_CPUID                  EDBG_CPU_ARM720

#define DELETE_CHAR \
    do { \
        OEMWriteDebugByte(0x08); \
        OEMWriteDebugByte(0xFF); \
        OEMWriteDebugByte(0x08); \
    } while (0)

// Flash and Ram addres defines
#define FLASH_CVBASE                IMAGE_BOOT_BLDRIMAGE_NOR_CA_START
#define RAM_CVBASE                  IMAGE_BOOT_RAM_CA_START

// Execution offset from sdram base address
#define EBOOT_IMAGE_SIZE            IMAGE_BOOT_BLDRIMAGE_RAM_SIZE
#define EBOOT_RAM_IMAGE_OFFSET      IMAGE_BOOT_BLDRIMAGE_RAM_OFFSET
#define EBOOT_RAM_IMAGE_START       (RAM_CVBASE + EBOOT_RAM_IMAGE_OFFSET)
#define EBOOT_FLASH_IMAGE_START     FLASH_CVBASE

// OS image defines
#define OS_FLASH_IMAGE_START        (EBOOT_FLASH_IMAGE_START + EBOOT_IMAGE_SIZE)
#define OS_RAM_IMAGE_START          IMAGE_WINCE_NK_RAM_CA_START

// Temporary storage for image to be flashed
#define EBOOT_FCACHE_OFFSET         (IMAGE_SHARE_FRAMEBUFFER_RAM_OFFSET + IMAGE_SHARE_FRAMEBUFFER_RAM_SIZE)
#define EBOOT_FCACHE_START          (RAM_CVBASE + EBOOT_FCACHE_OFFSET)

// NAND Loader defines
#define NAND_BOOT_SUPPORT           1
#define EBOOT_NANDLOADER_VER_MIN    0x0000
#define EBOOT_NANDLOADER_VER_MAJ    0x0001
#define EBOOT_NANDLOADER_SIG        0x4E414E44  // NAND

//------------------------------------------------------------------------------
// Types
typedef struct {
    DWORD ConfigMagicNumber;
    DWORD dwLaunchAddr;
    DWORD dwRegionStart;
    DWORD dwRegionLength;
    DWORD dwImageOffset;
    DWORD dwChainStart;
    DWORD dwChainLength;
    DWORD dwChainOffset;
} EBOOT_NANDCFG;
 
//------------------------------------------------------------------------------
// Functions
Launch(DWORD dwLaunchAddr);

// Ethernet support functions
void InitEthDevice(void);
BOOL OEMEthHardwareInit(EDBG_ADDR *pMyAddr);

// Nand boot support functions
BOOL InitPartitionMgr(void);
void DeinitPartitionMgr(void);
BOOL WriteRegionsToNand(BOOT_CFG *pBootCfg);
BOOL ReadKernelRegionFromNand(BOOT_CFG *pBootCfg);
BOOL NandFlashMenu(BOOT_CFG *pBootCfg, BOOL *CFGChanged);
BOOL IsNandDevicePresent(void);

void SpinForever(void);

#ifdef __cplusplus
    }
#endif

#endif // __LOADER_H__

⌨️ 快捷键说明

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