Commit Graph

68 Commits

Author SHA1 Message Date
David E. O'Brien
26d9c22460 Inital PowerPC loader build support.
Submitted by:	Benno Rice <benno@jeamland.net>
2000-10-10 13:22:41 +00:00
David E. O'Brien
8bbe68c46b Fix the embeded VCS ID for FreeBSD vs. NetBSD. 2000-10-10 13:15:26 +00:00
David E. O'Brien
f308707531 Architecture-specific setjump()/longjmp() bits for the PowerPC
needed by the loader.

Submitted by:	Benno Rice <benno@jeamland.net>
Obtained from:	NetBSD (Wolfgang Solfrank <ws@@tools.de>)
2000-10-10 13:11:47 +00:00
Paul Saab
2ead0fa6d7 IN_CLASS*() macros assume host order and s_addr is network byte
order, so we must convert them to host order.
2000-09-20 18:16:20 +00:00
Poul-Henning Kamp
fc87418be0 Turn dkcksum() into an __inline function.
Change its type to u_int_16_t.
2000-09-16 13:43:00 +00:00
Paul Saab
4d3367540c Backout last commit. It was wrong.. *sigh* 2000-09-10 01:17:47 +00:00
Paul Saab
6b9a6703e9 include string.h to silence a warning. 2000-09-10 01:10:15 +00:00
Mike Smith
6910d080a2 Expose the NFS root node, so that an evil consumer can use it to get the
NFS filehandle for the root mount.
2000-09-05 22:11:41 +00:00
Mike Smith
ba20acfdb2 Implement readahead buffering for non-raw files. This drastically improves
the efficiency of byte-by-byte read operations on filesystems not already
supported by the block cache (especially NFS).

This should be a welcome change for users booting via PXE, as the loader
now reads its startup files almost instantly, instead of taking tens of
seconds.
2000-09-05 09:52:50 +00:00
Peter Wemm
06a3891a49 Make libstand compile 2000-09-03 11:29:18 +00:00
Peter Wemm
6d93919795 Add the -mpreferred-stack-boundary=2 option to reduce code bloat. We
compile the kernel with this.
2000-08-11 23:18:37 +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
John Baldwin
13ba80d4ce Cleanup warnings by adding missint prototypes, removing unneeded duplicate
prototypes, and adding in several 'const's.  Also, add some missing
$FreeBSD$'s.

Found by:	BDECFLAGS
2000-08-03 09:08:29 +00:00
Jake Burkholder
e39756439c Back out the previous change to the queue(3) interface.
It was not discussed and should probably not happen.

Requested by:		msmith and others
2000-05-26 02:09:24 +00:00
Jake Burkholder
740a1973a6 Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.

Suggested by:	phk
Reviewed by:	phk
Approved by:	mdodd
2000-05-23 20:41:01 +00:00
Peter Wemm
c536ef83f0 Fix the real problem that broke the Alpha loader this last week. It
was not the fault of the module code, nor FICL.  The malloc code requires
sbrk() to return addresses that were at least 16 byte aligned.  If the
Alpha loader happened to be 8 byte but not 16 byte aligned in length, then
you would get a zfree() panic at startup.

Incidently, this affected the i386 loader as well, and explains why
the static heap changed things and why jlemon had trouble when the bss
was not ending at a multiple of 8 bytes.

My fix is to 16 byte align it on all arches, even though the x86 version
only required 8 byte alignment (struct MemNode is smaller there).  We could
page align it if we wanted to be paranoid, but it isn't presently necessary.
2000-05-12 22:43:20 +00:00
Peter Wemm
72c520e887 We compile expressly on the alpha with -mno-fp-regs - so do not use them
explicitly here. This was the original cause of instruction faults on
the Alpha in loader. (not this code, but the same problem in libficl.a)
2000-05-12 21:48:54 +00:00
Paul Saab
d76f1a8cca Fix comment. 2000-05-06 04:50:09 +00:00
Paul Saab
db667a40a5 Add readdir support to the NFS filesystem in libstand. 2000-05-01 15:03:52 +00:00
Paul Saab
f12d45d9d6 Do not attempt to free a nfs node if it is the root node. The root
node is statically allocated and is not guarded, so free will panic
in nfs_close.
2000-05-01 10:53:21 +00:00
Jonathan Lemon
efb8ff8532 Add a readdir function to the loader fsops vector, and implement the
functionality for some of the filesystesms.
2000-04-29 20:47:10 +00:00
Jonathan Lemon
ee8d82ce9f Add ext2fs support to the loader. 2000-04-29 20:44:07 +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
b1875374d3 Break out sendudp and readudp from net.c. This is for PXE, so it
can use its own UDP interface.
2000-04-08 01:18:04 +00:00
Sheldon Hearn
c6ff3a1bf7 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-02 09:14:21 +00:00
David E. O'Brien
f8c1abb102 trailing white space removal. 2000-01-18 07:43:12 +00:00
David E. O'Brien
c35874acaa Add two new functions cd9660_readfile() & cd9660_readdir(), which
cd9660_read() now uses to read CDROMs.  With these changes FreeBSD/Alpha
can now boot from a bootable CDROM.

