📄 loader.h
字号:
//
// Copyright(C) Renesas Technology Corp. 2005. All rights reserved.
//
// Ethernet Boot Loader for ITS-DS7
//
// FILE : loader.h
// CREATED : 2005.08.01
// MODIFIED :
// AUTHOR : Renesas Technology Corp.
// HARDWARE : RENESAS ITS-DS7
// HISTORY :
// 2005.08.01
// - Created release code.
// (based on EBOOT for ASPEN for WCE5.0)
//
// 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) 1998-2000 Renesas Technology Corp.
Module Name:
ethdown.c
Revision History:
May. 09, 2000 Create (based on S1 platform)
*/
#ifndef _LOADER_H_
#define _LOADER_H_
#include <blcommon.h>
#define IMAGE_OFFSET 0x00080000 // used to reserve EBOOT space
#define SDRAM_IMAGE_HEADER_SIZE 12 // image addr+image size+launch addr
//------------------------------------------------------------------------------
//
// Section Name: Memory Configuration
// Description.: The constants defining the memory layout below must match
// those defined in the .bib files.
//
//------------------------------------------------------------------------------
#define CACHED_TO_UNCACHED_OFFSET (0x20000000)
//------------------------------------------------------------------------------
//
// Define Name: RAM_START/END_CACHED
// Description: Defines the start/end of cached RAM.
//
//------------------------------------------------------------------------------
#define RAM_START_CACHED (BACKUP_DRAM_BASE)
#define RAM_SIZE (0x08000000) // 64MBx2
#define RAM_END_CACHED (RAM_START_CACHED + RAM_SIZE - 1)
//------------------------------------------------------------------------------
//
// Define Name: FLASH_START/END_CACHED
// Description: Defines the start/end of cached FLASH.
//
//------------------------------------------------------------------------------
#define FLASH_ADDR_START (AREA_0 + CACHED_BASE) //0x80000000
#define FLASH_ADDR_END (AREA_1 + CACHED_BASE) //0x84000000
#define FLASH_START_CACHED (FLASH_ADDR_START)
#define FLASH_SIZE (AREA_1-AREA_0) //(0x04000000) // 64MB
#define FLASH_END_CACHED (FLASH_START_CACHED + FLASH_SIZE - 1)
#define FLASH_START_UNCACHED (AREA_0 + UNCACHED_BASE)
#define FLASH_END_UNCACHED (FLASH_START_UNCACHED + FLASH_SIZE - 1)
#define FLASH_IMAGE_START_CACHED (AREA_0 + CACHED_BASE + IMAGE_OFFSET)
#define FLASH_IMAGE_START_UNCACHED (AREA_0 + UNCACHED_BASE + IMAGE_OFFSET)
// The temporary download buffer for flash writing is allocated at Area 2.
// Top 2MB of the area 2 is reserved (bootloader itself and other).
#define FLASH_CACHE 0x88200000UL
// Currently, ITS-DS7 supports 32MB and 64MB flash memory card.
// 32MB flash memory card uses four Intel 28F640J5 in word mode, and 2 banks are
// allocated continuously. Each bank is 16MB and contains 2 flash devices.
// 64MB flash memory card uses four Intel 28F128J3 in byte mode. All of flash
// devices compose single bank.
#define FLASH_BANK_SIZE_MINIMUM 0x01000000 // at least 16MB per bank
#define MAX_FLASH_BLOCKS 256UL // 128 for 32MB, 256 for 64MB
#define TOTAL_FLASH_BLOCKS MAX_FLASH_BLOCKS
#define FLASH_28F640J5_DW 0x00890015 // word mode 28F640J5 x 2
#define FLASH_28F640J5_QB 0x89891515 // byte mode 28F640J5 x 4
#define FLASH_28F640J3_DW 0x00890017 // word mode 28F640J3 x 2
#define FLASH_28F640J3_QB 0x89891717 // byte mode 28F640J3 x 4
#define FLASH_28F128J3_DW 0x00890018 // word mode 28F128J3 x 2
#define FLASH_28F128J3_QB 0x89891818 // byte mode 28F128J3 x 4
// Loader function prototypes.
//
void Launch(unsigned int uAddr);
BOOL EthInit (void);
DWORD EthPreDownload (void);
void EthLaunch (DWORD dwImageStart, DWORD dwImageLength, DWORD dwLaunchAddr, const ROMHDR *pRomHdr);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -