Commit Graph

151 Commits

Author SHA1 Message Date
John Baldwin
f251e6cfa1 The Number of Fixed Disks at memory location 0x475 is only 1 byte, not a
2 byte word.  This fixes machines that probe 30-odd hard drives during boot
in the loader.

Submitted by:	Helpful folks at Tyan via ps
2000-11-02 23:28:12 +00:00
Archie Cobbs
474afc4230 Add support for the "nullconsole" console type, for systems with
neither a video console nor a serial port. Use it if the RB_MUTE
flag is set.

Submitted by:	Doug Ambrisko <ambrisko@whistle.com>
Reviewed by:	jhb
2000-09-20 18:13:36 +00:00
Mike Smith
bb65fdf6e0 Export the salient configuration items in a non-pxe-specific namespace
to allow commonality between varying platforms.  This is a step
towards parsing the diskless configuration information with MI code
inside the kernel.

Export the interface hardware address to the kernel, so that it is possible
to determine the boot interface with certainty.

Export the NFS filehandle for the root mount to the kernel, so that the
kernel does not need to perform a mount RPC call.
2000-09-05 22:32:31 +00:00
Paul Saab
646cf5017b Add support to send the string 'PXEClient' as the Vendor class
identifier to the DHCP server.  Now you can check for this string
in your dhcp configuration to decide whether you will hand out a
lease to the client or not.
2000-08-11 08:36:17 +00:00
Paul Saab
f6940c1842 Pass along the interesting variables we were given from DHCP so we
can utilize them in the kernel and with kenv.
2000-08-11 05:31:59 +00:00
John Baldwin
4ae4202e70 Cleanup warnings. Most of these are signed/unsigned warnings, as well as
some added const's.
2000-08-03 09:14:02 +00:00
John Baldwin
c2fa9f3e89 Fix several BDECFLAGS warnings. Also, actually use the 'verbose' parameter
for lsdev when printing out slice information.  Now, you only get the
sizes and LBA's of slices if you use 'lsdev -v'.
2000-08-03 09:09:49 +00:00
John Baldwin
335dd56674 - Add some more details to the 'lsdev' output for FAT file systems.
- Add in support for the EDD (Enhanced Disk Drive) BIOS extensions to
  use LBA mode for accessing drives past cylinder 1024.  This should allow
  us to load a kernel from anywhere on a newer drive up to 2 TB.  Part
  of this came from the PR below.

PR:		i386/13847
Submitted by:	Tor Egge <Tor.Egge@fast.no>
2000-06-19 17:44:40 +00:00
Paul Saab
cc3d937224 Delay calling the device cleanup routines until the absolute last
moment.  We were cleaning up after PXE too early and the module
dependancy code would not be able to load any files if it needed
too.
2000-06-14 10:34:29 +00:00
Paul Saab
482cb52dcb Wrap the failure warnings around PXE_DEBUG in the cleanup routine.
It does not matter if they fail, so dont print anything about it
unless we are debugging.
2000-05-01 17:55:05 +00:00
Boris Popov
801e789e01 Update loader logic to distinguish modules vs. files.
Add support for module metadata. The old way of dependancy
handling will be supported for a while.

Reviewed by:	peter
2000-05-01 17:41:25 +00:00
Paul Saab
95394e643f Fall back to /pxeroot as the location of the NFS exported directory
if we are not given one by dhcp.
Remove extra includes while I am here.

Reminded by:	jlemon
2000-04-29 23:08:49 +00:00
Jonathan Lemon
8e30378f89 Teach the loader about the ext2fs filesystem, extended partitions, and
the new readdir function.
2000-04-29 20:49:33 +00:00
Paul Saab
f14ad6978f Make PXE do a dhcp request to find out where its files are. The
DHCP server is no longer required to also act as the NFS/TFTP
server.
2000-04-27 12:30:28 +00:00
Paul Saab
e7fd6f003e Don't report errors when we UDP_WRITE fails with a status of 1. 2000-04-27 03:23:50 +00:00
Paul Saab
d08ae64b1d Bring support in for Intel Wired for Management 1.1 (PXE 0.99 and
below).  This did not work previously because interrupts were
disabled when PXE calls were being made, and they must be enabled.
This should also allow us to be compliant with all newer PXE rom's
from Intel.

