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

718 Commits

Author SHA1 Message Date
Michael Brown d48d0fb1bb 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).
2006-05-19 15:06:51 +00:00
Michael Brown 0ab92faedb Use typeof(sizeof(...)) to define a size_t. This stops gcc complaining
about format errors for %zX arguments.
2006-05-19 14:51:59 +00:00
Michael Brown c69c1ec540 Documented login parameters that we negotiate. 2006-05-19 00:31:42 +00:00
Michael Brown a280587cde 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.
2006-05-19 00:20:08 +00:00
Michael Brown b531bd2bda All uses iscsi_state were removed some time ago; removing the
declaration.
2006-05-18 21:38:16 +00:00
Michael Brown 53b682f3a2 Re-enable -Wformat, since our printf() is now more standards-conformant. 2006-05-18 21:23:38 +00:00
Dan Lynch 2814681d20 all window primitives implemented 2006-05-18 17:51:19 +00:00
Michael Brown 7d239660fb Updated to new SourceForge CVS locations, and fix a couple of minor
mistakes.
2006-05-18 13:22:32 +00:00
Michael Brown 813a052dc3 Set ErrorRecoveryLevel=0 (we don't want to have to handle it). 2006-05-17 17:41:50 +00:00
Michael Brown 61d7b8a5ef Added missing drivers/scsi 2006-05-17 17:31:18 +00:00
Michael Brown a4143e8c87 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.
2006-05-17 17:16:24 +00:00
Michael Brown 6b6096d28b 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.)
2006-05-17 01:12:11 +00:00
Michael Brown 15ee09ed10 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).
2006-05-16 15:12:06 +00:00
Michael Brown fcdab6299c Missed a reference to heap.h. 2006-05-16 15:01:26 +00:00
Michael Brown 0afa9db2de 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!  :)
2006-05-16 15:00:36 +00:00
Michael Brown 689218618f Fix typo 2006-05-16 14:42:43 +00:00
Michael Brown 441189c6f8 Kill off the "all devices are boot devices" idea 2006-05-16 14:42:15 +00:00
Michael Brown 7cd0390013 Add list_for_each_entry_safe. 2006-05-16 14:14:31 +00:00
Michael Brown ceba6ecb75 Added generic device model. 2006-05-16 14:10:21 +00:00
Michael Brown 6b514393d3 Change movetoyx(), putc() and getc() to methods of the screen. 2006-05-15 09:51:18 +00:00
Dan Lynch a2799051b0 fixed build error (danjlynch, repeat: this is *not* perl, this is *not* perl...) 2006-05-15 09:34:27 +00:00
Dan Lynch dccc6aed3a lightweight xcurses implementation for etherboot (Michael made me do it...) 2006-05-15 09:29:48 +00:00
Michael Brown 295e11b2b0 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.
2006-05-14 23:46:28 +00:00
Michael Brown f25731d08f Split "iSCSI as a SCSI device" out from "iSCSI as a TCP protocol". 2006-05-14 23:29:16 +00:00
Michael Brown 29fb77b0a4 Fix a couple of minor typos. 2006-05-14 18:17:29 +00:00
Michael Brown 6e42cb95bd 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).
2006-05-14 14:13:55 +00:00
Michael Brown 4435667a00 Add int13_boot(), to allow booting from INT 13 emulated drives. 2006-05-14 13:44:47 +00:00
Michael Brown b4f941b257 Specify attributes on .text16. 2006-05-14 13:39:27 +00:00
Michael Brown eb6b8e8d70 Handle the '"%c", 0' case correctly. 2006-05-14 11:55:30 +00:00
Michael Brown efd6281a35 Correctly handle zero-length buffers. 2006-05-14 11:18:42 +00:00
Michael Brown 25f5d114a0 Updated documentation.
Shaved around 100 bytes off vsprintf.o.  It's now 50 bytes smaller than
the old implementation and provides much more conformant semantics,
including the ability to return the number of characters that would have
been printed to the string had the buffer been big enough.  (iSCSI needs
this functionality).
2006-05-14 03:31:20 +00:00
Michael Brown 2421723a15 Rewrote printf and friends to better support standard C semantics. 2006-05-14 02:51:55 +00:00
Michael Brown f99e7a375e At least cope with "%llx" by reading the correct-sized va_arg from the
stack, even if we don't yet print it out.

At some point, vsprintf() needs to be fixed up so that it can correctly
cope with limited-sized buffers (i.e. vsnprintf), long longs, and
standard format specifiers (e.g. "%04x").  We should also remove the
special types (MAC addresses and IP addresses).  This would then enable
us to use gcc's ability to type-check printf format strings.
2006-05-13 11:50:52 +00:00
Michael Brown 21493646c2 Moved to net/tcp/iscsi.c. 2006-05-13 11:45:49 +00:00
Michael Brown 5080668704 Provide access to rm_cs and rm_ds from protected-mode code. 2006-05-13 11:45:31 +00:00
Michael Brown dc8d429ec6 Provide a global counter for the number of interrupts hooked. 2006-05-13 11:44:53 +00:00
Michael Brown 63499e9cfd Allow re-entrancy and provide a global counter of the number of
interrupts hooked.
2006-05-13 11:44:11 +00:00
Michael Brown d822b3d4cd Define BIOS data segment in bios.h 2006-05-13 11:43:07 +00:00
Michael Brown a27defa483 Add flag definitions. 2006-05-13 11:42:07 +00:00
Michael Brown d2c22ec9bb Add INT 13 emulation layer (which provides an interface to gPXE block
devices).
2006-05-13 11:41:36 +00:00
Michael Brown 1ad72e0e79 Add 64-bit byte-swapping operations. 2006-05-13 11:40:39 +00:00
Michael Brown 5009f8d6a2 Provide a SCSI device interface to the iSCSI protocol 2006-05-13 11:39:46 +00:00
Michael Brown f33f01c126 Defined SCSI device interface, and added SCSI block device
implementation.
2006-05-13 11:37:50 +00:00
Michael Brown 8638a5e471 Defined a block device interface. 2006-05-13 11:36:30 +00:00
Michael Brown 1838b58c3f Add drivers/block and arch/i386/interface/pcbios 2006-05-13 11:35:29 +00:00
Michael Brown 568cad0ddc (Redoing check-in lost by SourceForge's failure.) 2006-05-13 11:30:03 +00:00
Michael Brown 8a229a16f6 (Redoing check-in lost by SourceForge's failure.)
Moved to net/
2006-05-13 11:24:25 +00:00
Michael Brown 847f38f4ac (Redoing check-in lost by SourceForge's failure.)
Add method for hooking real-mode interrupt vectors.
2006-05-13 11:19:06 +00:00
Michael Brown f7b963da51 (Redoing check-in lost by SourceForge's failure.)
Use .text16.data section with "aw" attributes, to avoid section type
conflicts when placing both code and data into .text16.

Add __from_{text16,data16}.
2006-05-13 11:11:55 +00:00
Michael Brown 97d265f8dc (Redoing check-in lost by SourceForge's failure.)
Avoid optimisation errors under -fstrict-aliasing.
2006-05-13 11:10:24 +00:00