Commit Graph

29 Commits

Author SHA1 Message Date
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
127d4e90b0 o Don't include sys/cdefs.h 2002-03-28 07:07:45 +00:00
Peter Wemm
efcbdfb72b Add EFI write support to loader 2002-03-19 23:05:33 +00:00
Peter Wemm
24ffe931b9 Lookup the EFI_FPSWA driver and pass the interface pointer through to the
kernel before we call ExitBootServices().  I've typed the definitions
in efifpswa.h from the Intel FPSWA manual (urk).
2001-11-19 07:09:47 +00:00
Peter Wemm
de76c8189e Remove bootinfo.bi_kernel. It isn't used by the kernel. struct bootinfo
should go away on ia64, we should be loader metadata based since that is
the only way we can boot (loader, skiload).
2001-11-19 07:05:10 +00:00
Marcel Moolenaar
997313be99 Set RB_MULTIPLE (multiple console support) if the kernel is booted
with the -D flag.
2001-10-29 01:11:40 +00:00
Doug Rabson
4abfff1e2e Call ExitBootServices and disable interrupts before we start hacking
the VM registers. This ought to make things slightly more reliable here.
2001-10-25 08:53:39 +00:00
Doug Rabson
7d5af294dc Add the two sections used for PLT entries to the text and sdata sections
respectively. This makes IPLTLSB relocations work properly (these are
generated for weak symbols, particularly for _longjmp).
2001-10-25 08:50:14 +00:00
Doug Rabson
88f5f7ac50 Try to get the self-relocator to work with IPLTLSB relocations. Doesn't
work right though - I can't figure out why.
2001-10-24 20:14:49 +00:00
Doug Rabson
65601f6da8 Fix typo in comment. 2001-10-11 13:47:20 +00:00
Doug Rabson
bc14d41c7e Return the mapkey which EFI gave us when we read the memory map - we need
it to call ExitBootServices.
2001-09-24 19:37:44 +00:00
Doug Rabson
6544e18249 Tidy up a little - don't try to print anything or enable interrupts after
we start changing translation registers. Also, call ExitBootServices
before we jump into the kernel.
2001-09-24 19:36:45 +00:00
Doug Rabson
6dd44dacaa Pick up pal.s from the kernel sources. 2001-09-24 19:31:44 +00:00
Doug Rabson
1271403685 * Flesh out elf_exec and bootinfo.
* Add EFI network support.
2001-09-22 19:10:56 +00:00
Doug Rabson
f066622bdd Add getsecs() for the libstand network code. 2001-09-22 18:33:09 +00:00
Doug Rabson
81d63063b1 Add a twiddle meter when reading from files. Gives me something to look
at when a kernel is loading from a floppy.
2001-09-22 18:31:02 +00:00
Doug Rabson
327b34100f Add ELF backend to the build. 2001-09-14 08:27:49 +00:00
Doug Rabson
f19fa0b627 Make this do the right thing (mostly). We should still reserve the pages
that the kernel loads into using the EFI AllocatePages call.
2001-09-14 08:26:00 +00:00
Doug Rabson
f77b61980e Add a libstand filesystem for accessing EFI native filesystems. 2001-09-07 08:51:48 +00:00
Doug Rabson
b827e60e65 Reformat. 2001-09-07 08:49:47 +00:00
Doug Rabson
76897a893f Merge linker set relocations with the rest. 2001-09-05 13:36:41 +00:00
David E. O'Brien
a1881c1e89 This Intel derived file uses C++ style comments.
(I'll be we know which compiler and platform they developed this on...)
Minimally change them to C89 comments to make GCC happy.  (this is kinda funny
as the file has piece derived from FreeBDS 3.2)

Also fix FreeBSD id style.
2001-06-16 05:58:54 +00:00
David E. O'Brien
c38fe280a8 Fix FreeBSD id style. 2001-06-16 05:56:13 +00:00
David E. O'Brien
16aaa88017 style(9) 2001-06-16 05:55:32 +00:00
David E. O'Brien
cb38c47462 style(9) + fix FreeBSD id's. 2001-06-16 02:12:36 +00:00
Doug Rabson
faf8077790 Move the first section up one page. The firmware bogusly uses the first
page of the image to load section headers and if we let the text section
start at zero, it corrupts the section table when its loaded. With this
change, the loader gets as far as the 'ok' prompt.
2001-06-10 13:39:10 +00:00
Doug Rabson
35ca79092b Remove a 'return' statement which I put in while I was trying to debug
the startup code.
2001-06-10 13:36:00 +00:00
Doug Rabson
fd3e14e915 First approximation of an ia64 EFI loader. Not functional. 2001-06-09 16:49:51 +00:00