For PXE 0.99, this has been tested using the Intel N440BX motherboard
and I am confident it will work on the Intel L440GX motherboard.

Lots of help/information from: jhb, peter

I would like to thank Michael Johnston <michael.johnston@intel.com>,
Mike Henry <mike.henry@intel.com>, and all the other PXE developers
at Intel for their help, and information in helping solve this
problem.
2000-04-26 07:38:40 +00:00
Paul Saab
43e797fd31 Move the building of the PXE module into libi386. 2000-04-21 22:06:02 +00:00
Paul Saab
2339dc037f Make the loader a little smarter about when it is and is not allowed
to call PXE.
2000-04-21 04:58:51 +00:00
Paul Saab
5d5b2077f1 Don't call the PXE cleanup routine if PXE is not enabled. This
should fix the "Invalid partition table" error people were seeing.
2000-04-21 03:04:16 +00:00
Paul Saab
6450dd3cb4 Add a cleanup function. This is needed for PXE where you should
shutdown the UNDI and unload the stack.
2000-04-20 00:06:15 +00:00
Paul Saab
e938899cc3 Use !PXE api over PXENV+ api.
Magic trampoline by: peter (at 4am and after a good whipping at airhockey)
Do a better job of returning and detecting errors.
2000-04-19 11:22:38 +00:00
Jordan K. Hubbard
4fbd258bcc Nuke duplicate struct declaration from somebody's paste-o 2000-04-08 22:50:18 +00:00
Paul Saab
d8af287caf Make PXE use the UDP API. This allows for both TFTP and NFS support.
You may specify TFTP or NFS via compile time options in the loader,
but not both at this time.

Also, remove a warning about not knowing how to boot from network
devices.  We can obviously do that now.
2000-04-08 01:22:14 +00:00
Paul Saab
dbe3e0f575 Add a missing PXE API call and structure. 2000-04-04 07:28:54 +00:00
Paul Saab
2efc827d19 Add all the PXE related structures from the 2.1 PXE spec from Intel.
Fix exsisting code to match the spec.
2000-04-04 00:38:59 +00:00
John Baldwin
48a0c4ea04 Mega i386 loader commit.
- Don't hard code 0x10000 as the entry point for the loader.  Instead add
  src/sys/boot/i386/Makefile.inc which defines a make variable with the
  entry point for the loader.  Move the loader's entry point up to
  0x20000, which makes PXE happy.
- Don't try to use cpp to parse btxldr for the optional BTXLDR_VERBOSE,
  instead use m4 to achieve this.  Also, add a BTXLDR_VERBOSE knob in the
  btxldr Makefile to turn this option on.
- Redo parts of cdldr's Makefile so that it now builds and installs cdboot
  instead of having i386/loader/Makefile do that.  Also, add in some more
  variables to make the pxeldr Makefile almost identical and thus to ease
  maintainability.
- Teach cdldr about the a.out format.  Cdldr now parsers the a.out header
  of the loader binary and relocates it based on that.  The entry point of
  the loader no longer has to be hardcoded into cdldr.  Also, the boot
  info table from mkisofs is no longer required to get a useful cdboot.
- Update the lsdev function for BIOS disks to parse other file systems
  (such as DOS FAT) that we currently support.  This is still buggy as
  it assumes that a floppy with a DOS boot sector actually has a MBR and
  parses it as such.  I'll be fixing this in the future.
- The biggie:  Add in support for booting off of PXE-enabled network
  adapters.  Currently, we use the TFTP API provided by the PXE BIOS.
  Eventually we will switch to using the low-level NIC driver thus
  allowing both TFTP and NFS to be used, but for now it's just TFTP.

Submitted by:	ps, alfred
Testing by:	Benno Rice <benno@netizen.com.au>
2000-03-28 01:19:53 +00:00
John Baldwin
7be31bb1b2 Remove some extra spammage that made it into this commit. This will be
revisited later with a better fix, or at least one that compiles. :)

