Commit Graph

18 Commits

Author SHA1 Message Date
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
Peter Wemm
7532a55a62 Fix a warning that's been bugging me for ages. 1998-10-11 10:29:49 +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
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
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
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
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
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
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
c2f9d95de5 This is the new unified bootstrap, sometimes known previously as the
'three-stage' bootstrap.
There are a number of caveats with the code in its current state:
 - The i386 bootstrap only supports booting from a floppy.
 - The kernel and kld do not yet know how to deal with the extended
   information and module summary passed in.
 - PnP-based autodetection and demand loading of modules is not implemented.
 - i386 ELF kernel loading is not ready yet.
 - The i386 bootstrap is loaded via an ugly blockmap.

On the alpha, both net- and disk-booting (SRM console machines only) is
supported.  No blockmaps are used by this code.

Obtained from:	Parts from the NetBSD/i386 standalone bootstrap.
1998-08-21 03:17:42 +00:00