|
|
It is possible to control where, and how, boot searches for RAM by using either a standalone command defined in /etc/default/boot (see boot(F)) or a bootstring argument as shown in ``Syntax''. The optional range is specified as either:
The start and end addresses, and the size, are specified in either kilobytes (1024 bytes per kilobyte) or megabytes (1024 kilobytes per megabyte); a suffix of k is kilobytes, and m is megabytes.
For example, all of the following mean the 2MB starting at address 1MB:
1m-3m 1m+2m 1024k-3m 1m+2048kThe k or m suffix is required.
The optional flags are:
The default mem= specification is equivalent to:
mem=1m-16m,16m-512m/n
on most machines (plus up to 640KB of base memory).
boot scans each range and 16m-512m
by default, stopping its scan as soon as no memory can be found.
Thus, if there is a ``hole'' in the specified memory range,
all RAM above the first hole in the range will not be found by
boot.
Consider a machine with:
This machine can be specified as:
mem=1m-3m,10m-20m,32720k-32m/d/s
Note that 32720k is the address starting
48k before 32m
(since memory ranges should be aligned on 4KB boundaries).
Since all memory above 16m
is automatically marked as non-DMAable,
the above is equivalent to:
mem=1m-3m,10m-16m,16m-20m/n,32720k-32m/d/s
A simple mem=/p
will print out the memory found automatically. For the example
machine, this is:
Memory found: 0k-512k,1m-3m,16m-20m/nTo print out the memory found for a specific configuration, /p must be included in the mem= specification. Thus, adding /p to the first specification above:
mem=1m-3m,10m-20m,32720k-32m/d/s,/p
would print out the equivalent of the second definition (on the described machine):
Memory found: 0k-512k,1m-3m,10m-16m,16m-20m/n,32720k-32m/d/sOn most machines boot scans the defined memory ranges and deletes from the definition any RAM not actually found. Thus, if the following is specified on the described machine:
mem=1m-5m,12m-25m,31m+1m/d/s,/p
the printed result would be:
Memory found: 0k-512k,1m-3m,12m-16m,16m-20m/n,32720k-32m/d/sNote that the RAM from 10 to 12MB, despite existing, was not found by boot, because it was excluded from the mem= definition.
On most machines, shadowing must be disabled using the machine's setup procedures. boot automatically disables startup ROM shadowing only on a few machines. The RAM hidden by shadowing the startup ROM cannot be used by boot or the UNIX system kernel unless the shadowing is disabled.
If your machine has extended memory,
you will see the following message on booting:
Sizing memory
boot then outputs a dot for every 1MB of memory sized. Memory sizing may take quite some time depending on the amount of memory that boot has to check. If you specified mem=/p at the Boot prompt or in the file /etc/default/boot, a summary of the memory found is printed when sizing has finished.
boot loads the kernel after it has successfully determined the amount of memory available, as shown in this example:
Boot :unix mem=
/pMemory sizing ................... Memory found: 0k-640k,1m-16m,16m-20m/n Loading kernel hd(40)unix .text ............................................................ ............................................................ ........................ Loading kernel hd(40)unix .data ............................................................ ........................ Loading kernel hd(40)unix .bss
System loaded, press <Return> to start:
If a match is obtained for vendor name, then boot checks for the existence of a standalone program called /vendor/name/memory. If this program exists, it is executed; otherwise the current memory detection method is used. The program /vendor/name/memory is used to detect system memory and can contain code specific to a given OEM's products.
This feature permits vendors to provide a standalone program (a small model 8086 x.out binary) that writes the details of memory found into the bootinfo data structure at physical address 0x0800. On success the standalone program returns a status code of 0 to boot. On receiving this status, boot verifies the checksum of the bootinfo structure, then uses the data in it to load the kernel.
(A negative return status from an OEM memory standalone
program causes boot
to return to the command line prompt. A positive result causes boot
to run its own memory detection code.)
Information about developing device drivers is available at the Consolidated Hardware Development (HDK) Web Page