📄 atlas.html
字号:
<!-- Copyright (C) 2003 Red Hat, Inc. --><!-- This material may be distributed only subject to the terms --><!-- and conditions set forth in the Open Publication License, v1.0 --><!-- or later (the latest version is presently available at --><!-- http://www.opencontent.org/openpub/). --><!-- Distribution of the work or derivative of the work in any --><!-- standard (paper) book form is prohibited unless prior --><!-- permission is obtained from the copyright holder. --><HTML><HEAD><TITLE>MIPS/MIPS32(CoreLV 4Kc)+MIPS64(CoreLV 5Kc) Atlas Board</TITLE><meta name="MSSmartTagsPreventParsing" content="TRUE"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="eCos Reference Manual"HREF="ecos-ref.html"><LINKREL="UP"TITLE="Installation and Testing"HREF="installation-and-testing.html"><LINKREL="PREVIOUS"TITLE="IA32/x86 x86-Based PC"HREF="x86pc.html"><LINKREL="NEXT"TITLE="MIPS/MIPS32(CoreLV 4Kc)+MIPS64(CoreLV 5Kc) Malta Board "HREF="malta.html"></HEAD><BODYCLASS="SECT1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">eCos Reference Manual</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="x86pc.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 5. Installation and Testing</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="malta.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="ATLAS">MIPS/MIPS32(CoreLV 4Kc)+MIPS64(CoreLV 5Kc) Atlas Board</H1><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN6659">Overview</H2><P>RedBoot supports the DgbSerserial port and the built in ethernet port for communication and downloads.The default serial port settings are 115200,8,N,1. RedBoot runs from and supportsflash management for the system flash region.</P><P>The following RedBoot configurations are supported: <DIVCLASS="INFORMALTABLE"><ANAME="AEN6669"><P></P><TABLEBORDER="1"CLASS="CALSTABLE"><THEAD><TR><THALIGN="LEFT"VALIGN="TOP">Configuration</TH><THALIGN="LEFT"VALIGN="TOP">Mode</TH><THALIGN="LEFT"VALIGN="TOP">Description</TH><THALIGN="LEFT"VALIGN="TOP">File</TH></TR></THEAD><TBODY><TR><TDALIGN="LEFT"VALIGN="TOP">ROM</TD><TDALIGN="LEFT"VALIGN="TOP">[ROM]</TD><TDALIGN="LEFT"VALIGN="TOP">RedBoot running from the board's flash boot sector.</TD><TDALIGN="LEFT"VALIGN="TOP">redboot_ROM.ecm</TD></TR><TR><TDALIGN="LEFT"VALIGN="TOP">RAM</TD><TDALIGN="LEFT"VALIGN="TOP">[RAM]</TD><TDALIGN="LEFT"VALIGN="TOP">RedBoot running from RAM with RedBoot in the flash boot sector.</TD><TDALIGN="LEFT"VALIGN="TOP">redboot_RAM.ecm</TD></TR></TBODY></TABLE><P></P></DIV></P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN6688">Initial Installation</H2><P>RedBoot is installed using the code download facility built into theAtlas board. See the Atlas User manual for details, and also the Atlas downloadformat in <AHREF="atlas.html#ATLAS-DOWNLOAD-FORMAT">the Section called <I>Atlas download format</I></A>.</P><DIVCLASS="SECT3"><H3CLASS="SECT3"><ANAME="AEN6692">Quick download instructions</H3><P>Here are quick start instructions for downloading the prebuilt RedBootimage.</P><P></P><OLTYPE="1"><LI><P>Locate the prebuilt files in the bin directory: <TTCLASS="FILENAME">deleteall.dl</TT> and <TTCLASS="FILENAME">redboot.dl</TT>.</P></LI><LI><P>Make sure switch S1-1 is OFF and switch S5-1 is ON. Resetthe board and verify that the LED display reads <TTCLASS="COMPUTEROUTPUT">Flash DL</TT>.</P></LI><LI><P>Make sure your parallel port is connected to the 1284 portOf the Atlas board. </P></LI><LI><P>Send the <TTCLASS="FILENAME">deleteall.dl</TT> file to theparallel port to erase previous images:<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">$ <TTCLASS="USERINPUT"><B>cat deleteall.dl >/dev/lp0</B></TT></PRE></TD></TR></TABLE>When this is complete, the LED display should read<TTCLASS="COMPUTEROUTPUT">Deleted</TT>.</P></LI><LI><P>Send the ROM mode RedBoot image to the board:<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">$ <TTCLASS="USERINPUT"><B>cat redboot.dl >/dev/lp0</B></TT></PRE></TD></TR></TABLE>When this is complete, the LED display should show the lastaddress programmed. This will be something like: <TTCLASS="COMPUTEROUTPUT">1fc17000</TT>. </P></LI><LI><P>Change switch S5-1 to OFF and reset the board. The LED displayshould read <TTCLASS="COMPUTEROUTPUT">RedBoot</TT>. </P></LI><LI><P>Run the RedBoot <BCLASS="COMMAND">fis init</B>and <BCLASS="COMMAND">fconfig</B> commands to initialize the flash.See <AHREF="atlas.html#ATLAS-ADDITIONAL-FCONFIG-OPTIONS">the Section called <I>Additional config options</I></A>, <AHREF="flash-image-system.html">the Section called <I>Flash Image System (FIS)</I> in Chapter 2</A>and <AHREF="persistent-state-flash.html">the Section called <I>Persistent State Flash-based Configuration and Control</I> in Chapter 2</A> for details. </P></LI></OL></DIV><DIVCLASS="SECT3"><H3CLASS="SECT3"><ANAME="ATLAS-DOWNLOAD-FORMAT">Atlas download format</H3><P>In order to download RedBoot to the Atlas board, it must be convertedto the Atlas download format. There are different ways of doing this dependingon which version of the developer's kit is shipped with the board. </P><P>The <ICLASS="CITETITLE">Atlas Developer's Kit</I> CD contains an <SPANCLASS="APPLICATION">srec2flash</SPAN> utility. The source code for this utility is partof the <TTCLASS="FILENAME">yamon/yamon-src-01.01.tar.gz</TT> tarballon the Dev Kit CD. The path in the expanded tarball is <TTCLASS="FILENAME">yamon/bin/tools</TT>. To use<SPANCLASS="APPLICATION">srec2flash</SPAN> to convert the S-record file:<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">$ <TTCLASS="USERINPUT"><B>srec2flash -EL -S29 redboot.srec >redboot.dl</B></TT></PRE></TD></TR></TABLE>The <ICLASS="CITETITLE">Atlas/Malta Developer's Kit</I> CDcontains an <SPANCLASS="APPLICATION">srecconv.pl</SPAN> utility which requiresPerl. This utilty is part of the <TTCLASS="FILENAME">yamon/yamon-src-02.00.tar.gz</TT>tarball on the Dev Kit CD. The path in the expanded tarballis <TTCLASS="FILENAME">yamon/bin/tools</TT>. To use <SPANCLASS="APPLICATION">srecconv</SPAN> to convert the S-record file:<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">$ <TTCLASS="USERINPUT"><B>cp redboot_ROM.srec redboot_ROM.rec</B></TT>$ <TTCLASS="USERINPUT"><B>srecconv.pl -ES L -A 29 redboot_ROM</B></TT></PRE></TD></TR></TABLE>The resulting file is named <TTCLASS="FILENAME">redboot_ROM.fl</TT>.</P></DIV></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN6746">Flash management</H2><DIVCLASS="SECT3"><H3CLASS="SECT3"><ANAME="ATLAS-ADDITIONAL-FCONFIG-OPTIONS">Additional config options</H3><P>The ethernet MAC address is stored in flash manually using the <BCLASS="COMMAND">fconfig</B> command. You can use the YAMON <BCLASS="COMMAND">setenvethaddr</B> command to print out the board ethernet address.Typically, it is: <TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">00:0d:a0:00:<TTCLASS="REPLACEABLE"><I>xx:xx</I></TT></PRE></TD></TR></TABLE> where<TTCLASS="REPLACEABLE"><I>xx.xx</I></TT> is the hex representation of theboard serial number.</P></DIV></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN6756">Additional commands</H2><P>The <BCLASS="COMMAND">exec</B> command which allows theloading and execution of Linux kernels, is supported for this architecture (see <AHREF="executing-programs.html">the Section called <I>Executing Programs from RedBoot</I> in Chapter 2</A>). The<BCLASS="COMMAND">exec</B> parameters used for MIPS boards are:</P><P></P><DIVCLASS="VARIABLELIST"><DL><DT>-b <TTCLASS="REPLACEABLE"><I><addr></I></TT></DT><DD><P>Location to store command line and environment passed to kernel</P></DD><DT>-w <TTCLASS="REPLACEABLE"><I><time></I></TT></DT><DD><P>Wait time in seconds before starting kernel</P></DD><DT>-c <TTCLASS="REPLACEABLE"><I>"params"</I></TT></DT><DD><P>Parameters passed to kernel</P></DD><DT><TTCLASS="REPLACEABLE"><I><addr></I></TT></DT><DD><P>Kernel entry point, defaulting to the entry point of the last imageloaded</P></DD></DL></DIV><P>Linux kernels on MIPS platforms expect the entry point to be called with argumentsin the registers equivalent to a C call with prototype:<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">void Linux(int argc, char **argv, char **envp);</PRE></TD></TR></TABLE></P><P>RedBoot will place the appropriate data at the offset specified by the<TTCLASS="PARAMETER"><I>-b</I></TT> parameter, or by default at address 0x80080000, and will set thearguments accordingly when calling into the kernel.</P><P>The default entry point, if no image with explicit entry point has been loaded andnone is specified, is 0x80000750.</P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN6788">Interrupts</H2><P>RedBoot uses an interrupt vector table which is located at address 0x80000400.Entries in this table are pointers to functions with this protoype: <TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">int irq_handler( unsigned vector, unsigned data )</PRE></TD></TR></TABLE>On an atlasboard, the vector argument is one of 25 interrupts defined in <TTCLASS="COMPUTEROUTPUT">hal/mips/atlas/<TTCLASS="REPLACEABLE"><I>VERSION</I></TT>/include/plf_intr.h</TT>: <TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">#define CYGNUM_HAL_INTERRUPT_SER 0#define CYGNUM_HAL_INTERRUPT_TIM0 1#define CYGNUM_HAL_INTERRUPT_2 2#define CYGNUM_HAL_INTERRUPT_3 3#define CYGNUM_HAL_INTERRUPT_RTC 4#define CYGNUM_HAL_INTERRUPT_COREHI 5#define CYGNUM_HAL_INTERRUPT_CORELO 6#define CYGNUM_HAL_INTERRUPT_7 7#define CYGNUM_HAL_INTERRUPT_PCIA 8#define CYGNUM_HAL_INTERRUPT_PCIB 9#define CYGNUM_HAL_INTERRUPT_PCIC 10#define CYGNUM_HAL_INTERRUPT_PCID 11#define CYGNUM_HAL_INTERRUPT_ENUM 12#define CYGNUM_HAL_INTERRUPT_DEG 13#define CYGNUM_HAL_INTERRUPT_ATXFAIL 14#define CYGNUM_HAL_INTERRUPT_INTA 15#define CYGNUM_HAL_INTERRUPT_INTB 16#define CYGNUM_HAL_INTERRUPT_INTC 17#define CYGNUM_HAL_INTERRUPT_INTD 18#define CYGNUM_HAL_INTERRUPT_SERR 19#define CYGNUM_HAL_INTERRUPT_HW1 20#define CYGNUM_HAL_INTERRUPT_HW2 21#define CYGNUM_HAL_INTERRUPT_HW3 22#define CYGNUM_HAL_INTERRUPT_HW4 23#define CYGNUM_HAL_INTERRUPT_HW5 24</PRE></TD></TR></TABLE>The datapassed to the ISR is pulled from a data table (<TTCLASS="COMPUTEROUTPUT">hal_interrupt_data</TT>) which immediately follows the interrupt vector table. With25 interrupts, the data table starts at address 0x80000464 on atlas.</P><P>An application may create a normal C function with the above prototypeto be an ISR. Just poke its address into the table at the correct index andenable the interrupt at its source. The return value of the ISR is ignoredby RedBoot. </P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN6797">Memory Maps</H2><P>Memory Maps RedBoot sets up the following memory map on the Atlas board.<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">Physical Address Range Description----------------------- -------------0x00000000 - 0x07ffffff SDRAM0x08000000 - 0x17ffffff PCI Memory Space0x18000000 - 0x1bdfffff PCI I/O Space0x1be00000 - 0x1bffffff System Controller0x1c000000 - 0x1dffffff System flash0x1e000000 - 0x1e3fffff Monitor flash0x1f000000 - 0x1fbfffff FPGA</PRE></TD></TR></TABLE></P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN6801">Rebuilding RedBoot</H2><P>These shell variables provide the platform-specific informationneeded for building RedBoot according to the procedure described in<AHREF="rebuilding-redboot.html">Chapter 3</A>:<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">export TARGET=atlas_mips32_4kcexport TARGET=atlas_mips64_5kcexport ARCH_DIR=mipsexport PLATFORM_DIR=atlas</PRE></TD></TR></TABLE>Use one of the TARGET settings only. </P><P>The names of configuration files are listed above with thedescription of the associated modes.</P></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="x86pc.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="ecos-ref.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="malta.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">IA32/x86 x86-Based PC</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="installation-and-testing.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">MIPS/MIPS32(CoreLV 4Kc)+MIPS64(CoreLV 5Kc) Malta Board</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -