summaryrefslogtreecommitdiffstats
path: root/sys/boot/common
Commit message (Collapse)AuthorAgeFilesLines
* Document the machdep.pccard.pcic_irq tunable, which allows the user to tunemsmith1999-01-291-0/+8
| | | | | | the interrupt which will be given to the PCIC. If the value supplied is illegal or not available, interrupts will be turned off and polled mode used instead.
* Make builtin's state-aware in loader.jkh1999-01-281-14/+106
| | | | | Submitted by: Daniel C. Sobral PR: 9663
* Correctly record the end of the a.out symbol table. In practice, arnordier1999-01-251-3/+3
| | | | | | | | | bootinfo structure where bi_esymtab < bi_symtab was being passed to the kernel. In the case of older 2.x kernels, this was causing garbage to be printed to the video console, followed by an exception. This should resolve a problem reported on -current by Peter Jeremy <peter.jeremy@auss2.alcatel.com.au>.
* bootstrap.hmsmith1999-01-226-141/+87
| | | | | | | | | | | | | | | | | | | | | | 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>
* Fix extraneous free() on error.rnordier1999-01-221-2/+1
|
* Add 'set tunables' help, list the kernel tunable values that can currentlymsmith1999-01-211-0/+18
| | | | be overridden.
* Transition from using Perl to using awk for our text-manipulationmsmith1999-01-182-182/+101
| | | | | | | needs. This removes the dependancy on Perl for the generation of the loader, allowing the world to be built on a perl-free system. Submitted by: Joe Abley <jabley@clear.co.nz>
* Replace duplicated "old" linker set definitions with an include ofjdp1999-01-161-52/+2
| | | | <sys/linker_set.h>. Note, this isn't used on the i386.
* Fall back to /boot/boot.conf, if /boot/loader.rc was not fount. This isabial1999-01-152-12/+20
| | | | | | to cover the transition period. Suggested by: msmith
* Change /boot/boot.conf to /boot/loader.rc - this name reflects what itabial1999-01-131-2/+2
| | | | | | really is. Agreed upon by: jkh, msmith and many others
* Typo in patch application.msmith1999-01-131-2/+2
| | | | | PR: kern/9459 Submitted by: "Daniel C. Sobral" <dcs@newsguy.com>
* No builtin command resets getopt before using it, causingmsmith1999-01-114-3/+10
| | | | | | | | problems in case a wrong option was given previously, and no option is given to the next command. PR: kern/9371 Submitted by: "Daniel C. Sobral" <dcs@newsguy.com>
* Enable escapes for $ to make it possible to insert variable names intomsmith1999-01-102-4/+9
| | | | other variable values.
* Add a description for 'lsdev' so that it shows up in the '?' displaymsmith1999-01-091-2/+3
|
* Fix variable initialization.. It was written with '==' instead of '-'.peter1999-01-041-2/+3
| | | | #include <string.h> for string prototypes.
* Clean some unused variables lintpeter1999-01-041-2/+4
|
* Don't forget a trailing \n when loading a kernel that has been stripped.peter1999-01-041-7/+8
| | | | | (This might make ELF_VERBOSE look funny, but I'm tempted to delete that anyway)
* * Begin integration of built-ins with Forth: leave the exit code fromabial1998-12-223-30/+46
| | | | | | | a built-in command on Forth stack. * Fix a bug which was causing a panic when loading stripped aout kernels. Reviewed by: jkh
* Removed dynamic loading of FileHandlen_hibma1998-12-161-4/+2
|
* Reformat help to improve subtopic display appearance, other minormsmith1998-12-151-5/+5
| | | | | cleaning. The 'help' command in the loader should now be usable and hopefully informative.
* Build the composite help file from the generic and architecture-specificmsmith1998-12-152-1/+224
| | | | help files, sorting topics and subtopics to allow maximum flexibility.
* Fix misallocation of buffer bug (too short)archie1998-11-201-1/+1
|
* This fixes a bug in the bcache code whereby false cache hits occurpaul1998-11-191-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the first time block 0 is read. This fix initialises the block numbers to -1 which isn't the most correct thing for a daddr_t but it isn't likely to cause a problem in the boot blocks and it could do with a more thought out fix later. The bug is probably benign on the i386 but on the alpha it can cause initial file opens to fail. This is the cause of the "can't open /boot/boot.conf" errors. It appears on the alpha because of a number of combining factors. On the alpha the LABELSECTOR is 0 so block 0 needs to be read in from the media. The first time this happens you get a false hit because the bc_blkno field is zero initially. Also, the timestamp check against this cache hit succeeds because on the alpha a hacked getsecs() function can return 0 when it starts counting so that the zero initial timestamp + BCACHE_TIMEOUT is greater than the current time until getsecs() has counted passed BCACHE_TIMEOUT. The overall effect is that the first open() that occurs gets a false cache hit and returns garbage to the bd_strategy() function which then fails the open() call. This false hit then stays in the cache until BCACHE_TIMEOUT getsecs() ticks have passed; all open() calls during this time fail. This explains why you can generally access the media by the time you get to interp() and start issuing commands but the earlier attempts to run the boot scripts are failing. It's possible that this is causing the problem switching to the mfsroot floppy as well but I haven't confirmed that.
* Add documentation for $rootdev.msmith1998-11-131-1/+10
|
* Eliminate much code cruft by extending simple file I/O API to includejkh1998-11-071-4/+9
| | | | | fopen and fclose. Also look for /boot/boot.4th now and, if found, load its contents.
* Don't have debugging on by default - it makes testing annoying. :)jkh1998-11-071-2/+2
|
* Ack. Create parseable command tail properly, and eat args out of the TIB.msmith1998-11-061-2/+5
|
* Don't use the poxy vmGetString interface (who uses counted strings thesemsmith1998-11-061-7/+23
| | | | days?), get the input buffer ourselves. Add some debugging code.
* Remember a bit more of my forth and do:jkh1998-11-051-3/+4
| | | | | | | | | o Add fexists word to check for the presence of a file o make fexists and fload immediate words which DTRT both interpreted and compiled (doh!) o add an init word which gets run at bootstrapping time to do extra post-coldload initialization (in the default implementation, we look for /boot/boot.4th and load it if found).
* Use a smaller default dictionary to waste less space.msmith1998-11-041-2/+2
|
* Add BootForth hooks; if BOOT_FORTH is defined, pass every line readmsmith1998-11-044-5/+155
| | | | | | | to the Forth interpreter. Instantiate all of our inbuilt commands as Forth words, and handle them being called from there. Add my copyright to the bcache module (oops).
* Ok, the entry aging algorithm sucked; 1s time resolution is not enough formsmith1998-11-021-7/+16
| | | | | LRU. Use a 31-bit counter instead. If we decide to do heavy I/O through the bootloader this will have to be revisited.
* Implement a simple LRU block cache. By default this is initialised to 16k,msmith1998-11-023-4/+241
| | | | | | | | | | | | | | 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.
* Standardise on ';' as a component separator; it seems to be a little moremsmith1998-11-021-4/+4
| | | | common than ','.
* * Extend the memory available for the heap from 256k to 512k.dfr1998-10-311-2/+2
| | | | | | | | | * Embed the stack into the bss section for loader and netboot. This is required for netboot since otherwise the stack would be inside our heap. * Install loader and netboot in /boot by default. * Fix getbootfile so that it searches for a ',' instead of a ';' when terminating the filename.
* - Add a new command 'lsdev' to list devices which might be likely to hostmsmith1998-10-315-14/+605
| | | | | | | | | | 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.
* Export an interface for presetting the ISA PnP read port address.msmith1998-10-223-46/+77
| | | | Make the EISA ID formatter generally available
* Make ISA PnP work. This successfully enumerates as many ISA devices as Imsmith1998-10-216-127/+303
| | | | | | | | | | | | 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.
* Load the first page of the file and use the headers in it. This shouldpeter1998-10-171-52/+48
| | | | | avoid the need to seek back to offset zero which is causing trouble on the Alpha with a gzipped kernel.
* "fix" the gzipped kernel load problem by having the loader check that itpeter1998-10-161-22/+33
| | | | | | | can seek back to the first PT_LOAD and doing a close/reopen if it cannot. This is because the first PT_LOAD section includes the ELF headers. This fixes gzipped kernels on the i386, it should solve mike's problem for the Alpha.
* Change some printfs so that ELF_VERBOSE prints meaningful values on the alpha.dfr1998-10-151-3/+3
|
* Tweak the output one more time again. The kernel or module pathnamepeter1998-10-142-5/+6
| | | | is useful, and usually fits all on one line with the load sizes.
* Make the ELF load messages cleaner.peter1998-10-131-8/+17
|
* Only print kernel entry point during load.peter1998-10-121-62/+76
| | | | | | | | | | | | | | | | | | | Drastically quieten down the verbose load progress messages. They were more useful for debugging than anything, but are beyond a joke when loading a few dozen modules. Simplify the ELF extended symbol table load format. Just take the main symbol table and the string table that corresponds. This is what we will be getting local symbols from. (needed for the alpha stack tracebacks). Use the (optional) full symbol tables in lookups. This means we have to furhter distinguish between symbols that can come from the dynamic linking table and the complete table. The alpha boot code now needs to be adapted as ddb/db_elf.c cannot use the simpler format. I have not implemented loading the extended symbol tables from the syscall interface yet, just for preloaded modules. I am not sure about the symbol resolution. I *think* it's possible that a local symbol can be found in preference to a global, depending on the search sequence and dependency tree.
* Only print filename and entry address for the kernel itself. The restpeter1998-10-121-2/+3
| | | | have a meaningless entry as they are relocatable.
* Fix a warningpeter1998-10-111-2/+2
|
* Probe all consoles, not just the first. It doesn't make a lot ofpeter1998-10-111-7/+21
| | | | | | | | | | difference, but might later on when we implement some sort of multi-head console mode. Select a console after probing them all. Don't strdup a potentially NULL return from getenv(). If we don't select an active console, choose the first regardless. Call the console init function, at startup time and on a manual change. The env_setenv() function needs EV_VOLATILE because it's pointing to data that isn't malloc'ed and will cause a fault if it's freed later.
* Cosmetic: After the autoboot timeout, print a \n.peter1998-10-111-2/+6
|
* Implement preloading for elf modulespeter1998-10-091-33/+129
| | | | | | | | - get dependency info from PT_DYNAMIC's DT_NEEDED tags. - store MODINFOMD_DYNAMIC for the kernel's later use setenv kernelname when we have it Fix firstaddr/lastaddr calculation (duh! :-) Explicitly skip string table with section names in it.
* Preload support for a.out KLD not implemented yet. (almost)peter1998-10-091-131/+25
| | | | | | | | KLD modules are *not* PIC. (Shared libs are pic to avoid relocations causing copy-on-write, that's irrelevant here). setenv kernelname when we load it. Use MODINFO_SSYM/ESYM for each symbol section when (if) there are more than one being loaded.
OpenPOWER on IntegriCloud