Michael Brown [Thu, 1 Jun 2006 15:53:05 +0000 (15:53 +0000)]
Quick hack to avoid trying to use an uninitialised net device.
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.
Michael Brown [Thu, 1 Jun 2006 12:11:09 +0000 (12:11 +0000)]
Make DBG_DISCARD correct
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.
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.
Michael Brown [Thu, 1 Jun 2006 11:05:36 +0000 (11:05 +0000)]
Added sample AoE test code to tree
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).
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).
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.
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()).
Michael Brown [Wed, 31 May 2006 14:31:48 +0000 (14:31 +0000)]
Added drivers/ata directory (forgot to check this in previously).
Michael Brown [Mon, 29 May 2006 21:00:00 +0000 (21:00 +0000)]
One bit of an ASCII character can make a big difference.
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.
Michael Brown [Mon, 29 May 2006 08:25:31 +0000 (08:25 +0000)]
Handle multi-sector reads by splitting them into subcommands.
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! :)
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.
Michael Brown [Sun, 28 May 2006 21:47:52 +0000 (21:47 +0000)]
Add ETH_P_AOE
Michael Brown [Sun, 28 May 2006 14:40:04 +0000 (14:40 +0000)]
Tidy up comment
Michael Brown [Sun, 28 May 2006 14:21:29 +0000 (14:21 +0000)]
Fixed assembly on old versions of gas
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.
Michael Brown [Sat, 27 May 2006 13:55:36 +0000 (13:55 +0000)]
Avoid causing TX overflow on small TX queues.
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.
Michael Brown [Sat, 27 May 2006 13:43:56 +0000 (13:43 +0000)]
I have no idea how this ever worked before.
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).
Michael Brown [Sat, 27 May 2006 13:38:49 +0000 (13:38 +0000)]
Tidied up debugging messages
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).
Michael Brown [Fri, 26 May 2006 08:15:31 +0000 (08:15 +0000)]
Need write permission to /dev/net/tun, not just read.
Michael Brown [Thu, 25 May 2006 22:04:47 +0000 (22:04 +0000)]
Updated to work with libprefix.
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.
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.
Michael Brown [Thu, 25 May 2006 01:09:06 +0000 (01:09 +0000)]
Removed some obsolete INIT_XXX constants.
Michael Brown [Thu, 25 May 2006 00:10:58 +0000 (00:10 +0000)]
Also hide base memory region from E820 map.
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().
Michael Brown [Thu, 25 May 2006 00:04:37 +0000 (00:04 +0000)]
Has been obsolete for a while.
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.
Michael Brown [Thu, 25 May 2006 00:02:27 +0000 (00:02 +0000)]
Fix printf format warning error
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?
Michael Brown [Thu, 25 May 2006 00:00:53 +0000 (00:00 +0000)]
Typo.
Michael Brown [Thu, 25 May 2006 00:00:30 +0000 (00:00 +0000)]
Add a "count" field to struct memory_map.
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.
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.
Michael Brown [Wed, 24 May 2006 14:10:15 +0000 (14:10 +0000)]
Removed REAL_EXEC(); there is no longer any code using it.
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
Michael Brown [Wed, 24 May 2006 13:53:35 +0000 (13:53 +0000)]
NBI is due for removal
Michael Brown [Wed, 24 May 2006 13:52:46 +0000 (13:52 +0000)]
Will be replaced with a block-device implementation.
Michael Brown [Wed, 24 May 2006 13:50:40 +0000 (13:50 +0000)]
Updated 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.
Michael Brown [Wed, 24 May 2006 13:28:39 +0000 (13:28 +0000)]
Updated to REAL_CODE()
Michael Brown [Wed, 24 May 2006 13:24:22 +0000 (13:24 +0000)]
Updated to REAL_CODE().
Michael Brown [Wed, 24 May 2006 12:45:50 +0000 (12:45 +0000)]
Update to REAL_CODE()
Michael Brown [Wed, 24 May 2006 12:32:57 +0000 (12:32 +0000)]
Updated to REAL_CODE().
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.
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.
Michael Brown [Wed, 24 May 2006 09:16:48 +0000 (09:16 +0000)]
Remove references to obsoleted REAL_CALL from documentation.
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.
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.
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).
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.
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.).
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
Michael Brown [Mon, 22 May 2006 15:41:01 +0000 (15:41 +0000)]
Allow vcprintf() to be called by external code such as the curses library.
Also trim another eight bytes from vsprintf.o. :)
Dan Lynch [Mon, 22 May 2006 13:10:19 +0000 (13:10 +0000)]
- fixes to _wputch to get positioning and wrap working properly
- fixes to wborder (same)
- addition of a few minor functions
Michael Brown [Sun, 21 May 2006 16:04:41 +0000 (16:04 +0000)]
Fixed debug code
Michael Brown [Sun, 21 May 2006 16:02:38 +0000 (16:02 +0000)]
Made the LBA48 example clearer.
Michael Brown [Sun, 21 May 2006 16:01:23 +0000 (16:01 +0000)]
Added (untested) support for ATA devices. This code should be generic
enough to support both real IDE chipsets and AoE.
Michael Brown [Sat, 20 May 2006 15:33:32 +0000 (15:33 +0000)]
Refactored to reduce code size; now down from 1304 to 1105 bytes.
Tidied up debug messages; the log now contains one line per INT 13
operation, looking like
INT 13,08 (80): Get drive parameters
INT 13,02 (80): Read: C/H/S 0/47/14 = LBA 0xb9e <-> 1084:0000 (count 106)
Michael Brown [Sat, 20 May 2006 13:25:07 +0000 (13:25 +0000)]
Added missing @file block
Michael Brown [Sat, 20 May 2006 12:28:44 +0000 (12:28 +0000)]
Use insb/outsb; it's marginally faster.
Michael Brown [Fri, 19 May 2006 18:54:38 +0000 (18:54 +0000)]
READ CAPACITY (16) turns out to be an optional command (even though
READ(16) is mandatory); we must use READ CAPACITY (10) first and then
use READ CAPACITY (16) if the READ CAPACITY (10) returns "out of range".
Michael Brown [Fri, 19 May 2006 18:53:12 +0000 (18:53 +0000)]
Add EOVERFLOW==ERANGE
Michael Brown [Fri, 19 May 2006 17:50:49 +0000 (17:50 +0000)]
Expert advice tells me that we *do* have to explicitly state the
options even when we want to use the defaults.
Dan Lynch [Fri, 19 May 2006 16:22:10 +0000 (16:22 +0000)]
- made some of the bit shifting attribute access simpler (in my mind)
- added extern declarations for global vars
- removed comments from static inlines (too time consuming to do them
all, considering all so far have been due to the ridiculous amount of
redundancy within the API spec)
- removed a few more extern func decls for funcs that cannot be
implemented at this time
Dan Lynch [Fri, 19 May 2006 16:18:08 +0000 (16:18 +0000)]
- made _wputch wrap lines as well as cols (wraps back to line 0, as we have not way to scroll...)
- implemented color_content, wborder, wblrtobot, wclrtoeol, wcolor_set and several small functions
- added rest of expected global variables
Michael Brown [Fri, 19 May 2006 15:06:51 +0000 (15:06 +0000)]
Add the concept of a "user pointer" (similar to the void __user * in
the kernel), which encapsulates the information needed to refer to an
external buffer. Under normal operation, this can just be a void *
equivalent, but under -DKEEP_IT_REAL it would be a segoff_t equivalent.
Use this concept to avoid the need for bounce buffers in int13.c,
which reduces memory usage and opens up the possibility of using
multi-sector reads.
Extend the block-device API and the SCSI block device implementation
to support multi-sector reads.
Update iscsi.c to use user buffers.
Move the obsolete portions of realmode.h to old_realmode.h.
MS-DOS now boots an order of magnitude faster over iSCSI (~10 seconds
from power-up to C:> prompt in bochs).
Michael Brown [Fri, 19 May 2006 14:51:59 +0000 (14:51 +0000)]
Use typeof(sizeof(...)) to define a size_t. This stops gcc complaining
about format errors for %zX arguments.
Michael Brown [Fri, 19 May 2006 00:31:42 +0000 (00:31 +0000)]
Documented login parameters that we negotiate.
Michael Brown [Fri, 19 May 2006 00:20:08 +0000 (00:20 +0000)]
iSCSI writes seem to be working (at least, the ethereal trace shows no
errors; still need to verify data integrity).
SCSI response PDUs are handled: status and sense data (if available) are
returned via the scsi_command structure.
Updated iSCSI session parameter usage.
Michael Brown [Thu, 18 May 2006 21:38:16 +0000 (21:38 +0000)]
All uses iscsi_state were removed some time ago; removing the
declaration.
Michael Brown [Thu, 18 May 2006 21:23:38 +0000 (21:23 +0000)]
Re-enable -Wformat, since our printf() is now more standards-conformant.
Dan Lynch [Thu, 18 May 2006 17:51:19 +0000 (17:51 +0000)]
all window primitives implemented
Michael Brown [Thu, 18 May 2006 13:22:32 +0000 (13:22 +0000)]
Updated to new SourceForge CVS locations, and fix a couple of minor
mistakes.
Michael Brown [Wed, 17 May 2006 17:41:50 +0000 (17:41 +0000)]
Set ErrorRecoveryLevel=0 (we don't want to have to handle it).
Michael Brown [Wed, 17 May 2006 17:31:18 +0000 (17:31 +0000)]
Added missing drivers/scsi
Michael Brown [Wed, 17 May 2006 17:16:24 +0000 (17:16 +0000)]
Split debug functions out into core/debug.c, so that they can be
automatically linked in on demand.
Corrected warnings in misc.c. strtoul() really should be
unsigned long strtoul ( const char *p, const char **endp, int base )
but such is not the ANSI standard.
Michael Brown [Wed, 17 May 2006 01:12:11 +0000 (01:12 +0000)]
Strip down i386 PCI configuration space I/O to the bare minimum. A
typical build will now include 880 bytes of PCI support code, compared to
2327 bytes in Etherboot 5.4.
(There is a slight cost of around 5 extra bytes per access to a
non-constant config space address; this should be an overall win.
Driver-specific accesses will usually be to constant addresses, for
which there is no additional cost.)
Michael Brown [Tue, 16 May 2006 15:12:06 +0000 (15:12 +0000)]
Restructured PCI subsystem to fit the new device model.
Generic PCI code now handles 64-bit BARs correctly when setting
"membase"; drivers should need to call pci_bar_start() only if they want
to use BARs other than the first memory or I/O BAR.
Split rarely-used PCI functions out into pciextra.c.
Core PCI code is now 662 bytes (down from 1308 bytes in Etherboot 5.4).
284 bytes of this saving comes from the pci/pciextra split.
Cosmetic changes to lots of drivers (e.g. vendor_id->vendor in order to
match the names used in Linux).
Michael Brown [Tue, 16 May 2006 15:01:26 +0000 (15:01 +0000)]
Missed a reference to heap.h.
Michael Brown [Tue, 16 May 2006 15:00:36 +0000 (15:00 +0000)]
Tear out old heap code, replace with code that simply allocates memory
for use by malloc().
This breaks the image-loading code (which previously used the heap to
allocate the buffer for downloading the image), but that's not a major
concern since I'm going to tear out all the image formats within the next
couple of days anyway. Byebye, NBI! :)
Michael Brown [Tue, 16 May 2006 14:42:43 +0000 (14:42 +0000)]
Fix typo
Michael Brown [Tue, 16 May 2006 14:42:15 +0000 (14:42 +0000)]
Kill off the "all devices are boot devices" idea
Michael Brown [Tue, 16 May 2006 14:14:31 +0000 (14:14 +0000)]
Add list_for_each_entry_safe.
Michael Brown [Tue, 16 May 2006 14:10:21 +0000 (14:10 +0000)]
Added generic device model.
Michael Brown [Mon, 15 May 2006 09:51:18 +0000 (09:51 +0000)]
Change movetoyx(), putc() and getc() to methods of the screen.
Dan Lynch [Mon, 15 May 2006 09:34:27 +0000 (09:34 +0000)]
fixed build error (danjlynch, repeat: this is *not* perl, this is *not* perl...)
Dan Lynch [Mon, 15 May 2006 09:29:48 +0000 (09:29 +0000)]
lightweight xcurses implementation for etherboot (Michael made me do it...)
Michael Brown [Sun, 14 May 2006 23:46:28 +0000 (23:46 +0000)]
Add INT 13,41 (extensions installation check). LILO's MBR now uses
linear calls to load the MS-DOS boot sector in my test setup.
Michael Brown [Sun, 14 May 2006 23:29:16 +0000 (23:29 +0000)]
Split "iSCSI as a SCSI device" out from "iSCSI as a TCP protocol".
Michael Brown [Sun, 14 May 2006 18:17:29 +0000 (18:17 +0000)]
Fix a couple of minor typos.
Michael Brown [Sun, 14 May 2006 14:13:55 +0000 (14:13 +0000)]
Also capture INT 19 as a failure path, to allow for boot sectors that
don't conform to BBS (e.g. the one created by mkdosfs).
Michael Brown [Sun, 14 May 2006 13:44:47 +0000 (13:44 +0000)]
Add int13_boot(), to allow booting from INT 13 emulated drives.