<!-- Copyright (C) 2003 Red Hat, Inc. -->
|
<!-- Copyright (C) 2003 Red Hat, Inc. -->
|
<!-- This material may be distributed only subject to the terms -->
|
<!-- This material may be distributed only subject to the terms -->
|
<!-- and conditions set forth in the Open Publication License, v1.0 -->
|
<!-- and conditions set forth in the Open Publication License, v1.0 -->
|
<!-- or later (the latest version is presently available at -->
|
<!-- or later (the latest version is presently available at -->
|
<!-- http://www.opencontent.org/openpub/). -->
|
<!-- http://www.opencontent.org/openpub/). -->
|
<!-- Distribution of the work or derivative of the work in any -->
|
<!-- Distribution of the work or derivative of the work in any -->
|
<!-- standard (paper) book form is prohibited unless prior -->
|
<!-- standard (paper) book form is prohibited unless prior -->
|
<!-- permission is obtained from the copyright holder. -->
|
<!-- permission is obtained from the copyright holder. -->
|
<HTML
|
<HTML
|
><HEAD
|
><HEAD
|
><TITLE
|
><TITLE
|
>RedBoot Resource Usage</TITLE
|
>RedBoot Resource Usage</TITLE
|
><meta name="MSSmartTagsPreventParsing" content="TRUE">
|
><meta name="MSSmartTagsPreventParsing" content="TRUE">
|
<META
|
<META
|
NAME="GENERATOR"
|
NAME="GENERATOR"
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
"><LINK
|
"><LINK
|
REL="HOME"
|
REL="HOME"
|
TITLE="eCos Reference Manual"
|
TITLE="eCos Reference Manual"
|
HREF="ecos-ref.html"><LINK
|
HREF="ecos-ref.html"><LINK
|
REL="UP"
|
REL="UP"
|
TITLE="Getting Started with RedBoot"
|
TITLE="Getting Started with RedBoot"
|
HREF="getting-started-with-redboot.html"><LINK
|
HREF="getting-started-with-redboot.html"><LINK
|
REL="PREVIOUS"
|
REL="PREVIOUS"
|
TITLE="RedBoot Startup Mode"
|
TITLE="RedBoot Startup Mode"
|
HREF="startup-mode.html"><LINK
|
HREF="startup-mode.html"><LINK
|
REL="NEXT"
|
REL="NEXT"
|
TITLE="Configuring the RedBoot Environment"
|
TITLE="Configuring the RedBoot Environment"
|
HREF="configuring-the-redboot-environment.html"></HEAD
|
HREF="configuring-the-redboot-environment.html"></HEAD
|
><BODY
|
><BODY
|
CLASS="SECT1"
|
CLASS="SECT1"
|
BGCOLOR="#FFFFFF"
|
BGCOLOR="#FFFFFF"
|
TEXT="#000000"
|
TEXT="#000000"
|
LINK="#0000FF"
|
LINK="#0000FF"
|
VLINK="#840084"
|
VLINK="#840084"
|
ALINK="#0000FF"
|
ALINK="#0000FF"
|
><DIV
|
><DIV
|
CLASS="NAVHEADER"
|
CLASS="NAVHEADER"
|
><TABLE
|
><TABLE
|
SUMMARY="Header navigation table"
|
SUMMARY="Header navigation table"
|
WIDTH="100%"
|
WIDTH="100%"
|
BORDER="0"
|
BORDER="0"
|
CELLPADDING="0"
|
CELLPADDING="0"
|
CELLSPACING="0"
|
CELLSPACING="0"
|
><TR
|
><TR
|
><TH
|
><TH
|
COLSPAN="3"
|
COLSPAN="3"
|
ALIGN="center"
|
ALIGN="center"
|
>eCos Reference Manual</TH
|
>eCos Reference Manual</TH
|
></TR
|
></TR
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="10%"
|
WIDTH="10%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
><A
|
><A
|
HREF="startup-mode.html"
|
HREF="startup-mode.html"
|
ACCESSKEY="P"
|
ACCESSKEY="P"
|
>Prev</A
|
>Prev</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="80%"
|
WIDTH="80%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
>Chapter 1. Getting Started with RedBoot</TD
|
>Chapter 1. Getting Started with RedBoot</TD
|
><TD
|
><TD
|
WIDTH="10%"
|
WIDTH="10%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="bottom"
|
VALIGN="bottom"
|
><A
|
><A
|
HREF="configuring-the-redboot-environment.html"
|
HREF="configuring-the-redboot-environment.html"
|
ACCESSKEY="N"
|
ACCESSKEY="N"
|
>Next</A
|
>Next</A
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
><HR
|
><HR
|
ALIGN="LEFT"
|
ALIGN="LEFT"
|
WIDTH="100%"></DIV
|
WIDTH="100%"></DIV
|
><DIV
|
><DIV
|
CLASS="SECT1"
|
CLASS="SECT1"
|
><H1
|
><H1
|
CLASS="SECT1"
|
CLASS="SECT1"
|
><A
|
><A
|
NAME="RESOURCE-USAGE">RedBoot Resource Usage</H1
|
NAME="RESOURCE-USAGE">RedBoot Resource Usage</H1
|
><P
|
><P
|
> </P
|
> </P
|
><P
|
><P
|
>RedBoot takes up both flash and RAM resources depending on its
|
>RedBoot takes up both flash and RAM resources depending on its
|
startup mode and number of enabled features. There are also other
|
startup mode and number of enabled features. There are also other
|
resources used by RedBoot, such as timers. Platform-specific resources
|
resources used by RedBoot, such as timers. Platform-specific resources
|
used by RedBoot are listed in the platform specific parts of this
|
used by RedBoot are listed in the platform specific parts of this
|
manual.</P
|
manual.</P
|
><P
|
><P
|
>Both flash and RAM resources used by RedBoot depend to some
|
>Both flash and RAM resources used by RedBoot depend to some
|
degree on the features enabled in the RedBoot configuration. It is
|
degree on the features enabled in the RedBoot configuration. It is
|
possible to reduce in particular the RAM resources used by RedBoot by
|
possible to reduce in particular the RAM resources used by RedBoot by
|
removing features that are not needed. Flash resources can also be
|
removing features that are not needed. Flash resources can also be
|
reduced, but due to the granularity of the flash (the block sizes),
|
reduced, but due to the granularity of the flash (the block sizes),
|
reductions in feature size do not always result in flash resource
|
reductions in feature size do not always result in flash resource
|
savings.</P
|
savings.</P
|
><DIV
|
><DIV
|
CLASS="SECT2"
|
CLASS="SECT2"
|
><H2
|
><H2
|
CLASS="SECT2"
|
CLASS="SECT2"
|
><A
|
><A
|
NAME="AEN2631">Flash Resources</H2
|
NAME="AEN2631">Flash Resources</H2
|
><P
|
><P
|
>On many platforms, a ROM mode RedBoot image resides in the first
|
>On many platforms, a ROM mode RedBoot image resides in the first
|
flash sectors, working as the board's primary boot monitor. On these
|
flash sectors, working as the board's primary boot monitor. On these
|
platforms, it is also normal to reserve a similar amount of flash for
|
platforms, it is also normal to reserve a similar amount of flash for
|
a secondary RAM mode image, which is used when updating the primary
|
a secondary RAM mode image, which is used when updating the primary
|
ROM mode image.</P
|
ROM mode image.</P
|
><P
|
><P
|
>On other platforms, a ROMRAM mode RedBoot image is used as the
|
>On other platforms, a ROMRAM mode RedBoot image is used as the
|
primary boot monitor. On these platforms there is not normally
|
primary boot monitor. On these platforms there is not normally
|
reserved space for a RAM mode RedBoot image, since the ROMRAM mode
|
reserved space for a RAM mode RedBoot image, since the ROMRAM mode
|
RedBoot is capable of updating the primary boot monitor image.</P
|
RedBoot is capable of updating the primary boot monitor image.</P
|
><P
|
><P
|
>Most platforms also contain a FIS directory (keeping track of
|
>Most platforms also contain a FIS directory (keeping track of
|
available flash space) and a RedBoot config block (containing RedBoot
|
available flash space) and a RedBoot config block (containing RedBoot
|
board configuration data).</P
|
board configuration data).</P
|
><P
|
><P
|
>To see the amount of reserved flash memory, run the <B
|
>To see the amount of reserved flash memory, run the <B
|
CLASS="COMMAND"
|
CLASS="COMMAND"
|
>fis
|
>fis
|
list</B
|
list</B
|
> command:
|
> command:
|
<TABLE
|
<TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
>RedBoot> <TT
|
>RedBoot> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>fis list</B
|
>fis list</B
|
></TT
|
></TT
|
>
|
>
|
Name FLASH addr Mem addr Length Entry point
|
Name FLASH addr Mem addr Length Entry point
|
RedBoot 0x00000000 0x00000000 0x00020000 0x00000000
|
RedBoot 0x00000000 0x00000000 0x00020000 0x00000000
|
RedBoot[RAM] 0x00020000 0x06020000 0x00020000 0x060213C0
|
RedBoot[RAM] 0x00020000 0x06020000 0x00020000 0x060213C0
|
RedBoot config 0x0007F000 0x0007F000 0x00001000 0x00000000
|
RedBoot config 0x0007F000 0x0007F000 0x00001000 0x00000000
|
FIS directory 0x00070000 0x00070000 0x0000F000 0x00000000</PRE
|
FIS directory 0x00070000 0x00070000 0x0000F000 0x00000000</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></P
|
></P
|
><P
|
><P
|
>To save flash resources, use a ROMRAM mode RedBoot, or if using
|
>To save flash resources, use a ROMRAM mode RedBoot, or if using
|
a ROM mode RedBoot, avoid reserving space for the RedBoot[RAM] image
|
a ROM mode RedBoot, avoid reserving space for the RedBoot[RAM] image
|
(this is done by changing the RedBoot configuration) and download the
|
(this is done by changing the RedBoot configuration) and download the
|
RAM mode RedBoot whenever it is needed. If the RedBoot image takes up
|
RAM mode RedBoot whenever it is needed. If the RedBoot image takes up
|
a fraction of an extra flash block, it may be possible to reduce the
|
a fraction of an extra flash block, it may be possible to reduce the
|
image size enough to free this block by removing some features.</P
|
image size enough to free this block by removing some features.</P
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="SECT2"
|
CLASS="SECT2"
|
><H2
|
><H2
|
CLASS="SECT2"
|
CLASS="SECT2"
|
><A
|
><A
|
NAME="AEN2641">RAM Resources</H2
|
NAME="AEN2641">RAM Resources</H2
|
><P
|
><P
|
>RedBoot reserves RAM space for its run-time data, and such
|
>RedBoot reserves RAM space for its run-time data, and such
|
things as CPU exception/interrupt tables. It normally does so at the
|
things as CPU exception/interrupt tables. It normally does so at the
|
bottom of the memory map. It may also reserve space at the top of the
|
bottom of the memory map. It may also reserve space at the top of the
|
memory map for configurable RedBoot features such as the net stack
|
memory map for configurable RedBoot features such as the net stack
|
and zlib decompression support.</P
|
and zlib decompression support.</P
|
><P
|
><P
|
>To see the actual amount of reserved space, issue the
|
>To see the actual amount of reserved space, issue the
|
<B
|
<B
|
CLASS="COMMAND"
|
CLASS="COMMAND"
|
>version</B
|
>version</B
|
> command, which prints the RedBoot banner,
|
> command, which prints the RedBoot banner,
|
including the RAM usage:
|
including the RAM usage:
|
<TABLE
|
<TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
>RedBoot> <TT
|
>RedBoot> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>version</B
|
>version</B
|
></TT
|
></TT
|
>
|
>
|
|
|
RedBoot(tm) bootstrap and debug environment [ROM]
|
RedBoot(tm) bootstrap and debug environment [ROM]
|
Non-certified release, version UNKNOWN - built 13:31:57, May 17 2002
|
Non-certified release, version UNKNOWN - built 13:31:57, May 17 2002
|
|
|
Platform: FooBar (SH 7615)
|
Platform: FooBar (SH 7615)
|
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.
|
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.
|
|
|
<SPAN
|
<SPAN
|
CLASS="emphasis"
|
CLASS="emphasis"
|
><I
|
><I
|
CLASS="EMPHASIS"
|
CLASS="EMPHASIS"
|
>RAM: 0x06000000-0x06080000, 0x06012498-0x06061000 available</I
|
>RAM: 0x06000000-0x06080000, 0x06012498-0x06061000 available</I
|
></SPAN
|
></SPAN
|
>
|
>
|
FLASH: 0x00000000 - 0x00080000, 8 blocks of 0x00010000 bytes each.</PRE
|
FLASH: 0x00000000 - 0x00080000, 8 blocks of 0x00010000 bytes each.</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></P
|
></P
|
><P
|
><P
|
>To simplify operations that temporarily need data in free
|
>To simplify operations that temporarily need data in free
|
memory, the limits of free RAM are also available as aliases (aligned
|
memory, the limits of free RAM are also available as aliases (aligned
|
to the nearest kilo-byte limit). These are named
|
to the nearest kilo-byte limit). These are named
|
FREEMEMLO and
|
FREEMEMLO and
|
FREEMEMHI, and can
|
FREEMEMHI, and can
|
be used in commands like any user defined alias:
|
be used in commands like any user defined alias:
|
<TABLE
|
<TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
>RedBoot> <TT
|
>RedBoot> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>load -r -b %{FREEMEMLO} file</B
|
>load -r -b %{FREEMEMLO} file</B
|
></TT
|
></TT
|
>
|
>
|
Raw file loaded 0x06012800-0x06013e53, assumed entry at 0x06012800</PRE
|
Raw file loaded 0x06012800-0x06013e53, assumed entry at 0x06012800</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
>
|
>
|
<TABLE
|
<TABLE
|
BORDER="5"
|
BORDER="5"
|
BGCOLOR="#E0E0F0"
|
BGCOLOR="#E0E0F0"
|
WIDTH="70%"
|
WIDTH="70%"
|
><TR
|
><TR
|
><TD
|
><TD
|
><PRE
|
><PRE
|
CLASS="SCREEN"
|
CLASS="SCREEN"
|
>RedBoot> <TT
|
>RedBoot> <TT
|
CLASS="USERINPUT"
|
CLASS="USERINPUT"
|
><B
|
><B
|
>x -b %{FREEMEMHI}</B
|
>x -b %{FREEMEMHI}</B
|
></TT
|
></TT
|
>
|
>
|
06061000: 86 F5 EB D8 3D 11 51 F2 96 F4 B2 DC 76 76 8F 77 |....=.Q.....vv.w|
|
06061000: 86 F5 EB D8 3D 11 51 F2 96 F4 B2 DC 76 76 8F 77 |....=.Q.....vv.w|
|
06061010: E6 55 DD DB F3 75 5D 15 E0 F3 FC D9 C8 73 1D DA |.U...u]......s..|</PRE
|
06061010: E6 55 DD DB F3 75 5D 15 E0 F3 FC D9 C8 73 1D DA |.U...u]......s..|</PRE
|
></TD
|
></TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></P
|
></P
|
><P
|
><P
|
>To reduce RedBoot's RAM resource usage, use a ROM mode
|
>To reduce RedBoot's RAM resource usage, use a ROM mode
|
RedBoot. The RedBoot features that use most RAM are the net stack, the
|
RedBoot. The RedBoot features that use most RAM are the net stack, the
|
flash support and the gunzip support. These, and other features, can
|
flash support and the gunzip support. These, and other features, can
|
be disabled to reduce the RAM footprint, but obviously at the cost of
|
be disabled to reduce the RAM footprint, but obviously at the cost of
|
lost functionality.</P
|
lost functionality.</P
|
></DIV
|
></DIV
|
></DIV
|
></DIV
|
><DIV
|
><DIV
|
CLASS="NAVFOOTER"
|
CLASS="NAVFOOTER"
|
><HR
|
><HR
|
ALIGN="LEFT"
|
ALIGN="LEFT"
|
WIDTH="100%"><TABLE
|
WIDTH="100%"><TABLE
|
SUMMARY="Footer navigation table"
|
SUMMARY="Footer navigation table"
|
WIDTH="100%"
|
WIDTH="100%"
|
BORDER="0"
|
BORDER="0"
|
CELLPADDING="0"
|
CELLPADDING="0"
|
CELLSPACING="0"
|
CELLSPACING="0"
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="startup-mode.html"
|
HREF="startup-mode.html"
|
ACCESSKEY="P"
|
ACCESSKEY="P"
|
>Prev</A
|
>Prev</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="34%"
|
WIDTH="34%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="ecos-ref.html"
|
HREF="ecos-ref.html"
|
ACCESSKEY="H"
|
ACCESSKEY="H"
|
>Home</A
|
>Home</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="configuring-the-redboot-environment.html"
|
HREF="configuring-the-redboot-environment.html"
|
ACCESSKEY="N"
|
ACCESSKEY="N"
|
>Next</A
|
>Next</A
|
></TD
|
></TD
|
></TR
|
></TR
|
><TR
|
><TR
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="left"
|
ALIGN="left"
|
VALIGN="top"
|
VALIGN="top"
|
>RedBoot Startup Mode</TD
|
>RedBoot Startup Mode</TD
|
><TD
|
><TD
|
WIDTH="34%"
|
WIDTH="34%"
|
ALIGN="center"
|
ALIGN="center"
|
VALIGN="top"
|
VALIGN="top"
|
><A
|
><A
|
HREF="getting-started-with-redboot.html"
|
HREF="getting-started-with-redboot.html"
|
ACCESSKEY="U"
|
ACCESSKEY="U"
|
>Up</A
|
>Up</A
|
></TD
|
></TD
|
><TD
|
><TD
|
WIDTH="33%"
|
WIDTH="33%"
|
ALIGN="right"
|
ALIGN="right"
|
VALIGN="top"
|
VALIGN="top"
|
>Configuring the RedBoot Environment</TD
|
>Configuring the RedBoot Environment</TD
|
></TR
|
></TR
|
></TABLE
|
></TABLE
|
></DIV
|
></DIV
|
></BODY
|
></BODY
|
></HTML
|
></HTML
|
|
|