Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > 965e33040dd61030a94f0eb89877aee8 > files > 5083

howto-html-en-20080722-2mdv2010.1.noarch.rpm

<HTML
><HEAD
><TITLE
>Advice for boot loader authors</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Remote Serial Console HOWTO"
HREF="index.html"><LINK
REL="UP"
TITLE="Gratuitous advice for developers"
HREF="advice.html"><LINK
REL="PREVIOUS"
TITLE="Gratuitous advice for developers"
HREF="advice.html"><LINK
REL="NEXT"
TITLE="Advice for BIOS authors"
HREF="advice-bios.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Remote Serial Console HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="advice.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Appendix F. Gratuitous advice for developers</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="advice-bios.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="ADVICE-BOOTLOADER"
></A
>F.1. Advice for boot loader authors</H1
><P
>Serial console support in a boot loader is very useful.
   Thank you for supporting it.</P
><P
>The boot loader should support the
   <SPAN
CLASS="PRODUCTNUMBER"
>8250A</SPAN
> <SPAN
CLASS="ACRONYM"
>UART</SPAN
> and
   its programming-compatible <SPAN
CLASS="PRODUCTNUMBER"
>82510</SPAN
>,
   <SPAN
CLASS="PRODUCTNUMBER"
>16450</SPAN
>,
   <SPAN
CLASS="PRODUCTNUMBER"
>16550</SPAN
> and
   <SPAN
CLASS="PRODUCTNUMBER"
>16750</SPAN
> descendants.  The serial chip
   used in the <SPAN
CLASS="PRODUCTNAME"
>IBM PC/XT</SPAN
>, the
   <SPAN
CLASS="PRODUCTNUMBER"
>8250</SPAN
> (no A), and its
   <SPAN
CLASS="PRODUCTNUMBER"
>8250B</SPAN
> descendant need not be
   supported.  The <SPAN
CLASS="PRODUCTNUMBER"
>8250A</SPAN
> data sheet is
   <A
HREF="http://www.intersil.com/data/FN/FN2/FN2958/FN2958.pdf"
TARGET="_top"
><I
CLASS="CITETITLE"
><SPAN
CLASS="PRODUCTNUMBER"
>82C50A</SPAN
>
   <SPAN
CLASS="PRODUCTNAME"
>CMOS Asynchronous Communications
   Element</SPAN
></I
></A
> and is updated by Intel's
   errata <A
HREF="http://support.intel.com/support/controllers/peripheral/7513.htm"
TARGET="_top"
><I
CLASS="CITETITLE"
><SPAN
CLASS="PRODUCTNUMBER"
>82510</SPAN
>
   PC Software Compatibility</I
></A
>.  The
   <SPAN
CLASS="PRODUCTNUMBER"
>16550</SPAN
> data sheet is <A
HREF="http://www.national.com/ds/PC/PC16550D.pdf"
TARGET="_top"
><I
CLASS="CITETITLE"
><SPAN
CLASS="PRODUCTNUMBER"
>PC16550D</SPAN
>
   <SPAN
CLASS="PRODUCTNAME"
>Universal Asynchronous Receiver/Transmitter with
   FIFOs</SPAN
></I
></A
>.</P
><P
>To set the serial port and serial parameters, most
   <SPAN
CLASS="ACRONYM"
>Linux</SPAN
> boot loaders use a syntax modeled upon the
   kernel's <TT
CLASS="LITERAL"
>console</TT
> parameter.  It would be nice to
   retain this consistency, since the user needs to learn the kernel
   syntax in any case.</P
><P
>The default value should be 9600<SPAN
CLASS="ABBREV"
>bps</SPAN
>, 8 data
   bits, no parity, 1 stop bit and
   <SPAN
CLASS="ACRONYM"
>CTS</SPAN
>/<SPAN
CLASS="ACRONYM"
>RTS</SPAN
> flow control.  This
   gives the maximum interoperability with the other programs that use
   the serial console.</P
><P
>Please do not ignore the lower speeds, as remote serial
   console is at its most valuable when the computer is located three
   days walk up a mountain in the New Guinea highlands.  It is
   difficult to get more than 75<SPAN
CLASS="ABBREV"
>bps</SPAN
> from
   <SPAN
CLASS="ACRONYM"
>HF</SPAN
> radio under adverse sky conditions.</P
><P
>Be conservative in your use of the modem status lines.  Even
   if you are ignoring incoming status (<SPAN
CLASS="ACRONYM"
>DSR</SPAN
>,
   <SPAN
CLASS="ACRONYM"
>DCD</SPAN
>) and handshaking lines (<SPAN
CLASS="ACRONYM"
>RTS</SPAN
>)
   at least assert the outgoing status (<SPAN
CLASS="ACRONYM"
>DTR</SPAN
>) and
   handshaking (<SPAN
CLASS="ACRONYM"
>CTS</SPAN
>) lines.  Correctly configured
   modems will not receive calls with <SPAN
CLASS="ACRONYM"
>DTR</SPAN
> low, and
   dropping <SPAN
CLASS="ACRONYM"
>DTR</SPAN
> will cause the modem to hang
   up.</P
><P
>Consider that the <SPAN
CLASS="ACRONYM"
>BIOS</SPAN
> may have already
   initialised the <SPAN
CLASS="ACRONYM"
>UART</SPAN
> and provide a configuration
   option to allow the boot loader to be informed of that.  When the
   boot loader initialises the <SPAN
CLASS="ACRONYM"
>UART</SPAN
>,
   <SPAN
CLASS="ACRONYM"
>DTR</SPAN
> will fall and the line will hang up.  In some
   scenarios each hang up requires the satelite circuit to be
   re-booked before another call can be placed. </P
><P
>Cater for line noise.  Imagine the boot loader starting and
   then being sent nonsensical characters every few seconds.  Although
   this is certainly wrong, a fault in a modem is difficult to
   remotely diagnose and correct if the machine is left stranded at
   the boot loader prompt.  A solution is to boot the default image
   upon the expiry of a timer; the boot occurring even if the user (or
   line noise) has started to type.  For example the boot loader
   configuration could say:</P
><DIV
CLASS="INFORMALFIGURE"
><A
NAME="AEN4174"
></A
><P
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
># Start the machine regardless after 30 minutes
#   30 * 60 seconds per minute * units of tenths of seconds
<B
CLASS="COMMAND"
>lifetime 18000</B
></PRE
></FONT
></TD
></TR
></TABLE
><P
></P
></DIV
><P
>The default should be no life timer.  The timer is also
   useful in high availability applications: when a machine is used in
   environments with an planned availability of 99.999% the lifetime
   value should be configured to three minutes or less.</P
><P
>Check information read from the BIOS for reasonablness.  For
   example, if the BIOS's Extended Data Area suggests 0x000 as the
   address for the serial port's registers then don't try to
   initialise the registers.</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="advice.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="advice-bios.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Gratuitous advice for developers</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="advice.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Advice for <SPAN
CLASS="ACRONYM"
>BIOS</SPAN
> authors</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>