Approved by:	dcs
2000-03-15 16:36:55 +00:00
Daniel C. Sobral
7b12e51659 Pass an unit number to bcache_strategy, so it can flush the cache when
necessary. Pass an absolute block number too, instead of receiving a
relative one in realstrategy(), as bcache_strategy() requires this.

The fix is sligthly different from the one in the PR.

PR:		17098
Submitted by:	John Hood <jhood@sitaranetworks.com>
2000-03-15 01:58:45 +00:00
Mike Smith
627249c7b1 Substantially revamp the way that we determine the amount of memory available
for our use.  Use the same search order for BIOS memory size functions
as the kernel will later use.

Allow the loader to use all of the detected physical memory (this will
greatly help people trying to load enormous memory disk images).

More correctly handle running out of memory when loading an object.

Use the end of base memory for the top of the heap, rather than
blindly hoping that there is 384k left.

Add copyrights to a couple of files I forgot.
1999-12-29 09:54:46 +00:00
Poul-Henning Kamp
7d5961670c Remove BAD144 support, it has already been disabled for some time. 1999-12-08 09:33:00 +00:00
Daniel C. Sobral
33ebc8c952 Make the "machine" target a prequisite to all source files.
Hinted-at by: bde
1999-10-19 03:53:59 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Mike Smith
73332890ea Walk around the end of all the silly guessing of device types and unit
numbers that we have been doing in the past, and read /etc/fstab off the
proposed root filesystem to determine the actual device name and vfs
type for the root filesystem.  These are then exported to the kernel
via the environment variable vfs.root.mountfrom.
1999-07-21 00:08:54 +00:00
Robert Nordier
f841485278 Fill in bi_bios_geom[] in the bootinfo structure passed to the kernel.
This should resolve the problem raised in PR 12315, and incidentally
makes it easier to determine what geometry the BIOS is actually using
(by way of boot -v and dmesg).
1999-06-21 18:27:02 +00:00
Guy Helmer
3d8993c197 Modify the boot loader to recognize the -C flag and pass the RB_CDROM
flag to the kernel to mount a CDROM as the root filesystem.  Alternatively,
the boot_cdrom env var can be set.

As Mike Smith noted, "-C is the "wrong" way to do this", but this is
an acceptable stopgap in lieu of a better way.

PR:		bin/11884
Reviewed by:	msmith@freebsd.org
1999-06-04 03:18:28 +00:00
Daniel C. Sobral
76bd51f729 Avoid copying m_args if none exists. (Perhaps this is a better solution,
Doug?)
1999-03-18 14:36:22 +00:00
Daniel C. Sobral
445a035707 Add MODINFO_ARGS, parameters passed to a module at load time.
VS: ----------------------------------------------------------------------
1999-03-08 11:05:52 +00:00
Robert Nordier
ab19eb8230 Fix a couple of further bugs: missing argument to sprintf() and
"==" used for "=".
1999-01-25 23:07:02 +00:00
Mike Smith
84ef5a8f66 Bleh. Missing 'unit =' doesn't help legacy num_ide_disks code.
PR:		bin/9651
Submitted by:	"Daniel C. Sobral" <dcs@newsguy.com>
1999-01-24 06:03:44 +00:00
Mike Smith
c679ae39a8 biosdisk.c
Implement a new variable 'root_disk_unit' which supersedes
	'num_ide_disks' and makes it possible to explicitly set the
	root device unit number regardless of type considerations.

bootinfo.c
	If we can't calculate a dev_t for the root disk, complain and
	don't proceed to boot with an invalid boot device.
