Commit Graph

9 Commits (4134280bcd93be43143f11ee41fcdadad90c5672)

Author SHA1 Message Date
Michael Brown 4134280bcd [pxeprefix] Ensure that UNDI IRQ is disabled before starting iPXE
When using the undionly.kkpxe binary (which is never recommended), the
UNDI interrupt may still be enabled when iPXE starts up.  If the PXE
base code interrupt handler is not well-behaved, this can result in
undefined behaviour when interrupts are first enabled (e.g. for
entropy gathering, or for allowing the timer tick to occur).

Fix by detecting and disabling the UNDI interrupt during the prefix
code.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2025-03-26 14:56:13 +00:00
Michael Brown e8365f7a51 [pxeprefix] Work around missing type values from PXENV_UNDI_GET_NIC_TYPE
The implementation of PXENV_UNDI_GET_NIC_TYPE in some PXE ROMs
(observed with an Intel X710 ROM in a Dell PowerEdge R6515) will fail
to write the NicType byte, leaving it uninitialised.

Prepopulate the NicType byte with a highly unlikely value as a
sentinel to allow us to detect this, and assume that any such devices
are overwhelmingly likely to be PCI devices.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2025-03-26 12:02:27 +00:00
Michael Brown 6ca597eee9 [build] Fix building with newer binutils
Newer versions of the GNU assembler (observed with binutils 2.41) will
complain about the ".arch i386" in files assembled with "as --64",
with the message "Error: 64bit mode not supported on 'i386'".

In files such as stack.S that contain no instructions to be assembled,
the ".arch i386" is redundant and may be removed entirely.

In the remaining files, fix by moving ".arch i386" below the relevant
".code16" or ".code32" directive, so that the assembler is no longer
expecting 64-bit instructions to be used by the time that the ".arch
i386" directive is encountered.

Reported-by: Ali Mustakim <alim@forwardcomputers.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2024-01-14 12:16:02 +00:00
Michael Brown e66552eeed [build] Remove unnecessary ".text" directives
The .text directive is entirely redundant when followed by a .section
directive giving an explicit section name and attributes.

Remove these unnecessary directives to simplify the code.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2024-01-14 11:51:16 +00:00
Geert Stappers e17568ad06 [build] Inhibit linker warnings about an implied executable stack
Signed-off-by: Geert Stappers <stappers@stappers.it>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2023-06-30 11:05:37 +01:00
Michael Brown 31b5c2e753 [librm] Provide an abstraction wrapper for prot_call
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-02-18 23:23:38 +00:00
Michael Brown 196f0f2551 [librm] Convert prot_call() to a real-mode near call
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-02-18 17:12:16 +00:00
Michael Brown 9dc340d735 [librm] Discard argument as part of return from prot_call()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-02-16 23:16:49 +00:00
Michael Brown f468f12b1e [bios] Add bin-x86_64-pcbios build platform
Move most arch/i386 files to arch/x86, and adjust the contents of the
Makefiles and the include/bits/*.h headers to reflect the new
locations.

This patch makes no substantive code changes, as can be seen using a
rename-aware diff (e.g. "git show -M5").

This patch does not make the pcbios platform functional for x86_64; it
merely allows it to compile without errors.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2016-02-16 19:32:32 +00:00