Submitted by:	dfr
2000-01-18 07:37:10 +00:00
Peter Wemm
c447342094 Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot).  This is consistant with the other
BSD's who made this change quite some time ago.  More commits to come.
1999-12-29 05:07:58 +00:00
Peter Wemm
317b1ddf87 Use the ctype.h version of isascii() - it doesn't loose precision and think
that 0x100 (int) is an ascii character.

Submitted by:	bde
1999-12-28 11:48:23 +00:00
Peter Wemm
59e1f32482 Tidy up some loose ends. nullfs_read/write were returning the wrong value.
Fix some ctype problems - isascii() caused a warning if fed an unsigned
char - it's always > 0 and libstand is compiled with -Wall.
Missing prototype/include in printf.c
1999-12-27 08:45:14 +00:00
Peter Wemm
0fbac2a6c5 longjumperror() and abort() don't exist in libstand.. Don't test
for a condition we can't handle (like the x86 longjmp).  This was
highlighted by attempting to build FICL into the alpha loader.
1999-11-24 13:54:46 +00:00
Doug Rabson
04d5308a6b Change toupper/tolower so that they don't give a bogus answer if the
argument is already upper/lower.
1999-09-11 17:54:37 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Warner Losh
dcb0ae4ed8 More egcs warning fixes:
o use braces to avoid potentially ambiguous else
	o don't default to type int (and also remove a useless register
	  modifier).
	o Use parens around assignment values used as truth values.
	o Remove unused function.

Reviewed by: obrien and chuckr
1999-04-25 22:29:30 +00:00
John Polstra
d7e19a1d6a Don't build with -g. The a.out egcs can't handle it at the moment.
This seems to have snuck back into the Makefile in an unrelated
commit (rev. 1.8).
1999-04-22 15:47:21 +00:00
Daniel C. Sobral
8871c529f8 Remove float-point dependency from i386's version of setjmp()/longjmp(). 1999-02-12 17:22:30 +00:00
Daniel C. Sobral
64b0ea0c05 Copy _setjmp.S from libc in preparation for loader-specific version. 1999-02-12 17:20:19 +00:00
Jordan K. Hubbard
ff834009ea Oops. Missed this in the last commit.
Submitted by: Daniel C. Sobral <dcs@newsguy.com>
1999-02-01 12:32:37 +00:00
Mike Smith
a79658408c POSIX introduced optreset to deal with multiple invocations
of getopt (as in, multiple input lines :). This is documented in the
man page and is used in the code, but unistd.h and stand.h do not
declare it. Incidentally, it prevents me fixing a bug in loader's
code... :-)

PR:		misc/9373
Submitted by:	"Daniel C. Sobral" <dcs@newsguy.com>
1999-01-11 06:01:29 +00:00
Peter Wemm
49a35712aa Remove stray .endif from previous commit (I hope this is right) 1998-11-04 12:49:31 +00:00
Mike Smith
400a056059 Don't need this one anymore. 1998-11-04 07:40:05 +00:00
Mike Smith
b8ffd2a51c Well I never. Seems like _setjmp()/_longjmp() are just what the doctor
ordered.  This brings the Alpha back to parity, and should bring us
BootForth on both platforms.

Submitted by:	John Birrell (jb@freebsd.org)
1998-11-04 07:39:53 +00:00
Mike Smith
1add1a81da Improve the quality of isspace() to match expectations. This should make
the Ficl interpreter read its softwords array OK.
1998-11-04 07:04:00 +00:00
Mike Smith
797ed6379a Don't try to build (nonexistent) Alpha setjmp until we have one. 1998-11-04 00:32:08 +00:00
Mike Smith
25c3957dfd Move setjmp/longjmp implementations here from libc; no signal handling
in libstand, only for i386 until I locate an alpha setjmp/longjmp.

Minimal 64-bit gcc integer support for i386.  This is kinda nasty, and
should be revisited once we decide whether the bootblocks need
quad arithmetic.
1998-11-04 00:23:18 +00:00
Mike Smith
17bcf9c00a Add:
assert()
	setjmp()/longjmp()
	vsprintf()
1998-11-01 09:31:08 +00:00
Mike Smith
2baf3bb5a0 Add a new field to the devsw structure; dv_print, to print all valid units
etc. associated with the device entry.
Consider EOF an 'error' for fgetstr if we haven't read anything yet.

You *MUST* recompile and reinstall libstand before rebuilding the bootstrap.
1998-10-31 02:48:29 +00:00
Doug Rabson
5a911c6263 Implement a hook to allow us to reclaim the memory used by the first stage
of the bootstrap (the bit which loads /boot/loader).
1998-10-19 09:08:40 +00:00
David E. O'Brien
d58fb9293a To clarify last commit, msmith says:
The reason the Alpha has less room than the i386 is because the bootstrap
is given a 256K mapping by the firmware; to add more requires extra work.
1998-10-17 22:20:06 +00:00
Mike Smith
95f5cf3349 Reduce the sbrk() increment from 64K to 4K. There's not much room on the
Alpha, and wasting potentially 64K-4 bytes of RAM just isn't an option.
1998-10-16 19:23:37 +00:00