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

31 Commits

Author SHA1 Message Date
Michael Brown 1a7746603b [build] Fix use of inline assembly on GCC 4.8 ARM64 builds
The inline assembly used in include/errno.h to generate the einfo
blocks requires the ability to generate an immediate constant with no
immediate-value prefix (such as the dollar sign for x86 assembly).

We currently achieve this via the undocumented "%c0" form of operand.
This causes an "invalid operand prefix" error on GCC 4.8 for ARM64
builds.

Fix by switching to the equally undocumented "%a0" form of operand,
which appears to work correctly on all tested versions of GCC.

Reported-by: Benjamin S. Allen <bsallen@alcf.anl.gov>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2017-07-28 13:50:35 +01:00
Michael Brown 1f65ed53da [build] Allow assembler section type character to vary by architecture
On some architectures (such as ARM) the "@" character is used as a
comment delimiter.  A section type argument such as "@progbits"
therefore becomes "%progbits".

This is further complicated by the fact that the "%" character has
special meaning for inline assembly when input or output operands are
used, in which cases "@progbits" becomes "%%progbits".

Allow the section type character(s) to be defined via Makefile
variables.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-03-13 11:20:53 +00:00
Michael Brown b6ee89ffb5 [legal] Relicense files under GPL2_OR_LATER_OR_UBDL
Relicense files for which I am the sole author (as identified by
util/relicense.pl).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-02 14:17:31 +00:00
Michael Brown 7348035231 [libc] Redefine low 8 bits of error code as "platform error code"
The low 8 bits of an iPXE error code are currently defined as the
closest equivalent PXE error code.  Generalise this scheme to
platforms other than PC-BIOS by extending this definition to "closest
equivalent platform error code".  This allows for the possibility of
returning meaningful errors via EFI APIs.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-04-19 13:34:13 +01:00
Michael Brown e42bc3aa37 [libc] Use __einfo() tuple as first argument to EUNIQ()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-04-19 00:45:13 +01:00
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 2a92697bda [libc] Ensure that error numbers from EUNIQ() have the correct type
Error numbers are signed ints.  EUNIQ() should not allow implicit type
promotion based on the supplied error diambiguator, because this
causes problems with statements such as

  rc = ( condition ? -EUNIQ ( EBASE, disambiguator ) : -EBASE );

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-22 20:04:11 +01:00
Michael Brown 6c0e8c14be [libc] Enable automated extraction of error usage reports
Add preprocessor magic to the error definitions to enable every error
usage to be tracked.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-05-31 03:11:57 +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
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 4b267ed713 [libc] Whitespace cleanup in errno.h 2008-03-26 22:57:25 +00:00
H. Peter Anvin 61ee294875 [PXEXT] Change the PXE return code for EWOULDBLOCK
Change the PXE return code for EWOULDBLOCK from PXENV_STATUS_FAILURE
to PXENV_STATUS_TFTP_OPEN.  This code is only used by the FILE_READ
PXEXT call, and is necessary to distinguish "error" from "no data" in
that call.

(The only other nonblocking call is UDP_READ, where the caller doesn't
care about the distinction, however, gPXE doesn't use EWOULDBLOCK
internally to represent this condition in that code.)
2008-03-26 15:12:19 -07:00
Michael Brown 9aa61ad5a2 Add per-file error identifiers 2007-07-24 17:11:31 +01:00
Michael Brown b3ca73c303 Remap EBADF to PXENV_STATUS_TFTP_FILE_NOT_FOUND; the only user is
posix_io.c and this PXE error makes more sense in this context.
2007-07-05 18:47:46 +01:00
Michael Brown 6b6fc1d5ea Allow construction of PXE status code from internal error number. 2007-05-18 14:17:35 +00:00
Michael Brown 18f9f939a8 Introduce structured error codes. 2007-01-19 13:15:26 +00:00
Michael Brown 9af12d5fba A working DNS resolver (not yet tied in to anything) 2007-01-15 17:31:35 +00:00
Michael Brown 4e20d73bb5 Gave asynchronous operations approximate POSIX signal semantics. This
will enable us to cascade async operations, which is necessary in order to
properly support DNS.  (For example, an HTTP request may have to redirect
to a new location and will have to perform a new DNS lookup, so we can't
just rely on doing the name lookup at the time of parsing the initial
URL).

Anything other than HTTP is probably broken right now; I'll fix the others
up asap.
2007-01-15 08:49:10 +00:00
Michael Brown 6a03552381 Distinguish between ENOMEM (as representing a lack of internal memory
as allocated by malloc()) versus all other errors, in particular
ENOBUFS (representing a lack of external buffer space, e.g. in a
device's TX queue or a user buffer).
2007-01-11 16:30:21 +00:00
Michael Brown 84a2b886e1 Split error-message table portions of errno.h out to gpxe/errortab.h 2006-12-20 03:40:48 +00:00
Michael Brown e5f0898f38 Move strerror() prototype to string.h, where it belongs 2006-12-20 03:35:49 +00:00
Michael Brown 04da3556f9 Differentiate between ENOSPC and ENOMEM 2006-12-20 03:34:27 +00:00
Michael Brown b24947f0c0 Add sketch code to reassemble a DHCP packet from our internal "everything
is a DHCP option" data structures.

We need this code in order to be able to return a DHCP packet to a PXE NBP
which reflects options from our multiple sources (e.g. NVS and DHCP
server).  This is expensive, but necessary.  Having paid this cost, we may
as well try to use the same code to generate our DHCP request packets,
since the process is similar.
2006-07-17 12:47:22 +00:00
Michael Brown 444b885a7d Add EOVERFLOW==ERANGE 2006-05-19 18:53:12 +00:00
Michael Brown d8e99bf28f Gave up on adding POSIX errno's as required, and just added (almost) all
of them in one go.

EBADIMG has been replaced by ENOEXEC, and EIMGRET by ECANCELED.
2006-04-28 13:44:34 +00:00
Michael Brown 824d6ffa7f Header rearrangement.
I want to get to the point where any header in include/ reflects a
standard user-level header (e.g. a POSIX header), while everything that's
specific to gPXE lives in include/gpxe/.  Headers that reflect a Linux
header (e.g. if_ether.h) should also be in include/gpxe/, with the same
name as the Linux header and, preferably, the same names used for the
definitions.
2006-04-24 15:42:49 +00:00
Michael Brown 6209bd873a First sketch of a new net device API. 2006-04-19 12:07:46 +00:00
Michael Brown 4f3581e99c Added ENOENT and EAFNOSUPPORT 2006-04-19 01:54:53 +00:00
Michael Brown 0e921cdd9e More doxygen docs 2005-05-18 15:28:33 +00:00
Michael Brown 0eb4d9973c Add EBADIMG, EIMGRET, ETIMEDOUT and EINVAL 2005-05-18 14:41:53 +00:00
Michael Brown ff9104e029 Added errno, strerror and the "%m" printf metacharacter. These will allow
us to return proper PXE status codes, while simultaneously allowing for
more consistent error reporting (complete with verbose error messages as a
build-time option).
2005-05-17 18:26:41 +00:00