people/xl0/gpxe.git
16 years agoAdd 4 bytes to maximum frame length to allow for the frame checksum.
Michael Brown [Fri, 16 Jun 2006 14:30:41 +0000 (14:30 +0000)]
Add 4 bytes to maximum frame length to allow for the frame checksum.
(This actually matters once you try using TCP, because you *will*
receive full-sized frames.)

16 years agoImprove debugging output for legacy wrapper
Michael Brown [Fri, 16 Jun 2006 14:27:04 +0000 (14:27 +0000)]
Improve debugging output for legacy wrapper

16 years agoForward-port event queue fixes from 5.4 tree.
Michael Brown [Fri, 16 Jun 2006 14:05:43 +0000 (14:05 +0000)]
Forward-port event queue fixes from 5.4 tree.

16 years agoForward-port start-of-day fixes from 5.4 tree
Michael Brown [Fri, 16 Jun 2006 14:03:43 +0000 (14:03 +0000)]
Forward-port start-of-day fixes from 5.4 tree

16 years agoForward-port reset-related changes from 5.4 tree.
Michael Brown [Fri, 16 Jun 2006 14:00:43 +0000 (14:00 +0000)]
Forward-port reset-related changes from 5.4 tree.

16 years agoFor consistency
Michael Brown [Fri, 16 Jun 2006 13:17:40 +0000 (13:17 +0000)]
For consistency

16 years ago32kB window is actually larger than our typical receive ring size.
Michael Brown [Fri, 16 Jun 2006 13:16:59 +0000 (13:16 +0000)]
32kB window is actually larger than our typical receive ring size.
Shrink to 4kB for now.  We might want to see if it can be made
genuinely indicative of the RX ring size in the new TCP
implementation.

16 years agoSimplify TX datapath.
Michael Brown [Fri, 16 Jun 2006 00:19:46 +0000 (00:19 +0000)]
Simplify TX datapath.

16 years agoAdded iSCSI boot test code
Michael Brown [Wed, 14 Jun 2006 17:00:25 +0000 (17:00 +0000)]
Added iSCSI boot test code

16 years agoGeneralise three-wire interface to generic SPI interface.
Michael Brown [Wed, 14 Jun 2006 00:22:50 +0000 (00:22 +0000)]
Generalise three-wire interface to generic SPI interface.

Update rtl8139 driver to instantiate an SPI interface with a three-wire
device attached.

16 years agoMove per-transition delays from generic bit-bashing layer to i2c layer
Michael Brown [Wed, 14 Jun 2006 00:20:35 +0000 (00:20 +0000)]
Move per-transition delays from generic bit-bashing layer to i2c layer
(since SPI bit-bashing will require different delay semantics).

16 years agoTranslate between "0 = success" and "0 = failure" call standards.
Michael Brown [Wed, 14 Jun 2006 00:18:13 +0000 (00:18 +0000)]
Translate between "0 = success" and "0 = failure" call standards.

16 years agoChange read_bit() to return 0 or -1UL, rather than 0 or 1.
Michael Brown [Mon, 12 Jun 2006 19:29:50 +0000 (19:29 +0000)]
Change read_bit() to return 0 or -1UL, rather than 0 or 1.

16 years agoUpdated debug message to reflect change in data structure.
Michael Brown [Mon, 12 Jun 2006 01:10:08 +0000 (01:10 +0000)]
Updated debug message to reflect change in data structure.

16 years agoAdd "addr32" required explicitly by older gas.
Michael Brown [Mon, 12 Jun 2006 01:07:43 +0000 (01:07 +0000)]
Add "addr32" required explicitly by older gas.

16 years agoAdd NULL_TRAP as a config option
Michael Brown [Sun, 11 Jun 2006 01:55:43 +0000 (01:55 +0000)]
Add NULL_TRAP as a config option

16 years agoFix typo
Michael Brown [Sun, 11 Jun 2006 01:55:12 +0000 (01:55 +0000)]
Fix typo

16 years agoAdded null trap code for debugging. (Must be included by adding
Michael Brown [Sun, 11 Jun 2006 01:48:29 +0000 (01:48 +0000)]
Added null trap code for debugging.  (Must be included by adding
--nulltrap to the make target at the moment.)

16 years agoUpdate to use the generic i2c bit-bashing code.
Michael Brown [Sun, 11 Jun 2006 00:57:38 +0000 (00:57 +0000)]
Update to use the generic i2c bit-bashing code.

16 years agoAdded bit-bashing i2c interface code
Michael Brown [Sun, 11 Jun 2006 00:57:00 +0000 (00:57 +0000)]
Added bit-bashing i2c interface code

16 years agoWindows Server 2003 sulks if we feed it an empty region in base memory
Michael Brown [Fri, 9 Jun 2006 12:20:03 +0000 (12:20 +0000)]
Windows Server 2003 sulks if we feed it an empty region in base memory
as a result of our memory map editing, so strip out any empty regions.

16 years agoAdded missing check-in
Michael Brown [Fri, 9 Jun 2006 10:19:17 +0000 (10:19 +0000)]
Added missing check-in

16 years agoAdded sketch of bit-bashing interface common code
Michael Brown [Thu, 8 Jun 2006 19:47:09 +0000 (19:47 +0000)]
Added sketch of bit-bashing interface common code

16 years agoFix bug with >256 cylinders.
Michael Brown [Thu, 8 Jun 2006 19:28:08 +0000 (19:28 +0000)]
Fix bug with >256 cylinders.

Allow our functions to return a non-zero, non-error status (since the
INT 13 Extensions Check has to return the API version in the register
that is otherwise always used for the error code).

Report a non-zero API version from the INT 13 Extensions Check; GRUB
now uses extended reads.

16 years ago- separated curses.c out into separate source files to optimise
Dan Lynch [Thu, 8 Jun 2006 17:23:37 +0000 (17:23 +0000)]
- separated curses.c out into separate source files to optimise
library use later on
- some small mods to existing functions

16 years agoLegacy drivers cannot cope with multiple active devices.
Michael Brown [Thu, 8 Jun 2006 15:18:27 +0000 (15:18 +0000)]
Legacy drivers cannot cope with multiple active devices.

16 years agoIt's astonishing how long really fundamental bugs can survive without
Michael Brown [Thu, 8 Jun 2006 15:06:09 +0000 (15:06 +0000)]
It's astonishing how long really fundamental bugs can survive without
being noticed...

16 years agoFix some remarkably obvious mistakes in pcidirect.h
Michael Brown [Thu, 8 Jun 2006 14:57:04 +0000 (14:57 +0000)]
Fix some remarkably obvious mistakes in pcidirect.h

16 years agoWe now have just romprefix, rather than having isaprefix and pciprefix
Michael Brown [Tue, 6 Jun 2006 15:41:21 +0000 (15:41 +0000)]
We now have just romprefix, rather than having isaprefix and pciprefix

16 years agoCut out almost all the optional code paths, drastically simplifying the
Michael Brown [Tue, 6 Jun 2006 15:33:39 +0000 (15:33 +0000)]
Cut out almost all the optional code paths, drastically simplifying the
flow of control through this code.

We now always add PCI and PnP headers even for ISA ROMs; there's no harm
in doing so.

UNDI loader is still missing.

16 years agoCode segment may not be writable; create the temporary pointer to the GDT
Michael Brown [Tue, 6 Jun 2006 15:30:28 +0000 (15:30 +0000)]
Code segment may not be writable; create the temporary pointer to the GDT
on the stack.

16 years agoCalculate _rom_size for the ROM prefix
Michael Brown [Tue, 6 Jun 2006 15:29:39 +0000 (15:29 +0000)]
Calculate _rom_size for the ROM prefix

16 years agoUse byte 6 for the checksum, rather than byte 5. (Byte 5 may be part of
Michael Brown [Tue, 6 Jun 2006 15:29:14 +0000 (15:29 +0000)]
Use byte 6 for the checksum, rather than byte 5.  (Byte 5 may be part of
the jmp instruction).

16 years agoForce pci.o to be included.
Michael Brown [Mon, 5 Jun 2006 16:17:52 +0000 (16:17 +0000)]
Force pci.o to be included.

Print warning message at probe time.

16 years agoLegacy drivers will not pad when necessary
Michael Brown [Mon, 5 Jun 2006 16:10:36 +0000 (16:10 +0000)]
Legacy drivers will not pad when necessary

16 years agoPNIC doesn't auto-pad.
Michael Brown [Mon, 5 Jun 2006 16:10:14 +0000 (16:10 +0000)]
PNIC doesn't auto-pad.

16 years agoAdded a very quick and dirty compatibility layer, to allow
Michael Brown [Mon, 5 Jun 2006 15:45:21 +0000 (15:45 +0000)]
Added a very quick and dirty compatibility layer, to allow
not-yet-updated drivers to at least function.

16 years agoAdded soon-to-be-requisite missing include.
Michael Brown [Mon, 5 Jun 2006 15:41:22 +0000 (15:41 +0000)]
Added soon-to-be-requisite missing include.

16 years ago- added most slk functions
Dan Lynch [Mon, 5 Jun 2006 15:03:11 +0000 (15:03 +0000)]
- added most slk functions

16 years agoImprove tcpdump legibility.
Michael Brown [Thu, 1 Jun 2006 19:23:52 +0000 (19:23 +0000)]
Improve tcpdump legibility.

16 years agoQuick hack to avoid trying to use an uninitialised net device.
Michael Brown [Thu, 1 Jun 2006 15:53:05 +0000 (15:53 +0000)]
Quick hack to avoid trying to use an uninitialised net device.

16 years agoUpdated retry timer mechanism to incorporate smoothed RTT estimation.
Michael Brown [Thu, 1 Jun 2006 14:33:52 +0000 (14:33 +0000)]
Updated retry timer mechanism to incorporate smoothed RTT estimation.

AoE now uses the retry timer mechanism.

16 years agoMake DBG_DISCARD correct
Michael Brown [Thu, 1 Jun 2006 12:11:09 +0000 (12:11 +0000)]
Make DBG_DISCARD correct

16 years agoBacking out last change; no immediate plans to make the whole block-device
Michael Brown [Thu, 1 Jun 2006 11:14:59 +0000 (11:14 +0000)]
Backing out last change; no immediate plans to make the whole block-device
layer asynchronous, so keeping the sync/async boundary within aoedev.c
seems cleanest for now.

16 years agoUntil we have a functioning UDP stack and PXE API again, there's not much
Michael Brown [Thu, 1 Jun 2006 11:07:31 +0000 (11:07 +0000)]
Until we have a functioning UDP stack and PXE API again, there's not much
point trying to use the old boot sequence.  Replaced with a call to the
AoE demo code, so that people can at least build and try something useful.

16 years agoAdded sample AoE test code to tree
Michael Brown [Thu, 1 Jun 2006 11:05:36 +0000 (11:05 +0000)]
Added sample AoE test code to tree

16 years agoPut in a method to get the MAC address for the AoE target. (It's not
Michael Brown [Wed, 31 May 2006 19:12:17 +0000 (19:12 +0000)]
Put in a method to get the MAC address for the AoE target.  (It's not
elegant, but it works).

16 years agoATA devices are now asynchronous. The ATA layer itself now performs the
Michael Brown [Wed, 31 May 2006 18:57:11 +0000 (18:57 +0000)]
ATA devices are now asynchronous.  The ATA layer itself now performs the
async_wait(), though we may wish to move this higher up the stack, and
consider making the block device model asynchronous.  (There is only a
marginal cost for synchronous devices, since they can simply call
async_done() before returning; async_wait() will work seamlessly in this
situation).

16 years agoMissing from previous checkin.
Michael Brown [Wed, 31 May 2006 18:45:43 +0000 (18:45 +0000)]
Missing from previous checkin.

This is the core portion of the async I/O interface.

16 years agoAdded generic asynchronous operations code.
Michael Brown [Wed, 31 May 2006 14:34:17 +0000 (14:34 +0000)]
Added generic asynchronous operations code.

Removed data_in_len and data_out_len from ata_command structure; the
lengths are implied by the sector count and the presence of the data_in
or data_out pointers.

Changed AoE code to use subcommands by default, and made aoe_issue()
nonblocking (with completion via async_wait()).

16 years agoAdded drivers/ata directory (forgot to check this in previously).
Michael Brown [Wed, 31 May 2006 14:31:48 +0000 (14:31 +0000)]
Added drivers/ata directory (forgot to check this in previously).

16 years agoOne bit of an ASCII character can make a big difference.
Michael Brown [Mon, 29 May 2006 21:00:00 +0000 (21:00 +0000)]
One bit of an ASCII character can make a big difference.

16 years agoAdded first sketch of a generic retry timer mechanism. The idea is to use
Michael Brown [Mon, 29 May 2006 14:55:07 +0000 (14:55 +0000)]
Added first sketch of a generic retry timer mechanism.  The idea is to use
these timer objects in AoE and UDP protocols (where there is no underlying
retransmission mechanism) without requiring each protocol to implement its
own individual retry logic.  Eventually, we should be able to use the same
timer code for TCP retransmissions as well.

16 years agoHandle multi-sector reads by splitting them into subcommands.
Michael Brown [Mon, 29 May 2006 08:25:31 +0000 (08:25 +0000)]
Handle multi-sector reads by splitting them into subcommands.

16 years agoInitial AoE implementation. Limitations are:
Michael Brown [Sun, 28 May 2006 23:29:43 +0000 (23:29 +0000)]
Initial AoE implementation.  Limitations are:

  Cannot yet handle reads of more than two sectors

  No retransmission

  No way to find out a target's MAC address (this proof of concept uses
  broadcasts)

These limitations shall not last long!  :)

16 years agoUse separate data-in and data-out buffers.
Michael Brown [Sun, 28 May 2006 23:26:42 +0000 (23:26 +0000)]
Use separate data-in and data-out buffers.

Increase code simplicity at the expense of around 64 bytes.

16 years agoAdd ETH_P_AOE
Michael Brown [Sun, 28 May 2006 21:47:52 +0000 (21:47 +0000)]
Add ETH_P_AOE

16 years agoTidy up comment
Michael Brown [Sun, 28 May 2006 14:40:04 +0000 (14:40 +0000)]
Tidy up comment

16 years agoFixed assembly on old versions of gas
Michael Brown [Sun, 28 May 2006 14:21:29 +0000 (14:21 +0000)]
Fixed assembly on old versions of gas

16 years agoAdded tcp_kick(). This speed up LILO and GRUB booting by almost two
Michael Brown [Sat, 27 May 2006 19:01:20 +0000 (19:01 +0000)]
Added tcp_kick().  This speed up LILO and GRUB booting by almost two
orders of magnitude.

16 years agoAvoid causing TX overflow on small TX queues.
Michael Brown [Sat, 27 May 2006 13:55:36 +0000 (13:55 +0000)]
Avoid causing TX overflow on small TX queues.

16 years agoRewrote to use the new net driver API, the updated PCI API, and the
Michael Brown [Sat, 27 May 2006 13:45:14 +0000 (13:45 +0000)]
Rewrote to use the new net driver API, the updated PCI API, and the
generic three-wire serial device support for EEPROM access.

16 years agoI have no idea how this ever worked before.
Michael Brown [Sat, 27 May 2006 13:43:56 +0000 (13:43 +0000)]
I have no idea how this ever worked before.

16 years agoMake PKB_ZLEN the minimum possible size of packet buffer (to allow for
Michael Brown [Sat, 27 May 2006 13:39:45 +0000 (13:39 +0000)]
Make PKB_ZLEN the minimum possible size of packet buffer (to allow for
hardware that can't autopad).

16 years agoTidied up debugging messages
Michael Brown [Sat, 27 May 2006 13:38:49 +0000 (13:38 +0000)]
Tidied up debugging messages

16 years agoAdded abstraction layer for a three-wire serial device (e.g. the EEPROM
Michael Brown [Fri, 26 May 2006 15:39:24 +0000 (15:39 +0000)]
Added abstraction layer for a three-wire serial device (e.g. the EEPROM
used on RTL8139 cards).

16 years agoNeed write permission to /dev/net/tun, not just read.
Michael Brown [Fri, 26 May 2006 08:15:31 +0000 (08:15 +0000)]
Need write permission to /dev/net/tun, not just read.

16 years agoUpdated to work with libprefix.
Michael Brown [Thu, 25 May 2006 22:04:47 +0000 (22:04 +0000)]
Updated to work with libprefix.

16 years agoDocumented the fact that the prefix can prot_call(main) without
Michael Brown [Thu, 25 May 2006 22:04:17 +0000 (22:04 +0000)]
Documented the fact that the prefix can prot_call(main) without
worrying about its stack being destroyed during the Etherboot run.

16 years agorelocate.o is now dragged in by the objects that require it; there is no
Michael Brown [Thu, 25 May 2006 01:34:13 +0000 (01:34 +0000)]
relocate.o is now dragged in by the objects that require it; there is no
need for a CONFIG_RELOCATE.

16 years agoRemoved some obsolete INIT_XXX constants.
Michael Brown [Thu, 25 May 2006 01:09:06 +0000 (01:09 +0000)]
Removed some obsolete INIT_XXX constants.

16 years agoAlso hide base memory region from E820 map.
Michael Brown [Thu, 25 May 2006 00:10:58 +0000 (00:10 +0000)]
Also hide base memory region from E820 map.

16 years agoinit_librm() and prot_call() are now real-mode far calls.
Michael Brown [Thu, 25 May 2006 00:06:45 +0000 (00:06 +0000)]
init_librm() and prot_call() are now real-mode far calls.

install() now calls relocate(), moves the protected-mode code to the new
location, and calls hide_etherboot().

16 years agoHas been obsolete for a while.
Michael Brown [Thu, 25 May 2006 00:04:37 +0000 (00:04 +0000)]
Has been obsolete for a while.

16 years agoUpdate relocate() to work with get_memmap().
Michael Brown [Thu, 25 May 2006 00:04:13 +0000 (00:04 +0000)]
Update relocate() to work with get_memmap().

Change semantics; relocate() now just finds a suitable location; it
doesn't actually perform the relocation itself.  Code in libprefix does
the copy in flat real mode.

16 years agoFix printf format warning error
Michael Brown [Thu, 25 May 2006 00:02:27 +0000 (00:02 +0000)]
Fix printf format warning error

16 years agoWhy should pushal/popal put the registers on the stack in a logical
Michael Brown [Thu, 25 May 2006 00:01:46 +0000 (00:01 +0000)]
Why should pushal/popal put the registers on the stack in a logical
order?

16 years agoTypo.
Michael Brown [Thu, 25 May 2006 00:00:53 +0000 (00:00 +0000)]
Typo.

16 years agoAdd a "count" field to struct memory_map.
Michael Brown [Thu, 25 May 2006 00:00:30 +0000 (00:00 +0000)]
Add a "count" field to struct memory_map.

16 years agoDefine a struct memory_map with a fixed number of entries, rather than
Michael Brown [Wed, 24 May 2006 14:41:27 +0000 (14:41 +0000)]
Define a struct memory_map with a fixed number of entries, rather than
requiring each caller to decide how many entries it wants to permit.

16 years agoRemove the automatic segment register save and restore; most users of
Michael Brown [Wed, 24 May 2006 14:11:36 +0000 (14:11 +0000)]
Remove the automatic segment register save and restore; most users of
REAL_CODE() don't need it.

16 years agoRemoved REAL_EXEC(); there is no longer any code using it.
Michael Brown [Wed, 24 May 2006 14:10:15 +0000 (14:10 +0000)]
Removed REAL_EXEC(); there is no longer any code using it.

16 years agoAdded potentially required "\n\t" on the end of asm_code_str
Michael Brown [Wed, 24 May 2006 14:06:28 +0000 (14:06 +0000)]
Added potentially required "\n\t" on the end of asm_code_str

16 years agoNBI is due for removal
Michael Brown [Wed, 24 May 2006 13:53:35 +0000 (13:53 +0000)]
NBI is due for removal

16 years agoWill be replaced with a block-device implementation.
Michael Brown [Wed, 24 May 2006 13:52:46 +0000 (13:52 +0000)]
Will be replaced with a block-device implementation.

16 years agoUpdated to REAL_CODE()
Michael Brown [Wed, 24 May 2006 13:50:40 +0000 (13:50 +0000)]
Updated to REAL_CODE()

16 years agoUpdated to REAL_CODE().
Michael Brown [Wed, 24 May 2006 13:48:16 +0000 (13:48 +0000)]
Updated to REAL_CODE().

int13_boot() now does its own segment register save and restore, ready
for the removal of segment register restoration from the libkir
generic code.

16 years agoUpdated to REAL_CODE()
Michael Brown [Wed, 24 May 2006 13:28:39 +0000 (13:28 +0000)]
Updated to REAL_CODE()

16 years agoUpdated to REAL_CODE().
Michael Brown [Wed, 24 May 2006 13:24:22 +0000 (13:24 +0000)]
Updated to REAL_CODE().

16 years agoUpdate to REAL_CODE()
Michael Brown [Wed, 24 May 2006 12:45:50 +0000 (12:45 +0000)]
Update to REAL_CODE()

16 years agoUpdated to REAL_CODE().
Michael Brown [Wed, 24 May 2006 12:32:57 +0000 (12:32 +0000)]
Updated to REAL_CODE().

16 years agoSet carry flag before calling INT 15,e801 and INT 15,e820.
Michael Brown [Wed, 24 May 2006 12:19:16 +0000 (12:19 +0000)]
Set carry flag before calling INT 15,e801 and INT 15,e820.

Ignore carry flag for INT 15,88; the Ralf Brown interrupt list says
that CF is unreliable for this call.

16 years agoSplit out REAL_CODE() from REAL_EXEC(), preparatory to removing REAL_EXEC
Michael Brown [Wed, 24 May 2006 09:51:04 +0000 (09:51 +0000)]
Split out REAL_CODE() from REAL_EXEC(), preparatory to removing REAL_EXEC
completely.

16 years agoRemove references to obsoleted REAL_CALL from documentation.
Michael Brown [Wed, 24 May 2006 09:16:48 +0000 (09:16 +0000)]
Remove references to obsoleted REAL_CALL from documentation.

16 years agoRemoved REAL_FRAGMENT and REAL_CALL, and left just REAL_EXEC (which is
Michael Brown [Wed, 24 May 2006 09:14:44 +0000 (09:14 +0000)]
Removed REAL_FRAGMENT and REAL_CALL, and left just REAL_EXEC (which is
the only one we actually use).  This allows REAL_EXEC fragments to
contain proper references to constraints (e.g. "%w0"), rather than having
to force the use of specific registers.

Note that the "num_constraints" parameter is now completely obsolete, and
that we can probably reduce the syntax to something like
  __asm__ __volatile__ ( REAL_CODE ( "asm statements" )
                         : output constraints
                         : input constraints
                         : clobber );
which would look much more natural, and avoid the need to always specify
a clobber list.

Add userptr_t to libkir.h, to allow it to at least compile.

16 years agoReplaced memsizes.c with smaller memmap.c, taking advantage of __data16,
Michael Brown [Wed, 24 May 2006 01:37:46 +0000 (01:37 +0000)]
Replaced memsizes.c with smaller memmap.c, taking advantage of __data16,
and creating a memory map that's easier to work with than the E820 map.

16 years agoCode to install the new E820 mangler (which doesn't require copying
Michael Brown [Tue, 23 May 2006 23:47:05 +0000 (23:47 +0000)]
Code to install the new E820 mangler (which doesn't require copying
down to base memory, since it is now in the base-memory-resident
.text16 section).

16 years agoAdd __{text,data}16_array, since there's no way I can see to make the
Michael Brown [Tue, 23 May 2006 23:42:45 +0000 (23:42 +0000)]
Add __{text,data}16_array, since there's no way I can see to make the
usual __{text,data}16 trick work with arrays.  gcc seems to accept the
__asm__ ( asmlabel ) only after the [] of the array declaration, not
before.

16 years agoCope with regions bigger than 4GB.
Michael Brown [Tue, 23 May 2006 23:33:37 +0000 (23:33 +0000)]
Cope with regions bigger than 4GB.

We now split e820 regions around ourselves, rather than just
truncating the e820 region.  This avoids the worst-case scenario of
losing all memory over 4GB.

It's more important to get the memory map right now that we're
expecting to still be loaded when the OS starts in several situations
(e.g. Linux with UNDI driver, any OS with iSCSI/AoE boot, etc.).

16 years ago- implemented printw (formatted string output, a la printf)
Dan Lynch [Mon, 22 May 2006 17:03:41 +0000 (17:03 +0000)]
- implemented printw (formatted string output, a la printf)
- implemented hline/vline (part of wborder family)
- screen cursor now relocates at same time as window cursor when
  restoring after a non-wrapping function