blcommon.h
来自「WinCE 3.0 BSP, 包含Inter SA1110, Intel_815」· C头文件 代码 · 共 110 行
H
110 行
/*++
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.
Copyright (c) 2000-2001 Microsoft Corporation. All rights reserved.
Module Name:
blcommon.h
Abstract:
Bootloader common header file. This file contains all the type and
function definitions used by boot loader.
Functions:
Notes:
--*/
#ifndef _BOOTLOADER_MAIN_H_
#define _BOOTLOADER_MAIN_H_
#include <pehdr.h>
#include <romldr.h>
/////////////////////////////////////////////////////////////////
//
// Platform independent functions
//
// BootloaderMain - entry from bootloader (called after StartUp)
//
/////////////////////////////////////////////////////////////////
void BootloaderMain (void);
/////////////////////////////////////////////////////////////////
//
// Platform dependent functions, provided by OEM
//
/////////////////////////////////////////////////////////////////
//
// Main control flow of bootloader
// (1) OEMDebugInit -- first function called, provide debug support
// (2) OEMPlatformInit -- platform initialization
// (3) OEMPreDownload -- called before download
// (4) OEMLaunch -- final function called, jump to NK
// first function called when bootloader started. OEM should
// initialize debug transport during this call.
BOOL OEMDebugInit (void);
// OEM platform initialization function. OEM should perform platform
// specific initialization like clock, driver, and transport, in this
// function.
BOOL OEMPlatformInit (void);
// call before downloading image. Can be customized to ask user feedback.
DWORD OEMPreDownload (void);
// possible return value from OEMPreDownload
#define BL_DOWNLOAD 0
#define BL_JUMP 1
#define BL_ERROR -1
// Final function called to launch the image, never returned
// dwImageStart - start address of image
// dwImageLength - length of the image in bytes
// dwLuanchAddr - launch address (first instruction of the image)
// pRomHdr -
void OEMLaunch (DWORD dwImageStart, DWORD dwImageLength, DWORD dwLaunchAddr, const ROMHDR *pRomHdr);
//
// Download related functions
//
BOOL OEMReadData (DWORD cbData, LPBYTE pbData);
void OEMShowProgress (DWORD dwPacketNum);
//
// Flash related functions:
// The bootloader try to erase flash while downloading to speed up
// the download process. It'll call OEMStartEraseFlash if a flash
// image is detected. And continue calling ContinueEraseFlash in the
// course of image download. It'll call OEMFinishEraseFlash when
// the image download is complete. And OEMWriteFlash aferward.
//
// If speed is not a concern, OEM can stub StartErase, ContinueErase,
// and FinishErase function, then performs all the operations in WriteFlash.
//
BOOL OEMIsFlashAddr (DWORD dwAddr);
BOOL OEMStartEraseFlash (DWORD dwStartAddr, DWORD dwLength);
void OEMContinueEraseFlash (void);
BOOL OEMFinishEraseFlash (void);
BOOL OEMWriteFlash (DWORD dwStartAddr, DWORD dwLength);
//
// Memory mapping related functions
//
LPBYTE OEMMapMemAddr (DWORD dwImageStart, DWORD dwAddr);
//
// Debug related functions
//
void OEMWriteDebugByte (UCHAR ch);
//
// timer releted functions
//
DWORD OEMEthGetSecs (void);
#endif // _BOOTLOADER_MAIN_H_
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?