?? loader.h
字號(hào):
//
// 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.
//
/*++
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
Module Name:
loader.h
Abstract:
internal include file to bootload module
Functions:
Notes:
Revision History:
--*/
#ifndef _LOADER_H_
#define _LOADER_H_ 1
#include <fwentry.h>
#ifdef NULL
#undef NULL
#endif
#ifdef FALSE
#undef FALSE
#endif
#ifdef TRUE
#undef TRUE
#endif
#define FALSE 0
#define TRUE 1
#define NULL (void *)0
#define FLAG_AUTO_LAUNCH 1
#define FLAG_INIT_BREAK 2
#define SRECNV_OK 1
#define SRECNV_XMT 2
#define SRECNV_CHECKSUM 3
#define SRECNV_INVALID_RECORD 4
void
StartMonitor(
void
);
void
RestoreAndGo(
unsigned int vAddr
);
int
DownloadImage(
const unsigned char * pPathName,
unsigned int * pVaddr,
int fLaunch
);
int
ConvertSreRecord(
const unsigned char *pBuf,
unsigned int *pFlags,
unsigned int *pVaddr
);
unsigned char
AsciiToUnsignedChar(
const unsigned char * pbuf
);
unsigned int
AsciiToUnsignedint (
const unsigned char * pBuf
);
unsigned int
BigEndianAsciiToUnsignedint (
const unsigned char * pBuf
);
int
atox(
const unsigned char *pbuf,
unsigned int *value
);
unsigned char
toascii(
unsigned char c
);
void
CacheInit(
void
);
void
FlushDCache(
void
);
void
FlushICache(
void
);
void
Launch(
unsigned int uAddr
);
#define MachineSpin() while(1){}
//#define CALL_FUNC(x) ((PFUNC_V_V)x)()
#define RESET_FLAG(flag, field) do {flag &= ~field;} while(0)
#define SET_FLAG(flag, field) do {flag |= field;} while(0)
#define TEST_FLAG(flag, field) (flag & field)
#define LAUNCH_ON_SRE 0
#define FORCE_LAUNCH 1
#define FORCE_BREAK 2
#ifdef MIPS
#define BOOT_TYPE -2
#elif i386
#define BOOT_TYPE -4
#else
#define BOOT_TYPE -1
#endif
#define FLASH_BLOCK_SIZE 0x00020000UL
#define FLASH_BLOCKS_PER_BANK 32UL
#define TOTAL_FLASH_BLOCKS ((FLASH_END-FLASH_START)/FLASH_BLOCK_SIZE)
// Constants from platform\odo\files\config.bib
#if defined(MIPS) || defined(PPC)
#define RAMIMG_FREE_RAM_BASE 0x80080000
#define RAMIMG_FREE_RAM_SIZE 0x580000 // 6M - 320K (reserved)
#define FLASHIMG_FREE_RAM_BASE 0x80080000
#define FLASHIMG_FREE_RAM_SIZE 0xf80000 // 16M - 320K (reserved)
#else
#define RAMIMG_FREE_RAM_BASE 0xac030000
#define RAMIMG_FREE_RAM_SIZE 0x5b0000 // 6M - 320K (reserved)
#define FLASHIMG_FREE_RAM_BASE 0xac050000
#define FLASHIMG_FREE_RAM_SIZE 0xfb0000 // 16M - 320K (reserved)
#endif
#ifdef MIPS
#define OS_ENTRY 0xad000004 // ROM/FLASH OS entry point
#else
#define OS_ENTRY 0xb8000004 // ROM/FLASH OS entry point
#endif
#endif
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -