Windeos CE启动的第一件事情

类别:编程语言 点击:0 评论:0 推荐:

最近看了傅琳琳的那篇OAL的点点滴滴(http://www.vckbase.com/document/viewdoc/?id=1379),他告诉我StartUp()函数是CE启动的第一个函数,可是我硬是没有搜索到那个什么鬼函数在哪里,在MSDN帮助文档里面也说:

This function is the first function to be called when the OS is booted from either the boot loader or reset vector.

void StartUp(void);Parameters

None.

Return Values

None.

Remarks

This function is the first function called during boot up. The function needs to initialize the CPU to a known state and then call one of the kernel initialization functions, either KernelInitialize or KernelStart.

可是我为什么找不到呢?

嘿嘿,在一阵子搜索之后,我放弃了,然后开始翻启动代码那段汇编语言,看到一个词语不认识:LEAF_ENTRY ,查看MSDN的帮助文档说,

This macro declares the beginning of a routine that does not require any prolog code.

LEAF_ENTRY Name[, [Section=]SectionName]ParametersName Name is the routine name and is in the global name space. SectionName SectionName is the name of the section in which the entry will appear; it is optional and defaults to .text. Return Values

None.

Remarks

A LEAF_ENTRY must have an associated ENTRY_END.

Each supported microprocessor contains a definition for this macro in a microprocessor-specific header file. The following table shows the supported microprocessor families and the related header file that contains the macro definition for that family.

Microprocessor familyHeader file nameARM Kxarm.hSH3, SH4Kxshx.hMIPSKxmips.h嘿嘿,原来就是它定义了StartUp啊,但是有些地方仍然没有想通,比如这个例程调用了很多C的函数,但这个时候好像还没有初始化栈堆,哪位知道原因,烦请告诉我一声。

本文地址:http://com.8s8s.com/it/it21981.htm