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

3714 Commits

Author SHA1 Message Date
Yann Cézard 9215b7f4c0 [forcedeth] Clear the MII link status register on link status changes
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-20 12:36:09 +00:00
Michael Brown 48624cf94a [console] Try to avoid problems caused by keycode 86
The "us" keyboard layout contains a mapping for keycode 86 (which
seems not to correspond to any physical key on many US keyboards) to
the ASCII character '<'.  This mapping causes conflicts with the
mapping for keycode 51, which also maps (with shift) to '<'.

Change the keyboard mapping generator to choose the lowest keycode for
each ASCII character as indicating the relevant mapping to use, on the
basis that a lower keycode roughly indicates a "more normal" key.  On
a German keyboard, which has keys for both keycode 51 and keycode 86
present, this causes '<' to be remapped to ';', which is a closer
match to typical user expectations.

Reported-by: Sven Dreyer <sven@dreyer-net.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 21:43:56 +00:00
Michael Brown dbb27c9c3b [uri] Avoid unused variable warning in gcc 4.6
Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 20:21:08 +00:00
Michael Brown e9612cf5b8 [qib7322] Avoid unused variable warning in gcc 4.6
Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 20:19:54 +00:00
Michael Brown 4774a4fb92 [hermon] Avoid unused variable warning in gcc 4.6
Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 20:16:45 +00:00
Michael Brown 0bb8508143 [arbel] Avoid unused variable warning in gcc 4.6
Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 20:15:39 +00:00
Michael Brown 4e5d759938 [vxge] Avoid unused variable warning in gcc 4.6
Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 19:57:38 +00:00
Michael Brown 7bb8eca55b [ath5k] Avoid unused variable warning in gcc 4.6
Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 19:54:52 +00:00
Michael Brown 7f2903c623 [eepro] Avoid unused variable warning in gcc 4.6
From a cursory examination, it appears as though the calculation of
tx_available is redundant, since eepro_transmit() waits for transmit
completion before returning anyway.

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 19:51:02 +00:00
Michael Brown ce5df27ce5 [w89c840] Avoid unused variable warning in gcc 4.6
Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 19:32:24 +00:00
Michael Brown b2f2611675 [smc9000] Avoid unused variable warning in gcc 4.6
Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 19:32:24 +00:00
Michael Brown 9e308d922d [etherfabric] Avoid unused variable warning in gcc 4.6
Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 19:32:24 +00:00
Michael Brown eeba340f6f [sis190] Avoid unused variable warning in gcc 4.6
Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 19:32:24 +00:00
Michael Brown 6044396cd7 [epic100] Avoid unused variable warning in gcc 4.6
Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 19:32:24 +00:00
Michael Brown c0215780de [sky2] Avoid unused variable warning in gcc 4.6
Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 19:32:24 +00:00
Michael Brown 27762ba689 [forcedeth] Avoid unused variable warning in gcc 4.6
Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 19:32:23 +00:00
Michael Brown fde62b235f [ns83820] Update to standard debugging infrastructure
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 19:32:23 +00:00
Michael Brown 4382b35067 [atl1e] Avoid unused variable warning in gcc 4.6
Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 19:32:23 +00:00
Michael Brown 68a48b2220 [via-velocity] Avoid unused variable warning in gcc 4.6
Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 19:32:23 +00:00
Michael Brown 9d42aa518c [sis900] Avoid unused variable warning in gcc 4.6
Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 19:32:23 +00:00
Michael Brown c018d57803 [e1000] Remove unused variable when ICR register is simply cleared
On reset and close, the ICR register is read to clear any pending
interrupts, but the value is simply ignored.  Avoid assigning the
value to a variable, to inhibit a warning from gcc 4.6.

Also fix a potential race condition in reset routines which clear
interrupts before disabling them.

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 19:32:23 +00:00
Michael Brown d94e62ded4 [igbvf] Remove some unused Linux-specific portions of igbvf.h
These unused portions trigger a compiler warning under gcc 4.6, due to
the ambiguity over the "page" field in struct igbvf_buffer.

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 19:32:23 +00:00
Michael Brown 070100b21d [phantom] Remove unused variable in phantom_dmesg()
Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 19:32:23 +00:00
Michael Brown c8e51f80a8 [build] Avoid spurious address comparison warnings in gcc 4.6
A construction such as "assert ( ptr != NULL )" seems to trigger a
false positive warning in gcc 4.6 if the value of "ptr" is known at
compile-time to be non-NULL.  Use -Wno-address to inhibit this
warning.

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 19:32:17 +00:00
Michael Brown 511fd46976 [build] Avoid spurious unused-but-set-variable warnings in gcc 4.6
The __table_entries() construction seems to trigger a false positive
warning in gcc 4.6 relating to variables which are set but never
used.  Add __attribute__((unused)) to inhibit this warning.

Reported-by: Ralph Giles <giles@thaumas.net>
Tested-by: Ralph Giles <giles@thaumas.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 19:31:44 +00:00
Michael Brown b8924c1aed [build] Allow workaround-specific flags to override default flags
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 19:31:41 +00:00
Bastian Blank d0eb4e529d [build] Fix building with latest binutils
Signed-off-by: Bastian Blank <waldi@debian.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 16:09:05 +00:00
Michael Brown 9b68dc78b9 [build] Avoid rebuilding keymap files automatically
The keymap files, though autogenerated, are checked in to version
control and should be considered as source files.  They should never
be automatically rebuilt.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 14:06:46 +00:00
Michael Brown ddad96cd23 [console] Add keyboard map selection
The active keyboard map may be selected by editing KEYBOARD_MAP in
config/console.h.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 12:03:00 +00:00
Michael Brown 1febd879e3 [console] Add keymap generator
Inspired by LILO's keytab-lilo.pl, genkeymap.pl uses "loadkeys -b" to
obtain a Linux keyboard map, and generates a file keymap_xx.c in
hci/keymap.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 12:02:59 +00:00
Michael Brown f98cf7d70f [console] Add facility for rudimentary keyboard mapping
Allow for remapping of ASCII characters returned by the BIOS, using a
map consisting of (from,to) pairs.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-16 12:02:52 +00:00
Michael Brown b9326c3655 [efi] Mark SNP devices as children of EFI PCI device
Re-open the EFI_PCI_IO_PROTOCOL specifying an Attributes value of
EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER.  This causes the SNP devices to
be marked as children of the EFI PCI device (as shown in the "devtree"
command).