1999-01-24 00:12:04 +00:00
Robert Nordier
d0a4f5ea63 Fix read error not being detected. 1999-01-22 18:32:52 +00:00
Steve Price
24d156f499 Remove redundant line of code.
PR:		9364
Submitted by:	Daniel C. Sobral <dcs@newsguy.com>
1999-01-10 18:22:23 +00:00
Robert Nordier
c03fa7f977 Use etc/make.conf settings for serial port and speed.
Submitted by: rvb
Reviewed by: bde
1999-01-10 14:48:05 +00:00
Mike Smith
ee5799c4ee Extend bd_print() so that it displays slices and partitions on disks. 1999-01-09 02:36:19 +00:00
Peter Wemm
e423230b0d Fix a potential sign extension bug on 8-bit chars.
Outputting a backspace isn't supposed to be destructive..  It isn't on
most terminals, nor on the standard bios output (vs. TERM_EMU mode)
1999-01-04 18:45:08 +00:00
Andrzej Bialecki
de37e4a6d2 Add back ability to make beeps when using new TERM_EMU.
Submitted by:	W Gerald Hicks <wghicks@bellsouth.net>
1998-12-31 13:44:04 +00:00
Andrzej Bialecki
cf9443f92b Add simple terminal emulator, compatible with cons25. Currently supported
capabilities are: AF, AB, cm, ho, me, cd. The code is hidden behind
-DTERM_EMU - should it cause any problems, you can remove this define
to get back the old behaviour.

You'll find some examples how to use it in src/share/examples/bootforth.

Reviewed by:	jkh
1998-12-22 11:51:25 +00:00
Robert Nordier
5103ed619b Drop use of BIOS int 0x14 services in favor of direct port I/O.
Feedback and testing: Adrian Filipi-Martin <adrian@ubergeeks.com>
1998-11-22 07:59:16 +00:00
Mike Smith
8f0a6b5b8c Add a new variable $num_ide_disks which is used to offset the unit number
for SCSI disks when converting from BIOS unit numbers to da unit numbers.

Prompted by Kevin Street <street@iname.com>
1998-11-13 23:40:02 +00:00
Mike Smith
af1f6e0673 Implement a simple LRU block cache. By default this is initialised to 16k,
and will bypass transfers for more than 8k.  Blocks are invalidated after
2 seconds, so removable media should not confuse the cache.

The 8k threshold is a compromise; all UFS transfers performed by
libstand are 8k or less, so large file reads thrash the cache.
However many filesystem metadata operations are also performed using
8k blocks, so using a lower threshold gives poor performance.

Those of you with an eye for cache algorithms are welcome to tell me
how badly this one sucks; you can start with the 'bcachestats' command
which will print the contents of the cache and access statistics.
1998-11-02 23:28:11 +00:00
Mike Smith
dc8be6a8f5 - Add a new command 'lsdev' to list devices which might be likely to host
filesystems.
 - New 'help' command and data in the help.* files (not yet installed),
   provides topic and subtopic help, indexes, etc.
 - Don't crash if the user tries to set an invalid console.  Be helpful
   instead.
 - Expand tabs (badly) on the i386 video console.
 - Some minor cosmetic changes.
1998-10-31 02:53:12 +00:00
Luoqi Chen
36159e3d1e Fix an uninitialized variable in the `dangerously dedicated disk' case. 1998-10-30 07:15:52 +00:00
Mike Smith
8879e57b3e Simplify the "is a character ready" test, so that we don't return a false
negative for keypresses with zero ascii values.  This is in line with the
comconsole test, rather than being more ambitious.

Submitted by:	rnordier
1998-10-28 19:24:15 +00:00
Mike Smith
4558ccdf6f Remove a debugging copy of offsetof() that snuck in. 1998-10-23 22:30:52 +00:00
Mike Smith
a1c0b1c5c5 PnP enumerator using the PCI BIOS. This is needlessly complex due to the
lack of a simple "enumerate all PCI devices" function.
1998-10-23 22:29:08 +00:00
Mike Smith
8d35fb65a0 PnP BIOS enumerator; mostly useful for hunting PnP devices that are supported
by the system BIOS rather than supporting ISA PnP.
1998-10-22 20:25:06 +00:00
Mike Smith
13aedae3d7 Add biospnp.c 1998-10-22 20:23:15 +00:00
Mike Smith
c90625d230 Don't depend on being part of the kernel tree. If we are, use the kernel's
<machine> includes rather than the system's.
1998-10-21 20:07:57 +00:00
Peter Wemm
f03d6f87b3 Get the last used address via a more conservative method, don't depend
on the module chain being in increasing address order.
1998-10-15 17:06:36 +00:00
Peter Wemm
eb9022e791 Try and get the sys/* and machine/* includes via relative paths. This
saves having to do a 'make includes' after touching any header file for
the boot code.
1998-10-14 07:08:16 +00:00
Peter Wemm
2a26e9ea83 Align to sizeof(long) rather than sizeof(int32_t). It needs to be
long because this code is shared with the alpha.  I hope the alpha can
read 32 bit ints at 32 bit alignment (vs. 64 bit alignment).
1998-10-14 05:07:23 +00:00
Peter Wemm
7532a55a62 Fix a warning that's been bugging me for ages. 1998-10-11 10:29:49 +00:00
Peter Wemm
7d9cbdec8f Only call vidc_init() once (unless forced).
Cosmetic change to the init-time character eater (like, make it increment
the index counter - if there's a problem, it would sit there in an infinite
loop instead of only running 10 times).
1998-10-11 10:07:52 +00:00
Peter Wemm
a1c1935fa8 Fix comconsole mode. The int 0x14 read and status commands were reversed.
Also, make sure we set %dx each time around otherwise the commands
suddenly start trying to work on things like com92 instead of com1.
Make sure comc_init() is only run once.
Cosmetic change to init-time character eater.
1998-10-11 10:05:13 +00:00
Peter Wemm
1206a4f594 Warn that one of the DEBUG statements has a v86 recursion bug. 1998-10-11 10:01:55 +00:00
Peter Wemm
00fe329527 Fix comment to match code 1998-10-11 09:53:30 +00:00
Peter Wemm
7deb2dabef Attempt to at least align MODINFO_* blocks. IMHO, decoding this stuff
should be MD code since one day we'll have to recover pages from deleted
preload data.  MI code can't be expected to know how to deal with pmap
internals, assuming it gets done via pmap that is. :-)
1998-10-09 23:24:55 +00:00
Peter Wemm
1d59e49683 Turn symbol table info passing back on, although it's probably not
particularly useful in this form.  KLD can deal with it much better.
setenv kernelname moved earlier.
1998-10-09 23:22:30 +00:00
Peter Wemm
f62f10b275 Remove kernelname setenv, the common code does it.
Use the metadata for symtab pointers, mainly to keep it common with
elf_freebsd.c.
1998-10-09 23:20:47 +00:00
Mike Smith
cab57be9ae Remove some debugging code.
Do a much better job of DWIM with partial device specifications.
Fix the module metadata build process, which was completely broken.
Use a larger read buffer when copying large objects in; this
improves performance marginally and will avoid flushning any small caches
we might choose to implement.
1998-10-09 07:11:19 +00:00
Peter Wemm
e3de88f4ff Fix that pesky boot aguments parsing bug. (I think :-) 1998-10-07 10:55:46 +00:00
Mike Smith
ee4f7b62a0 Request the flags back when checking for keyboard status.
Submitted by:	rnordier
1998-10-07 07:34:31 +00:00
Mike Smith
0f7d15efd8 - Drain the keyboard buffer when initialising.
- Be pedantic about the return from int 16 fn 01.
1998-10-07 02:39:06 +00:00
Mike Smith
afcd516b82 bootinfo.c
Strip any device name information from the kernel name
	before passing it in.

biosdisk.c
	Be more strict about matching device names to slice entries.
	Only allow unsliced syntax on unsliced disks.
1998-10-06 07:27:05 +00:00
Mike Smith
5f8edb2c4d Don't include ELF symbol information yet - it causes the ELF DDB to
explode.
1998-10-04 20:58:46 +00:00
Mike Smith
58b7e8766e biosdisk.c
Allocate space for, and copy, NDOSPART slice entries from the
	MBR, not just one.  Add some extra debugging while we're at it.

elf_freebsd.c
	Initialise the symbol table start/end pointers in case we don't
	have them.
1998-10-04 09:12:15 +00:00
Robert Nordier
0860fb8f8c bootinfo bi_vesa no longer exists. 1998-10-03 14:13:30 +00:00
Mike Smith
bf72f68088 Consolidate the bootinfo-loading code, greatly simplifying the _exec
functions.
1998-10-02 20:53:17 +00:00
Mike Smith
6b15efd961 aout_freebsd.c
Use bd_getdev() to work out a dev_t for the root device.
	Allow $rootdev to override $currdev as the root device.

biosdisk.c
	Save the slice table and disklabel when opening a disk.
	Add bd_getdev(), which attempts to return a dev_t corresponding
	to a given device.  Cases which it still doesn't get right:
	 - The inevitable da-when-wd-also-exists
	 - Disks with no slice table (the slice number is not set correctly)
	The first is difficult to get right, the second will be
	fixed in an upcoming commit.

comconsole.c
vidconsole.c
	getchar() should return an 8-bit value; some BIOSsen pack extra
	information in %eax.

libi386.h
	Remove some stale prototypes, add new ones.
1998-10-02 16:32:45 +00:00
Peter Wemm
2e06076f23 First shot at loading elf symbols. Things are a bit strange because
of the ..umm.. "wierd" way binutils lays out the file.  The section
headers are nearly at the end of the file and this is a problem when
loading from a .gz file which can't seek backwards (or has a limited
reverse seek, ~2K from memory).

This is intended to be compatable with the ddb/db_elf.c code and the
alpha/libalpha/elf_freebsd.c layout.  I've studied these (which are NetBSD
derived) but did it a bit differently.  Naturally the process is similar
since it's supposed to end up with the same result.
1998-10-02 08:04:56 +00:00
Peter Wemm
f511533b56 Stop libi386.a from being installed.. 1998-09-30 22:36:45 +00:00
Peter Wemm
d1a50365db i386 ELF loader startup backend. On an ELF kernel booted with the 3-stage
bootblocks, the kernel shows up as the primary module:

[3:24am]~-100# kldstat
Id Refs Address  Size     Name
 1    1 0xf0100000 ff00000  /kernel
		   ^^^^ oops.. :-)

Based heavily on aout_freebsd.c.  Hmm.. There's so much in common that
these could probably be combined and just check the metadata to see which
format it is.
1998-09-30 19:48:09 +00:00
Peter Wemm
e6001c6229 Save booted kernel name. Cosmetic cleanups. 1998-09-30 19:42:06 +00:00
Peter Wemm
f9489e6a0e Fix typos.. The vector for "int 0x12" (get base mem) is not written in
hex as "0x1a". :-)
Fix a comment about the extended memory checks, that's int 0x15.
1998-09-30 19:41:07 +00:00
Peter Wemm
a7de32b2aa The bootinfo struct was getting clobbered or not passed through correctly.
Presumably VTOP doesn't work for static objects.
The easiest way to get it working was to reserve some space after the
environment strings and copy the bootinfo struct there.
Also, set RB_BOOTINFO, it's needed.

I got the code to load and run an unmolested kernel OK for the first time
with this system a few minutes ago - at last!.  I did have to stop it
looking at the floppy though as BTX was trapping a mode 14 fault when
it look for /boot/boot.conf when no disk was in the drive. (I'm booting
from a scsi disk (bios disk 0x80)).

Now to teach it about ELF and modules :-)
1998-09-29 09:11:49 +00:00
Peter Wemm
38e1ef0f4a Only bcopy the correct amount of data from the buffer in case it is ever
in an overrun situation.
1998-09-28 22:04:54 +00:00
Peter Wemm
699f872732 Reactivate the a.out kernel loader code. 1998-09-28 22:01:20 +00:00
Peter Wemm
3165db6cbf Missing return value that was kinda important. 1998-09-28 21:59:21 +00:00
Peter Wemm
5eec23025f Argh, I don't believe how much time I wasted looking for this...
Bytes of extended memory = (extkb * 1024), not (extkb + 1024)
1998-09-28 21:39:11 +00:00
Peter Wemm
35f4587669 MBR magic is 0x55aa not 0xffaa. 1998-09-28 20:08:34 +00:00
Peter Wemm
3cae2e80aa Precedence bug (?) causing probe problems. 1998-09-28 20:07:39 +00:00
Doug Rabson
e24168e6c3 * Add old UFS compatibility code to alpha/boot1.
* Fix a raft of warnings, printf and otherwise.
* Allocate the correct amount in mod_searchmodule to prevent an overflow.
* Fix the makefiles so they work outside my home directory (oops).
1998-09-26 10:51:38 +00:00
Mike Smith
2fc3f8fb29 The BIOS can't perform a floppy operation where the destination crosses
a physical 64k boundary.  Allocate a bounce buffer for such a transaction.
1998-09-26 01:30:20 +00:00
Mike Smith
b6dc8cf656 - Improve debugging code.
- Make the "what do we do with a drunken disklabel" if-then-else-regardless
   tangle easier to read.
 - Don't count on the v86 structure being preserved between loop iterations,
   as it may be trampled eg. by the DEBUG call.
1998-09-19 01:33:29 +00:00
Mike Smith
819ab203c3 Synch with development version. Compiles and opens but doesn't work yet. 1998-09-18 02:02:33 +00:00
Mike Smith
b521106fc5 We lost all the files in crt/, so define the BIOS sector size here instead. 1998-09-18 01:12:46 +00:00
Mike Smith
948486abe3 Initial integration of the i386 bootloader and BTX.
- Discard large amounts of BIOS-related code in favour of the more compact
   BTX vm86 interface.
 - Build the loader module as ELF, although the resulting object is a.out,
   make gensetdefs 32/64-bit sensitive and use a single copy of it.
 - Throw away installboot, as it's no longer required.
 - Use direct bcopy operations in the i386_copy module, as BTX
   maps the first 16M of memory.  Check operations against the
   detected size of actual memory.
1998-09-17 23:52:16 +00:00
Mike Smith
0d5d0b20dc Resynch with working sources before BTX integration.
- Use format-independant module allocator.
 - Conditionalise ISA PnP support.
 - Simplify PnP enumerator interface.
 - Improve module/object searching.
 - Add missing depend/install targets in BTX makefiles.
 - Pass the kernel environment and module data in extended bootinfo fields.
 - Add a pointer to the end of the kernel + modules in bootinfo.
 - Fix parsing of old-style kernel arguments.
1998-09-14 18:27:06 +00:00
Mike Smith
06b57b0e09 Bootstrap updates.
- Move some startup code from MD to MI sections
 - Add a 'copyout' and some copyout-related functions.  These will be
   obsoleted when BTX is available for the 386 and the kernel load
   area becomes directly addressable.
 - Add the ability load an arbitrary file as a module, associating
   and arbitrary type string with it.  This can be used eg. for loading
   splash-screen images etc.
 - Add KLD module dependancy infrastructure.  We know how to look for
   dependancies inside KLD modules, how to resolve these dependancies
   and what to do if things go wrong.  Only works for a.out at the
   moment, due to lack of an MI ELF loader.  Attach KLD module information
   to loaded modules as metadata, but don't pass it to the kernel (it
   can find it itself).
 - Load a.out KLD modules on a page boundary.  Only pad the a.out BSS
   for the kernel, as it may want to throw symbols away.  (We might want
   to do this for KLD modules too.)
 - Allow commands to be hidden from the '?' display, to avoid cluttering
   it with things like 'echo'.  Add 'echo'.
 - Bring the 'prompt' command into line with the parser syntax.
 - Fix the verbose 'ls'; it was using an uninitialised stack variable.
 - Add a '-v' flag to 'lsmod' to have it display module metadata as well
   (not terribly useful for the average user)
 - Support a 'module searchpath' for required modules.
 - The bootstrap file on i386 is now called 'loader' to permit the
   /boot directory to use that name.
 - Discard the old i386 pread() function, as it's replaced by
   arch_readin()
1998-09-03 02:10:09 +00:00
Mike Smith
c73b70eec4 Bootloader update.
- Implement a new copyin/readin interface for loading modules.
   This allows the module loaders to become MI, reducing code duplication.
 - Simplify the search for an image activator for the loaded kernel.
 - Use the common module management code for all module metadata.
 - Add an 'unload' command that throws everything away.
 - Move the a.out module loader to MI code, add support for a.out
   kld modules.

Submitted by:	Alpha changes fixed by Doug Rabson <dfr@freebsd.org>
1998-08-31 21:10:43 +00:00