Commit Graph

992 Commits

Author SHA1 Message Date
Marcel Moolenaar
16ed9fd6bb Only install the help file if we can find it. Use ${BASE}.help
in both the condition and for the install. We expect to find
the help file in ${.OBJDIR}.
2002-03-31 20:48:13 +00:00
Marcel Moolenaar
cd2c8e3ef6 Pass the address of the bootinfo block to the kernel in register
r8. Keep it at the hardwired address for now. Bump the version.
2002-03-30 23:52:34 +00:00
Marcel Moolenaar
c459265de7 Pass the physical address of the bootinfo block to the kernel in
register r8. We continue to write the bootinfo block at the same
hardwired address, because the kernel still expects it there.
It is expected that future kernels use register r8 to get to the
bootinfo block and don't depend on the hardwired address anymore.

Bump the loader version once again due to the interface change.
2002-03-30 23:00:05 +00:00
Yoshihiro Takahashi
bd30f72967 MFi386: revision 1.55 2002-03-30 11:18:30 +00:00
Marcel Moolenaar
a918e110c4 Add a quick and dirty way to determine where we're loaded from. We
only care if it's network or not at this time. If we're loaded from
the network, we set currdev (=loaddev) so that the kernel is loaded
from the network as well. In all other cases we initialize to disk.
This makes netbooting more convenient and can easily be enhanced to
do more elaborate checking.
2002-03-30 07:32:08 +00:00
Marcel Moolenaar
4e357dbc58 The EFI loader has been improved a lot since it was first added.
Most significantly (from an interfacing point of view) is the
support for the FPSWA pointer passing. Even though that was added
4 months ago, it's probably not a bad idea to bump the version
number to reflect this.
2002-03-30 04:54:54 +00:00
Marcel Moolenaar
7608f7cb80 Fix the initialization of the protocol:
o  Query the state field of the protocol mode to determine whether
   we need to start and/or initialize the protocol. When we're
   loaded across the network, the protocol has already been started
   and is already initialized. When no networking has happened yet,
   we have to start and initialize the protocol ourselves.
o  After initialization, we have to set the receive filters. Not
   doing this results in a deaf interface. We set the unicast and
   broadcast filters. Multicast may not be supported. This specific
   change fixes the problem we had that we could not netboot if
   the loader was started from the EFI shell.
o  To help future debugging, add a function that dumps the current
   mode of the interface. It's conditional on EFINET_DEBUG.
o  To help in runtime problems, emit a diagnostic message when we
   could not initialize the protocol properly.
2002-03-30 04:50:52 +00:00
Marcel Moolenaar
c61a2c84f0 Don't blindly dereference f->f_devdata as if it's always a pointer to
an efi_devdesc structure. When we're netbooting, f->f_devdata holds
the address of the network socket variable. Dereferencing this caused
some very unpredictable behaviour, including proper functioning.
So, as a sanity check, we first make sure f->f_dev points to our
own devsw. If not, the open will fail before we use f->f_devdata.

This solves the netboot hangs I invariably got whenever I used the
latest toolchain to compile the EFI loader.
2002-03-30 01:36:03 +00:00
Marcel Moolenaar
9423456018 o Make efinet_put a blocking call by waiting for the protocol
layer to signal transmission of the packet. This resolves the
   problem I'm seeing that an immediate call to net->Receive
   after calling net->Transmit returns EFI_DEVICE_ERROR. This
   condition seems to be sufficiently persistent that BOOTP and
   RARP fail.
o  While here, unify all functions to have 'nif' defined. Some
   have it as arguments. The others now have them as locals. We
   now always get the protocol interface by using the 'nif' var.

The current status of netbooting is that even though we now reliably
have BOOTP working (again), opening a file (ie loading a kernel)
across the network causes the loader to hang. I'm working on that now.
2002-03-29 23:10:15 +00:00
Marcel Moolenaar
ede9f03a1a Fix the beforeinstall target. We install ${PROG}.help if loader.help
exists, otherwise we install it anyway. I interpret this as a very
high desire to install ${PROG}.help. Alas, ${PROG}.help doesn't exist
at the moment and neither does loader.help, so in practice this just
doesn't work, no matter how you interpret it. The compromise is to
install ${PROG}.help IFF it exists. I realize we lost creativity with
this commit, but style should have been preserved, AFAICT :-)
2002-03-29 22:53:56 +00:00
David E. O'Brien
10d23bba69 Needs a.out support built into the loader. 2002-03-28 19:09:44 +00:00
Marcel Moolenaar
127d4e90b0 o Don't include sys/cdefs.h 2002-03-28 07:07:45 +00:00
Marcel Moolenaar
95c0f344ee o Add -L${DESTDIR}${LIBDIR} on the link line for -lstand.
o  Add -j .dynstr to objcopy. This makes .efi binaries work
   when built with a 3.x based toolchain.
2002-03-28 06:58:46 +00:00
Marcel Moolenaar
b0d9287123 Duplicate the logic used elsewhere to define LIBSTAND. 2002-03-28 06:52:10 +00:00
David E. O'Brien
77dfe39221 was repocopied to ../boot1 2002-03-28 02:56:05 +00:00
David E. O'Brien
20d9715213 Apparently either gcc or ld, in their infinite wisdom, want to
put a bunch of crap before the code in .text.  Since the firmware
doesn't seem to honour the a.out entry point, we need to include
a little assmbler file which jumps to where we want to be in C.

Submitted by:	jake
2002-03-28 02:41:52 +00:00
David E. O'Brien
0ce1fc3fc3 Opps, bootblock component is no more. 2002-03-28 01:41:23 +00:00
David E. O'Brien
8e5b3e7b5b sparc64 is an ofw consumer. 2002-03-28 01:37:10 +00:00
David E. O'Brien
ef313bf935 Not all platforms have and want a.out format support. 2002-03-28 01:28:21 +00:00
David E. O'Brien
8fa3779837 Add a Makefile for sparc64 at this level. 2002-03-28 01:01:43 +00:00
Pierre Beyssac
038148d678 Add option -n to i386 boot2 to disallow boot interruption by keypress.
PR:		i386/36016
Submitted by:	Thomas Quinot <thomas@cuivre.fr.eu.org>
Reviewed by:	rnordier
MFC after:	1 week
2002-03-23 19:40:27 +00:00
Alfred Perlstein
03d1b8bc94 Remove __P. 2002-03-20 08:00:54 +00:00
Peter Wemm
efcbdfb72b Add EFI write support to loader 2002-03-19 23:05:33 +00:00
Peter Wemm
1d7914a5bd Add -ffreestanding to avoid printf/puts/putchar conversions 2002-03-19 10:51:57 +00:00
Peter Wemm
436122c232 Boot from efifs first. 2002-03-19 10:50:41 +00:00
Peter Wemm
9b6a75edb3 gcc-3.1 likes to have extra { } around the internal array initializers in
the GUID templates.
2002-03-19 10:50:09 +00:00
Maxim Sobolev
fb74e5f595 Add splitfs vfs layer into libstand, which allows loading big kernels and
modules split across several physical medias. Following is how it works:

The splitfs code, when asked to open "foo" looks for a file "foo.split"
which is a text file containing a list of filenames and media names, e.g.

	foo.aa "Kernel floppy 1"
	foo.ab "Kernel floppy 2"
	foo.ac "Kernel and modules floppy"

For each file segment, the process is:

- try to open the file
- prompt "Insert the disk labelled <whatever> and press any key..."
- try to open the file
- return error if file could not be located

RE team is free to use this feature in the upcoming 5.0-DP1.

Reviewed by:	msmith, dcs
2002-03-17 12:18:05 +00:00
Ruslan Ermilov
3a3c44ac20 mdoc(7) police: fix a typo and markup. 2002-03-15 15:12:10 +00:00
Ruslan Ermilov
9662d32c73 Implement -m and -p loader(8) "boot" command options in boot2.
(This is more useful for 4.x where boot blocks can still load
kernels, modulo the PR kern/17422.)
2002-03-13 11:03:36 +00:00
Ruslan Ermilov
3e444868c4 Further document "console" (nullconsole). 2002-03-13 10:55:22 +00:00
Maxim Sobolev
5616599331 CG superfluous prototype. 2002-03-10 22:33:04 +00:00
Robert Drehmel
aa22cb469c Change every occurrence of "bootblock" into "boot1" after
the repo-move from "src/sys/boot/sparc64/bootblock".
2002-03-05 16:39:36 +00:00
Robert Drehmel
83ea6c23b5 - Fix seeking for offsets requiring more than 32 bits.
- Add sanity checks to lookup().
 - Implement the 'l' modifier in printf().

Submitted by:	tmm
2002-03-05 11:22:43 +00:00
Alfred Perlstein
63c6b757ab Support for USB fm radio.
Submitted by: David Yeske <dyeske@yahoo.com>
2002-03-04 03:51:21 +00:00
Jake Burkholder
dd4af53607 Catch up to change in tte format.
Forgetten by:	jake
Submitted by:	tmm
2002-03-01 06:17:28 +00:00
Yoshihiro Takahashi
28a90658c4 Add -D_KERNEL to CFLAGS for ntohl(). 2002-02-28 10:08:23 +00:00
Robert Drehmel
4d79812a7c - Fix indentation and return statements to conform to style(9).
- Use the __FBSDID macro.
 - Fix some warnings.

Submitted by:	obrien (partly)
2002-02-26 10:05:20 +00:00
Bruce Evans
0c6ec4aca0 Declare time(not3) instead of depending on namespace pollution 3 layers
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.
2002-02-25 04:31:25 +00:00
Bruce Evans
fa883367ab Removed mounds of unused variables. 2002-02-25 03:45:09 +00:00
Jake Burkholder
4aaca88542 Keep track of the ttes used to map the kernel and pass them to it as loader
metadata.  Modify tlb handling functions to take a tte, instead of virtual
address, physical address and flags.
2002-02-23 11:06:37 +00:00
Jake Burkholder
90774cfa30 Add -ffreestanding to CFLAGS. 2002-02-23 04:36:15 +00:00
Jake Burkholder
3c5ef798a0 Add make variables for fs support and propagate them to CFLAGS. Put
-ffreestanding in CFLAGS.  Remove unnecessary LDFLAGS.
2002-02-23 04:35:28 +00:00
Jake Burkholder
23b93fc323 Fix test for != 0 that should be > 0. 2002-02-23 04:33:15 +00:00
Jake Burkholder
c2ef11f244 Check the return values of index() and don't dereference it if its null;
the path may not have a ':' in it.  The mac address property is called
mac-address for sparc64.  Don't allocate a dma buffer for sparc64 either.
2002-02-23 04:31:30 +00:00
Jake Burkholder
0c7065ad98 #if 0 more bootinfo stuff. 2002-02-23 04:13:02 +00:00
Jake Burkholder
d112f7bd5b Fix fs support ifdefs. Add tftp support. Add physical and virtual
watchpoint support for debugging (under LOADER_DEBUG).  Claim the
physical and virtual addresses used to map the kernel from the prom;
we map it ourselves behind the scenes though.  Add a reboot command.

Submitted by:	tmm
2002-02-23 04:04:30 +00:00
Jake Burkholder
20dc3b11c5 Allocate a frame on our initial stack so that it doesn't run off into
random memory.  Disable interrupts while loading the tlb.

Submitted by:	tmm
2002-02-23 03:38:18 +00:00
Jake Burkholder
acfdfd647b Add OF_claim_virt() and OF_release_phys().
Submitted by:	tmm
2002-02-23 03:36:04 +00:00
Jake Burkholder
4f265afbc1 Include <machine/metadata.h>. 2002-02-23 03:33:39 +00:00
Chad David
8c09f6fb1f Document the hw.physmem kernel environment variable.
Reviewed by:	alfred
2002-02-21 05:15:52 +00:00