Sophie

Sophie

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

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

<HTML
><HEAD
><TITLE
>What is MILO? </TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.57"><LINK
REL="HOME"
TITLE="Alpha Miniloader Howto"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Introduction "
HREF="intro-section.html"><LINK
REL="NEXT"
TITLE="Pre-Built Standard MILO Images."
HREF="x60.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Alpha Miniloader Howto</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="intro-section.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x60.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="WHAT-SECTION"
>2. What is MILO?</A
></H1
><P
>On Intel based PC systems, the BIOS firmware
sets up the system and then loads the image to be run from the boot 
block of a DOS file system.
This is more or less what MILO does on an Alpha based system,
however there are several interesting differences between BIOS firmware and
MILO, not least of which is that MILO includes and 
uses standard Linux device drivers unmodified.
MILO is firmware, unlike LILO, which relies on the BIOS firmware to 
get itself loaded.
The main functional parts of MILO are:</P
><P
>&#13;<P
></P
><OL
TYPE="1"
><LI
><P
> PALcode,</P
></LI
><LI
><P
> Memory set up code (builds page tables and turns on virtual addressing),</P
></LI
><LI
><P
> Video code (BIOS emulation code and TGA (21030)),</P
></LI
><LI
><P
> Linux kernel code.  This includes real Linux
kernel code (for example, the interrupt handling) and 
ersatz or mock Linux kernel,</P
></LI
><LI
><P
> Linux block device drivers (for example, the floppy driver),</P
></LI
><LI
><P
> File system support (ext2, MS-DOS and ISO9660),</P
></LI
><LI
><P
> User inteface code (MILO),</P
></LI
><LI
><P
> Kernel interface code (sets up the HWRPB and memory map for linux),</P
></LI
><LI
><P
> NVRAM code for managing environment variables.</P
></LI
></OL
>&#13;</P
><P
>The following paragraphs describe these functional parts in more detail.</P
><P
>PALcode can be thought of as a tiny software layer that tailors the
chip to a particular operating system.  
It runs in a special mode (PALmode) which has certain restrictions but it
uses the standard Alpha instruction set with just five extra instructions.
In this way, the Alpha chip can run such diverse operating systems as
Windows NT, OpenVMS, Digital Unix and, of course, Linux.
The PALcode that MILO uses (and therefore Linux itself)
is, like the rest of MILO, freeware.
It is derived from Digital's Evaluation Board software example Digital Unix
PALcode..
The differences between the different PALcodes are because of 
differences in address mapping and interrupt handling that
exist between the Alpha chips (21066 based systems have 
a different I/O map to 21064+2107x systems) and different
Alpha based systems.</P
><P
>For MILO to operate properly it needs to know what memory 
is available, where Linux will eventually be running from and it must be
able to allocate temporary memory for the Linux device drivers.
The code maintains a memory map that has entries for permanent and temporary
allocated pages.
As it boots, MILO uncompresses itself into the correct place in
physical memory.   When it passes control to the Linux kernel,
it reserves memory for the compressed version of itself, the PALcode
(which the kernel needs) and some data structures.
This leaves <TT
CLASS="LITERAL"
>most</TT
> of the memory in the system for Linux itself.</P
><P
>The final act of the memory code is to set up and turn on virtual addressing
so that the data structures that Linux expects to see are at the correct place
in virtual memory.</P
><P
>MILO contains video code that initialises and uses the video device
for the system.   
It will detect and use a VGA device if there is one, otherwise
it will try to use a TGA (21030) video device.   
Failing that, it will assume that there is no graphics device.
The BIOS emulation that the standard, pre-built, images include is
Digital's own BIOS emulation which supports most, if not all, of
the standard graphics devices available.</P
><P
>Linux device drivers live within the kernel and expect 
certain services from the kernel.  Some of these services are provided directly
by Linux kernel code, for example the interrupt handling and some is provided
by kernel look-alike routines.</P
><P
>MILO's most powerful
feature is that you can embed unaltered Linux device drivers into it.
This gives it the potential to support every device that Linux does.
MILO includes all of the block devices that are configured into the
Linux kernel that it is built against as well as a lot of the block device
code (for example, ll_rw_blk()).</P
><P
>MILO loads the Linux kernel from real file systems rather 
than  from boot blocks and other strange places.
It understands MSDOS, EXT2 and ISO9660 filesystems.
Gzip'd files are supported and these are recommended, particularly if
you are loading from floppy which is rather slow.
MILO recognises these by their <I
CLASS="EMPHASIS"
>.gz</I
> suffix.</P
><P
>Built into MILO is a simple keyboard driver which, together with
an equally simple video driver allows it to have a simple user interface.
That interface allows you to list file systems on configured devices, boot
Linux or run flash update utilities and set environment variables that 
control the system's booting.
Like LILO, you can pass arguments to the Kernel.</P
><P
>MILO must tell the Linux kernel what sort of system this is,
how much memory there is and which of that memory is free.
It does this using the HWRPB (Hardware Restart Parameter Block) data 
structure and associated memory cluster descriptions.
These are placed at the appropriate place in virtual memory just before
control is passed to the Linux kernel.</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="intro-section.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x60.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Introduction</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Pre-Built Standard MILO Images.</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>