On at least one IBM blade system, this is required in order to have
the relevant drivers automatically attach to the SNP controller at
device creation time.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-15 16:59:19 +00:00
Michael Brown 23daab14a6 [romprefix] Use correct size for PMM allocation of image source block
iPXE allocates its first PMM block using the image source length,
which is rounded up to the nearest 16-byte paragraph.  It then copies
in data of a length calculated from the ROM size, which is
theoretically less than or equal to the image source length, but is
rounded up to the nearest 512-byte sector.  This can result in copying
beyond the end of the allocated PMM block, which can corrupt the PMM
data structures (and other essentially arbitrary areas of memory).

Fix by rounding up the image source length to the nearest 512-byte
sector before using it as the PMM allocation length.

Reported-by: Alex Williamson <alex.williamson@redhat.com>
Reported-by: Jarrod Johnson <jarrod.b.johnson@gmail.com>
Reported-by: Itay Gazit <itayg@mellanox.co.il>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-15 02:07:22 +00:00
Michael Brown c315ae0394 [eepro100] Do not discard short packets
In a virtual environment such as qemu, we can legitimately receive
packets less than 64 bytes in length, such as ARP replies.  These are
currently discarded, causing most IPv4 communication to fail.

Fix by ignoring the RFDShort bit when receiving packets.

Reported-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-12 12:48:29 +00:00
Michael Brown 9a5b4aed69 [bios] Use INT 16,11 instead of INT 16,01 to check for keystrokes
INT 16,01 will discard some extended keystrokes on some BIOSes, making
it impossible for iPXE to detect keypresses such as F12.  Fix by using
INT 16,11 instead.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-10 22:50:05 +00:00
Michael Brown 0d277724a9 [pxe] Report an IRQ number only if device supports interrupts
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-10 18:25:24 +00:00
Michael Brown e49d81689c [syslog] Add support for sending console output to a syslog server
Originally-implemented-by: Anselm Martin Hoffmeister <anselm@hoffmeister.be>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-10 05:36:31 +00:00
Michael Brown 1c0ff6e1a7 [console] Move include/console.h to include/ipxe/console.h
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-09 20:09:26 +00:00
Michael Brown e934447a60 [script] Allow scripts to be replaced
A script that downloads a new image using imgdownload() with the
action register_and_replace_image() can now be freed immediately
before the replacement image is executed.  This functionality is not
yet exposed via an iPXE command.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-09 17:32:32 +00:00
Michael Brown 4562223420 [image] Avoid ending up with multiple selected images on re-registration
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-09 17:21:34 +00:00
Michael Brown 9fa4ac2e9a [image] Simplify use of imgdownload()
Allow imgdownload() to be called without first having to allocate (and
so keep track of) an image.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-09 16:57:34 +00:00
Michael Brown ae92700fd4 [image] Generalise "currently-running script" to "currently-running image"
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-09 13:38:56 +00:00
Michael Brown d17a84a056 [image] Move the register_and_{select|boot}_image() functions to imgmgmt.c
These functions are used only as the "action" parameters to
imgdownload() or imgfetch(), and so belong in imgmgmt.c rather than
image.c

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-09 13:11:35 +00:00
Michael Brown 3936136e5e [monojob] Display percentage progress, if available
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-07 23:55:57 +00:00
Michael Brown b2332d5118 [prefix] Allow iPXE's own command line to be executed as a script
Some prefixes (e.g. .lkrn) allow a command line to be passed in to
iPXE.  At present, this command line is ignored.

If a command line is provided, treat it as an embedded script (without
an explicit "#!ipxe" magic marker).  This allows for patterns of
invocation such as

  title  iPXE
  kernel /boot/ipxe.lkrn dhcp && \
         sanboot iscsi:10.0.4.1::::iqn.2010-04.org.ipxe.dolphin:storage

Here GRUB is instructed to load ipxe.lkrn with an embedded script
equivalent to

  #!ipxe
  dhcp
  sanboot iscsi:10.0.4.1::::iqn.2010-04.org.ipxe.dolphin:storage

This can be used to effectively vary the embedded script without
having to rebuild ipxe.lkrn.

Originally-implemented-by: Dave Hansen <dave@sr71.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-07 22:28:31 +00:00
Michael Brown 202cf094eb [main] Remove shell prompt when using an embedded image
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-07 20:42:36 +00:00
Michael Brown 7752541bb7 [image] Use list_first_entry() to clarify logic in main()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-07 19:53:58 +00:00
Michael Brown e87fc5e743 [script] Add "prompt" command
The "prompt" command exposes the prompt() function, allowing a script
to prompt the user for a keypress and take action depending on the
result.  For example

  #!ipxe

  prompt -k 0x197e -t 2000 Press F12 to boot from network... || exit
  autoboot

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-07 19:53:58 +00:00
Michael Brown c4b6c244b0 [prompt] Replace shell_banner() with a generic prompt() function
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-07 19:53:53 +00:00
Michael Brown 9d633bdc71 [console] Add a timeout parameter to getkey()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-07 19:37:30 +00:00