📄 malta.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) Malta 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="MIPS/MIPS32(CoreLV 4Kc)+MIPS64(CoreLV 5Kc) Atlas Board"HREF="atlas.html"><LINKREL="NEXT"TITLE="MIPS/RM7000 PMC-Sierra Ocelot"HREF="ocelot.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="atlas.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="ocelot.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="MALTA">MIPS/MIPS32(CoreLV 4Kc)+MIPS64(CoreLV 5Kc) Malta Board</H1><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN6809">Overview</H2><P>RedBoot supports both frontfacing serial ports and the built in ethernet port for communication and downloads.The default serial port settings are 38400,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="AEN6819"><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="AEN6838">Initial Installation</H2><P>RedBoot is installed using the code download facility built into theMalta board. See the Malta User manual for details, and also the Malta downloadformat in <AHREF="malta.html#MALTA-DOWNLOAD-FORMAT">the Section called <I>Malta download format</I></A>.</P><DIVCLASS="SECT3"><H3CLASS="SECT3"><ANAME="AEN6842">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.fl</TT> and <TTCLASS="FILENAME">redboot_ROM.fl</TT>. </P></LI><LI><P>Make sure switch S5-1 is ON. Reset the board and verify thatthe 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.fl</TT> file to theparallel port to erase previous images:<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">$ <TTCLASS="USERINPUT"><B>cat deleteall.fl >/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 RedBoot image to the board:<TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="SCREEN">$ <TTCLASS="USERINPUT"><B>cat redboot_ROM.fl >/dev/lp0</B></TT></PRE></TD></TR></TABLE>When this is complete, the LED display should show the last addressprogrammed. 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="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="MALTA-DOWNLOAD-FORMAT">Malta download format</H3><P>In order to download RedBoot to the Malta board, it must be convertedto the Malta download format.</P><P>The <ICLASS="CITETITLE">Atlas/Malta Developer's Kit</I> CD contains an <SPANCLASS="APPLICATION">srecconv.pl</SPAN> utility which requires Perl. This utility is partof the <TTCLASS="FILENAME">yamon/yamon-src-02.00.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">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="AEN6888">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="AEN6920">Interrupts</H2><P>RedBoot uses an interrupt vector table which is located at address 0x80000200.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 the maltaboard, the vector argument is one of 22 interrupts defined in <TTCLASS="COMPUTEROUTPUT">hal/mips/malta/<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_SOUTH_BRIDGE_INTR 0#define CYGNUM_HAL_INTERRUPT_SOUTH_BRIDGE_SMI 1#define CYGNUM_HAL_INTERRUPT_CBUS_UART 2#define CYGNUM_HAL_INTERRUPT_COREHI 3#define CYGNUM_HAL_INTERRUPT_CORELO 4#define CYGNUM_HAL_INTERRUPT_COMPARE 5#define CYGNUM_HAL_INTERRUPT_TIMER 6#define CYGNUM_HAL_INTERRUPT_KEYBOARD 7#define CYGNUM_HAL_INTERRUPT_CASCADE 8#define CYGNUM_HAL_INTERRUPT_TTY1 9#define CYGNUM_HAL_INTERRUPT_TTY0 10#define CYGNUM_HAL_INTERRUPT_11 11#define CYGNUM_HAL_INTERRUPT_FLOPPY 12#define CYGNUM_HAL_INTERRUPT_PARALLEL 13#define CYGNUM_HAL_INTERRUPT_REAL_TIME_CLOCK 14#define CYGNUM_HAL_INTERRUPT_I2C 15#define CYGNUM_HAL_INTERRUPT_PCI_AB 16#define CYGNUM_HAL_INTERRUPT_PCI_CD 17#define CYGNUM_HAL_INTERRUPT_MOUSE 18#define CYGNUM_HAL_INTERRUPT_19 19#define CYGNUM_HAL_INTERRUPT_IDE_PRIMARY 20#define CYGNUM_HAL_INTERRUPT_IDE_SECONDARY 21</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. With22 interrupts, the data table starts at address 0x80000258.</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="AEN6929">Memory Maps</H2><P>Memory Maps RedBoot sets up the following memory map on the Malta board.<DIVCLASS="NOTE"><BLOCKQUOTECLASS="NOTE"><P><B>NOTE: </B>The virtual memory maps in this section use a C and B column to indicatewhether or not the region is cached (C) or buffered (B).</P></BLOCKQUOTE></DIV><TABLEBORDER="5"BGCOLOR="#E0E0F0"WIDTH="70%"><TR><TD><PRECLASS="PROGRAMLISTING">Physical Address Range C B Description----------------------- - - -----------0x80000000 - 0x81ffffff Y Y SDRAM0x9e000000 - 0x9e3fffff Y N System flash (cached)0x9fc00000 - 0x9fffffff Y N System flash (mirrored)0xa8000000 - 0xb7ffffff N N PCI Memory Space0xb4000000 - 0xb40fffff N N Galileo System Controller0xb8000000 - 0xb80fffff N N Southbridge / ISA0xb8100000 - 0xbbdfffff N N PCI I/O Space0xbe000000 - 0xbe3fffff N N System flash (noncached)0xbf000000 - 0xbfffffff N N Board logic FPGA</PRE></TD></TR></TABLE></P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN6936">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=malta_mips32_4kcexport ARCH_DIR=mipsexport PLATFORM_DIR=malta</PRE></TD></TR></TABLE></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="atlas.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="ocelot.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">MIPS/MIPS32(CoreLV 4Kc)+MIPS64(CoreLV 5Kc) Atlas Board</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="installation-and-testing.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">MIPS/RM7000 PMC-Sierra Ocelot</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -