david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
Commit Graph

30 Commits

Author SHA1 Message Date
Michael Brown c3b4860ce3 [legal] Update FSF mailing address in GPL licence texts
Suggested-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-20 19:55:45 +01:00
Michael Brown fa410e0a41 [pxe] Modularise PXE API provision
Use the linker table infrastructure to dispatch PXE API calls to the
relevant function.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-12-11 02:27:58 +00:00
Michael Brown 962cada830 [init] Remove concept of "shutdown exit flags"
Remove the concept of shutdown exit flags, and replace it with a
counter used to keep track of exposed interfaces that require devices
to remain active.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-27 20:40:26 +00:00
Joshua Oreman 2aad3fab23 [build] Use weak definitions instead of weak declarations
This removes the need for inline safety wrappers, marginally reducing
the size penalty of weak functions, and works around an apparent
binutils bug that causes undefined weak symbols to not actually be
NULL when compiling with -fPIE (as EFI builds do).

A bug in versions of binutils prior to 2.16 (released in 2005) will
cause same-file weak definitions to not work with those
toolchains. Update the README to reflect our new dependency on
binutils >= 2.16.

Signed-off-by: Joshua Oreman <oremanj@rwcr.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-05-27 10:19:14 +01:00
Michael Brown dc8eb04647 [pxe] Treat PXENV_RESTART_TFTP as unreturnable
Microsoft WDS can end up calling PXENV_RESTART_TFTP to execute a
second-stage NBP which then exits.  Specifically, wdsnbp.com uses
PXENV_RESTART_TFTP to execute pxeboot.com, which will exit if the user
does not press F12.  iPXE currently treats PXENV_RESTART_TFTP as a
normal PXE API call, and so attempts to return to wdsnbp.com, which
has just been vaporised by pxeboot.com.

Use rmsetjmp/rmlongjmp to preserve the stack state as of the initial
NBP execution, and to restore this state immediately prior to
executing the NBP loaded via PXENV_RESTART_TFTP.  This matches the
behaviour in the PXE spec (which says that "if TFTP is restarted,
control is never returned to the caller"), and allows pxeboot.com to
exit relatively cleanly back to iPXE.

As with all usage of setjmp/longjmp, there may be subtle corner case
bugs due to not gracefully unwinding any state accumulated by the time
of the longjmp call, but this seems to be the only viable way to
provide the specified behaviour.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-05-21 03:12:13 +01:00
Michael Brown 8406115834 [build] Rename gPXE to iPXE
Access to the gpxe.org and etherboot.org domains and associated
resources has been revoked by the registrant of the domain.  Work
around this problem by renaming project from gPXE to iPXE, and
updating URLs to match.

Also update README, LOG and COPYRIGHTS to remove obsolete information.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-04-19 23:43:39 +01:00
Shao Miller 112a3f2de2 [pxe] Introduce PXE exit hook for NBP chaining
It might be the case that we wish to chain to an NBP without
being "in the way".  We now implement a hook in our exit path
for gPXE *.*pxe build targets.  The hook is a pointer to a
SEG16:OFF16 which we try to jump to during exit.  By default,
this pointer results in the usual exit path.

We also implement the "pxenv_file_exit_hook" PXE API routine
to allow the user to specify an alternate SEG16:OFF16 to jump
to during exit.

Unfortunately, this additional PXE extension has a cost
in code size.  Fortunately, a look at the size difference
for a gPXE .rom build target shows zero size difference
after compression.

The routine is documented in doc/pxe_extensions as follows:

FILE EXIT HOOK

Op-Code:	PXENV_FILE_EXIT_HOOK (00e7h)

Input:	Far pointer to a t_PXENV_FILE_EXIT_HOOK parameter
		structure that has been initialized by the caller.

Output:	PXENV_EXIT_SUCCESS or PXENV_EXIT_FAILURE must be
		returned in AX.  The Status field in the parameter
		structure must be set to one of the values represented
		by the PXENV_STATUS_xxx constants.

Description:Modify the exit path to jump to the specified code.
		Only valid for pxeprefix-based builds.

typedef struct s_PXENV_FILE_EXIT_HOOK {
        PXENV_STATUS_t Status;
        SEGOFF16_t Hook;
} t_PXENV_FILE_EXIT_HOOK;

Set before calling API service:

Hook:	The SEG16:OFF16 of the code to jump to.

Returned from API service:

Status:	See PXENV_STATUS_xxx constants.

Requested-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-24 07:54:42 -05:00
Joshua Oreman fa4aec8f03 [config] Make PXE stack a compile-time option
For extremely tight space requirements and specific applications, it is
sometimes desirable to create gPXE images that cannot provide the PXE API
functionality to client programs. Add a configuration header option,
PXE_STACK, that can be removed to remove this stack. Also add PXE_MENU
to control the PXE boot menu, which most uses of gPXE do not need.

Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-20 17:23:37 -05:00
Michael Brown 07b5be3341 [pxe] Create pxe_[de]activate() wrapper functions
Merge the pxe_set_netdev()+pxe_[un]hook_int1a() pattern into a single
pxe_[de]activate() call.
2009-06-28 20:11:32 +01:00
Michael Brown c2965b0fe7 [pxe] Make pxe_init_structures() an initialisation function
pxe_init_structures() fills in the fields of the !PXE and PXENV+
structures that aren't known until gPXE starts up.  Once gPXE is
started, these values will never change.

Make pxe_init_structures() an initialisation function so that PXE
users don't have to worry about calling it.
2009-06-28 19:40:16 +01:00
Michael Brown c44a193d0d [legal] Add a selection of FILE_LICENCE declarations
Add FILE_LICENCE declarations to almost all files that make up the
various standard builds of gPXE.
2009-05-18 08:33:25 +01:00
Michael Brown 784d3f336e [pxe] Set %ax to zero on entry to PXE NBP
This is not strictly an entry requirement, but it does mean that a PXE
NBP returning without setting %ax will appear to have returned
success.
2009-02-23 08:43:27 +00:00
H. Peter Anvin aaa26f3bd3 [pxe] Initialize EDX on PXE NBP entry and INT 1Ah
The PXE 1.x spec specifies that on NBP entry or on return from INT
1Ah AX=5650h, EDX shall point to the physical address of the PXENV+
structure.  The PXE 2.x spec drops this requirement, simply stating
that EDX is clobbered.  Given the principle "be conservative in what
you send, liberal in what you accept", however, we should implement
this anyway.
2009-02-18 18:13:20 +00:00
Michael Brown dc60c24146 [i386] Rename __cdecl to __asmcall
__cdecl is a misleading name, since it currently encapsulates both
cdecl and regparm(0) attributes.  Rename to __asmcall.
2008-11-19 19:12:53 +00:00
Michael Brown fed106b7fb [pxe] Enable interrupts before starting PXE NBP execution
Based on a patch provided by XenSource for Etherboot 5.4.
2008-09-24 21:23:50 +01:00
Michael Brown fc0c40a5b0 [pxe] Fill in UNDIROMID pointer in !PXE structure
IBM's iSCSI Firmware Initiator checks the UNDIROMID pointer in the
!PXE structure that gets created by the UNDI loader.  We didn't
previously fill this value in.
2008-08-28 00:11:45 +01:00
Michael Brown 4fbbf651d7 [i386] Change semantics of __from_data16 and __from_text16
__from_data16 and __from_text16 now take a pointer to a
.data16/.text16 variable, and return the real-mode offset within the
appropriate segment.  This matches the use case for every occurrence
of these macros, and prevents potential future bugs such as that fixed
in commit d51d80f.  (The bug arose essentially because "&pointer" is
still syntactically valid.)
2008-06-30 18:52:13 -07:00
H. Peter Anvin d62e89d776 [PXEXT] Add FILE_API_CHECK API function
Add FILE_API_CHECK to the PXEXT API so the NBP can query the
availability and status of the API.
2008-03-26 15:10:56 -07:00
Michael Brown b62f2325ba [PXEXT] Add PXENV_FILE_EXEC call to PXE extensions API.
This allows pxelinux to execute arbitrary gPXE commands.  This is
remarkably unsafe (not least because some of the commands will assume
full ownership of memory and do nasty things like edit the e820 map
underneath the calling pxelinux), but it does allow access to the
"sanboot" command.
2008-03-04 18:16:30 +00:00
Michael Brown 950057eeed Add PXE FILE API. 2007-08-04 01:23:37 +01:00
Michael Brown a6a1052096 Applied a modified version of holger's regparm patches. 2007-07-29 00:17:25 +01:00
Michael Brown dca470cb21 Add (untested) UNDI loader C-level implementation. 2007-07-03 23:41:35 +01:00
Michael Brown 8130443f9f Separate out pxe_start_nbp() from pxe_image.c into pxe_call.c
Implement PXENV_RESTART_TFTP.
2007-06-30 14:56:35 +01:00
Michael Brown 7bc03d37a2 Select a PXE network device before starting PXE NBP.
Move pxe_boot() code to pxe_image.c
2007-01-14 02:20:10 +00:00
Michael Brown bd863e4112 Add header for pxe_boot() 2007-01-13 17:23:44 +00:00
Michael Brown 88e38fa148 We don't actually have a stdio.h header file. Our printf() functions are
defined in vsprintf.h.  (This may change, since vsprintf.h is a
non-standard name, but for now it's the one to use.)

There should be no need to include vsprintf.h just for DBG() statements,
since include/compiler.h forces it in for a debug build anyway.
2006-09-27 10:58:14 +00:00
Marty Connor 6ac78f6aff added stdio.h to includes for DBG compilation 2006-09-27 05:57:06 +00:00
Michael Brown 843bcc291d Added missing __from_text16()s when passing pointers to PXE NBP. 2006-08-09 00:39:21 +00:00
Michael Brown 18c112d205 Added (not yet tested) PXE API entry point and support functions. 2006-08-08 20:43:33 +00:00
Michael Brown a0a872f7f1 Updated PXE UDP implementation to use the new Etherboot UDP API.
Updated PXE API dispatcher to use copy_{to,from}_user, and moved to
arch/i386 since the implementation is quite architecture-dependent.
(The individual PXE API calls can be largely
architecture-independent.)
2006-08-02 23:08:10 +00:00