summaryrefslogtreecommitdiff
path: root/sys/boot/common/bootstrap.h
Commit message (Collapse)AuthorAgeFilesLines
* CG superfluous prototype.Maxim Sobolev2002-03-101-1/+0
| | | | Notes: svn path=/head/; revision=92030
* Declare time(not3) instead of depending on namespace pollution 3 layersBruce Evans2002-02-251-0/+2
| | | | | | | | | | | | | | | | deep in <stand.h> to eventually include <time.h> to declare the user version. This is not quite the right place to declare it, but <stand.h> would be worse because time() is very MD so it isn't in libstand. Many places in the boot sources still get the user version using only 1 layer of pollution (#include <sys/time.h>. Some pollute themselves directly (#include <time.h>). But the boot Makefiles are too broken to enable warnings for redeclarations. Notes: svn path=/head/; revision=91219
* Add a DEVT_CD type for CD drivers.John Baldwin2001-11-051-0/+1
| | | | Notes: svn path=/head/; revision=86090
* Implement the long-awaited module->file cache database. A userlandPeter Wemm2001-09-111-2/+5
| | | | | | | | | | tool (kldxref(8)) keeps a cache of what modules and versions are inside what .ko files. I have tested this on both Alpha and i386. Submitted by: bp Notes: svn path=/head/; revision=83321
* Nuke old gensetdefs based linker sets with extreme prejudicePeter Wemm2001-06-141-45/+2
| | | | Notes: svn path=/head/; revision=78195
* Make the pnp structure a global variable, so it can be used elsewhere.Daniel C. Sobral2000-09-081-0/+4
| | | | Notes: svn path=/head/; revision=65614
* Cleanup warnings. Most of these are signed/unsigned warnings, as well asJohn Baldwin2000-08-031-44/+48
| | | | | | | some added const's. Notes: svn path=/head/; revision=64187
* Delay calling the device cleanup routines until the absolute lastPaul Saab2000-06-141-0/+2
| | | | | | | | | 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. Notes: svn path=/head/; revision=61659
* Back out the previous change to the queue(3) interface.Jake Burkholder2000-05-261-3/+3
| | | | | | | | | It was not discussed and should probably not happen. Requested by: msmith and others Notes: svn path=/head/; revision=60938
* Change the way that the queue(3) structures are declared; don't assume thatJake Burkholder2000-05-231-3/+3
| | | | | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd Notes: svn path=/head/; revision=60833
* Update loader logic to distinguish modules vs. files.Boris Popov2000-05-011-27/+44
| | | | | | | | | | Add support for module metadata. The old way of dependancy handling will be supported for a while. Reviewed by: peter Notes: svn path=/head/; revision=59854
* bcache_strategy() now receives an unit number, and keep track of whatDaniel C. Sobral2000-03-151-0/+1
| | | | | | | | | | | | | was the last unit number received. If it changes, it flushes the cache. Add bcache_flash(). The actual fix is sligthly different from the one in the PR. PR: 17098 Submitted by: John Hood <jhood@sitaranetworks.com> Notes: svn path=/head/; revision=58080
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Walk around the end of all the silly guessing of device types and unitMike Smith1999-07-211-1/+2
| | | | | | | | | | 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. Notes: svn path=/head/; revision=48952
* ABS_SET() and BSS_SET() are no longer used. The sole remaining user ofPeter Wemm1999-06-261-4/+1
| | | | | | | TEXT_SET() is DDB's command tables. Notes: svn path=/head/; revision=48243
* Bring the 'new-bus' to the i386. This extensively changes the way thePeter Wemm1999-04-161-3/+3
| | | | | | | | | | | | | | | | | | | | | i386 platform boots, it is no longer ISA-centric, and is fully dynamic. Most old drivers compile and run without modification via 'compatability shims' to enable a smoother transition. eisa, isapnp and pccard* are not yet using the new resource manager. Once fully converted, all drivers will be loadable, including PCI and ISA. (Some other changes appear to have snuck in, including a port of Soren's ATA driver to the Alpha. Soren, back this out if you need to.) This is a checkpoint of work-in-progress, but is quite functional. The bulk of the work was done over the last few years by Doug Rabson and Garrett Wollman. Approved by: core Notes: svn path=/head/; revision=45720
* Make use of prototypes to silence warnings.Daniel C. Sobral1999-02-041-1/+8
| | | | | | | | | | | | | | | | | | | | | | Change include() so it will be able to load files with forth code, instead of just builtins. Remove #@- from the include section of the help file, since they don't work in the new version of include, unless BOOT_FORTH is not defined. Change bf_run() so it will return the result returned by ficlExec(). Also, make bf_run() push "interpret" to be executed by ficlExec(), since ficlExec() doesn't do it by itself. (Things worked previously because nothing recursed through ficlExec() by the way of bf_run()). Change/extend comments on builtin behavior. Search for "interpret" at the end of bf_init(), so /boot/boot.4th can provide it's own version. Remove dead code. Notes: svn path=/head/; revision=43614
* bootstrap.hMike Smith1999-01-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | help.common interp.c Rename the 'source' command to 'include' in order to avoid conflict with the ANS Forth command of the same name. (kern/9473) interp_forth.c: Changes from kern/9412 (EXCEPTION word), kern/9442 (TIB buffer sizing) and an improved version of kern/9460 (set version numbers). load_aout.c: Trim some obsolete #if 0'ed cruft. pnp.c: Tidy the pnpscan output, turn off the module scanning until we sort out how to do it right. PR: kern/9412 kern/9442 kern/9460 kern/9473 Submitted by: PRs from Daniel Sobral <dcs@newsguy.com> Notes: svn path=/head/; revision=43077
* Replace duplicated "old" linker set definitions with an include ofJohn Polstra1999-01-161-52/+2
| | | | | | | <sys/linker_set.h>. Note, this isn't used on the i386. Notes: svn path=/head/; revision=42713
* Fall back to /boot/boot.conf, if /boot/loader.rc was not fount. This isAndrzej Bialecki1999-01-151-2/+2
| | | | | | | | | to cover the transition period. Suggested by: msmith Notes: svn path=/head/; revision=42682
* Implement a simple LRU block cache. By default this is initialised to 16k,Mike Smith1998-11-021-1/+10
| | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=40834
* Export an interface for presetting the ISA PnP read port address.Mike Smith1998-10-221-1/+9
| | | | | | | Make the EISA ID formatter generally available Notes: svn path=/head/; revision=40597
* Make ISA PnP work. This successfully enumerates as many ISA devices as IMike Smith1998-10-211-16/+65
| | | | | | | | | | | | | | | can fit into my test machine. - Move to using STAILQs rather than ad-hoc singly-linked lists. - Use a mostly procedural interface to the PnP information. This improves data-hiding. Implement a new linker-set technique (currently on i386 only but should work on Alpha as well). This is a good candidate for replacing the current gensetdefs cruft completely. Notes: svn path=/head/; revision=40553
* loader <-> kernel preload module interface constants moved to common file.Peter Wemm1998-10-091-53/+1
| | | | | | | | | Remove Mike's explicit data structures for dependency info. This is done via DT_NEEDED etc in the dynamic section for now. This may need to be revisited later on. Notes: svn path=/head/; revision=40140
* Sync the MODINFO constants with <sys/linker.h>Mike Smith1998-10-091-5/+6
| | | | | | | | | Remove debugging in command_read(). Correctly strip leading controls on script commands. Make 'ls' more DWIM in regard to pathnames. We can still do better. Notes: svn path=/head/; revision=40106
* - VERBOSE_LS is obsolete, as the heap is much better behaved now.Mike Smith1998-10-071-1/+2
| | | | | | | | | | | | | | | | | | - Don't whine about nodes we can't stat(); these are usually symlinks that lead out of the filesystem. - Autoboot is now controlled by $autoboot_delay, which is a value in seconds or NO to disable autoboot. - Don't autoboot at the end of boot.conf if we have already tried. - Add a 'read' command to complement 'echo'. Both are still hidden. - Improve the 'source' command/function so that it is possible to source scripts off removable media. The entire script is read and saved before beginning execution. Script lines beginning with '@' will not be echoed when being executed. Script execution will normally terminate at the first error, however if the script line begins with '-' this behaviour is overriden for that command. Notes: svn path=/head/; revision=40015
* First shot at loading elf symbols. Things are a bit strange becausePeter Wemm1998-10-021-1/+3
| | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=39887
* Uncomment prototype for elf_loadmodulePeter Wemm1998-09-301-2/+2
| | | | Notes: svn path=/head/; revision=39827
* * Add old UFS compatibility code to alpha/boot1.Doug Rabson1998-09-261-2/+3
| | | | | | | | | * 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). Notes: svn path=/head/; revision=39673
* Make the alpha bootstrap build again, fix some warning and change sdboot to ↵Doug Rabson1998-09-201-1/+2
| | | | | | | daboot. Notes: svn path=/head/; revision=39530
* Add a generic hexdump tool for debugging purposes.Mike Smith1998-09-191-1/+2
| | | | Notes: svn path=/head/; revision=39472
* Resynch with working sources before BTX integration.Mike Smith1998-09-141-15/+38
| | | | | | | | | | | | | | - 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. Notes: svn path=/head/; revision=39178
* Generic plug-and-play enumerator infrastructure. Query suppliedMike Smith1998-09-041-1/+24
| | | | | | | | enumerators, crossreference returned identifiers with a text-format database and automatically load corresponding modules and dependancies. Notes: svn path=/head/; revision=38789
* Bootstrap updates.Mike Smith1998-09-031-3/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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() Notes: svn path=/head/; revision=38764
* Bootloader update.Mike Smith1998-08-311-15/+27
| | | | | | | | | | | | | | | - 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> Notes: svn path=/head/; revision=38712
* This is the new unified bootstrap, sometimes known previously as theMike Smith1998-08-211-0/+226
'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. Notes: svn path=/cvs2svn/branches/MSMITH/; revision=38465