📄 c-config6.html
字号:
</div></p><dd><p class="Body"><a name="86207"> </a>Because of the size of the system image, 512KB of EPROM is recommended for the ROM-resident version of the standalone VxWorks system. More space is probably required if applications are linked with the standalone VxWorks system. For a ROM-resident version of the boot ROM, 256KB of EPROM is recommended. If you use ROMs of a size other than the default, modify the value of <b class="symbol_UC">ROM_SIZE </b>in the target makefile and<b class="file"> config.h</b>.</p><dd><p class="Body"><a name="86208"> </a>A new make target, <b class="file">vxWorks.res_rom_nosym</b>, has been created to provide a ROM-resident image without the symbol table. This is intended to be a standard ROM image for use with the Tornado environment where the symbol table resides on the host system. Being ROM-resident, the debug agent and VxWorks are ready almost immediately after power-up or restart.</p><dd><p class="Body"><a name="90934"> </a>The data segment of a ROM-resident standalone VxWorks system is loaded at <b class="symbol_UC">RAM_LOW_ADRS</b> (defined in the makefile) to minimize fragmentation. The data segment of ROM-resident boot ROMs is loaded at <b class="symbol_UC">RAM_HIGH_ADRS</b>, so that loading VxWorks does not overwrite the resident boot ROMs. For a CPU board with limited memory (under 1MB of RAM), make sure that <b class="symbol_UC">RAM_HIGH_ADRS</b> is less than <b class="symbol_UC">LOCAL_MEM_SIZE</b> by a margin sufficient to accommodate the data segment. Note that <b class="symbol_UC">RAM_HIGH_ADRS</b> is defined in both the makefile and <b class="file">config.h</b>. These definitions <i class="emphasis">must</i> agree.</p><dd><p class="Body"><a name="86215"> </a><a href="c-config6.html#86156">Figure 8-1</a> shows the memory layout for ROM-resident boot and VxWorks images. The lower portion of the diagram shows the layout for ROM; the upper portion shows the layout for RAM. <b class="symbol_UC">LOCAL_MEM_LOCAL_ADRS</b> is the starting address of RAM. For the boot image, the data segment gets copied into RAM above <b class="symbol_UC">RAM_HIGH_ADRS</b> (after space for <i class="acronym_lc">bss</i> is reserved). For the VxWorks image, the data segment gets copied into RAM above <b class="symbol_UC">RAM_LOW_ADRS</b> (after space for <i class="acronym_lc">bss</i> is reserved). Note that for both images the text segment remains in ROM. </p></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H3"><i><a name="86219">8.6.3 Initialization Sequence for ROM-Based VxWorks</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="86220"> </a>The early steps of system initialization are somewhat different for the ROM-based versions of VxWorks: on most target architectures, the two routines <b class="routine"><i class="routine">romInit</i></b><b>( )</b> and <b class="routine"><i class="routine">romStart</i></b><b>( )</b>execute instead of the usual VxWorks entry point, <b class="routine"><i class="routine">sysInit</i></b><b>( )</b>. </p></dl></dl><dl class="margin"><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="86224">ROM Entry Point: <b class="routine"><i class="routine">romInit</i></b><b>( )</b> </a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="90952"> </a>At power-up the processor begins executing at <b class="routine"><i class="routine">romInit</i></b><b>( )</b> (defined in <i class="textVariable">installDir</i><b class="file">/target/config/</b><i class="textVariable">bspname</i><b class="file">/romInit.s</b>). The <b class="routine"><i class="routine">romInit</i></b><b>( )</b> routine disables interrupts, puts the boot type (cold/warm) on the stack, performs hardware-dependent initialization (such as clearing caches or enabling DRAM), and branches to <b class="routine"><i class="routine">romStart</i></b><b>( )</b>. The stack pointer is initialized to reside below the data section in the case of ROM-resident versions of VxWorks (in RAM versions, the stack pointer instead resides below the text section).</p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="90956">Copying the VxWorks Image: <b class="routine"><i class="routine">romStart</i></b><b>( )</b> </a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="90957"> </a>Next, the <b class="routine"><i class="routine">romStart</i></b><b>( )</b>routine (in <i class="textVariable">installDir</i><b class="file">/target/config/all/bootInit.c</b>) loads the VxWorks system image into RAM. If the ROM-resident version of VxWorks is selected, the data segment is copied from ROM to RAM and memory is cleared. If VxWorks is not ROM resident, all of the text and code segment is copied and decompressed from ROM to RAM, to the location defined by <b class="symbol_UC">RAM_HIGH_ADRS</b> in <b class="file">Makefile</b>. If VxWorks is neither ROM resident nor compressed, the entire text and data segment is copied without decompression straight to RAM, to the location defined by<b class="symbol_UC"> RAM_LOW_ADRS</b> in <b class="file">Makefile</b>.</p></dl><dd><font face="Helvetica, sans-serif" size="-1" class="sans"><h5 class="HU"><i><a name="86232">Overall Initialization for ROM-Based VxWorks</a></i></h5></font><dl class="margin"><dd><p class="Body"><a name="86233"> </a>Beyond <b class="routine"><i class="routine">romStart</i></b><b>( )</b>, the initialization sequence for ROM-based VxWorks resembles the normal sequence, continuing with the <b class="routine"><i class="routine">usrInit</i></b><b>( )</b> call.</p><dd><p class="Body"><a name="86237"> </a><a href="c-config6.html#86247">Table 8-8</a> summarizes the complete initialization sequence. For details on the steps after <b class="routine"><i class="routine">romInit</i></b><b>( )</b> and <b class="routine"><i class="routine">romStart</i></b><b>( )</b>, see <a href="c-config3.html#84472"><i class="title">8.3 VxWorks Initialization Timeline</i></a>. <p class="table"><h4 class="EntityTitle"><a name="86247"><font face="Helvetica, sans-serif" size="-1" class="sans">Table 8-8: ROM-Based VxWorks Initialization Sequence </font></a></h4><table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="86253"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Routine</font></b></div></th><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="86255"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">Activity</font></b></div></th><th rowspan="1" colspan="1"><div class="CellHeading"><b><a name="86257"> </a><font face="Helvetica, sans-serif" size="-1" class="sans">File</font></b></div></th></tr><tr><td colspan="20"><hr class="tablerule2"></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="86259"> </a>1. <b class="routine"><i class="routine">romInit</i></b><b>( )</b> </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86261"> </a>(a) disable interrupts </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86263"> </a><b class="file">romInit.s</b> </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="86265"> </a> </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86267"> </a>(b) save boot type (cold/warm) </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86269"> </a> </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="86271"> </a> </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86273"> </a>(c) hardware-dependent initialization </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86275"> </a> </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="86277"> </a> </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86279"> </a>(d) branch to <b class="routine"><i class="routine">romStart</i></b><b>( )</b> </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86281"> </a> </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="86283"> </a>2. <b class="routine"><i class="routine">romStart</i></b><b>( )</b> </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86285"> </a>(a) copy data segment from ROM to RAM; clear <br> memory </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86287"> </a><b class="file">bootInit.c</b> </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="86289"> </a> </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86291"> </a>(b) copy code segment from ROM to RAM, <br> decompressing if necessary </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86293"> </a> </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="86295"> </a> </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86298"> </a>(c) invoke <b class="routine"><i class="routine">usrInit</i></b><b>( )</b> with boot type </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86300"> </a> </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="86302"> </a>3. <b class="routine"><i class="routine">usrInit</i></b><b>( )</b> </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86304"> </a>Initial routine. </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86306"> </a><b class="file">usrConfig.c</b> </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="86308"> </a>4. <b class="routine"><i class="routine">usrKernelInit</i></b><b>( )</b> </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86310"> </a>Routines invoked if the corresponding configuration constants are defined. </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86312"> </a><b class="file">usrKernel.c</b> </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="86314"> </a>5. <b class="routine"><i class="routine">kernelInit</i></b><b>( )</b> </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86316"> </a>Initialize and start the kernel. </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86318"> </a><b class="file">kernelLib.c</b> </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="86321"> </a>6. <b class="routine"><i class="routine">usrRoot</i></b><b>( )</b> </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86323"> </a>Initialize I/O system, install drivers, and create devices as configured in <b class="file">configAll.h</b> and <b class="file">config.h</b>. </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86326"> </a><b class="file">usrConfig.c</b><b></b> </div></td></tr><tr valign="top"><td colspan=1 rowspan=1><div class="CellBody"><a name="86328"> </a>Application routine </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86330"> </a>Application code. </div></td><td colspan=1 rowspan=1><div class="CellBody"><a name="86332"> </a>Application source file </div></td></tr><tr><td colspan="20"><hr class="tablerule"></td></tr><tr valign="middle"><td colspan="20"></td></tr></table></p></p></dl></dl><a name="foot"><hr></a><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a><a href="GuideIX.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="c-config.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="c-config5.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="c-config7.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p></body></html><!---by WRS Documentation (), Wind River Systems, Inc. conversion tool: Quadralay WebWorks Publisher 4.0.11 template: CSS Template, Jan 1998 - Jefro --->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -