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

748 Commits

Author SHA1 Message Date
Michael Brown 190276a8b6 NBI is due for removal 2006-05-24 13:53:35 +00:00
Michael Brown 52125e158c Will be replaced with a block-device implementation. 2006-05-24 13:52:46 +00:00
Michael Brown 8110f9b082 Updated to REAL_CODE() 2006-05-24 13:50:40 +00:00
Michael Brown 595f161b51 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.
2006-05-24 13:48:16 +00:00
Michael Brown e8550035af Updated to REAL_CODE() 2006-05-24 13:28:39 +00:00
Michael Brown c4d688c005 Updated to REAL_CODE(). 2006-05-24 13:24:22 +00:00
Michael Brown 04d6005d77 Update to REAL_CODE() 2006-05-24 12:45:50 +00:00
Michael Brown 6631f46999 Updated to REAL_CODE(). 2006-05-24 12:32:57 +00:00
Michael Brown 53935e9dc6 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.
2006-05-24 12:19:16 +00:00
Michael Brown 7a53d07027 Split out REAL_CODE() from REAL_EXEC(), preparatory to removing REAL_EXEC
completely.
2006-05-24 09:51:04 +00:00
Michael Brown 83d80d9e79 Remove references to obsoleted REAL_CALL from documentation. 2006-05-24 09:16:48 +00:00
Michael Brown 3b525385af 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.
2006-05-24 09:14:44 +00:00
Michael Brown 77a65075a6 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.
2006-05-24 01:37:46 +00:00
Michael Brown 5e80847827 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).
2006-05-23 23:47:05 +00:00
Michael Brown 897313007b 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.
2006-05-23 23:42:45 +00:00
Michael Brown 5ec2b2c251 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.).
2006-05-23 23:33:37 +00:00
Dan Lynch bef8874842 - 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
2006-05-22 17:03:41 +00:00
Michael Brown 84a493b88d Allow vcprintf() to be called by external code such as the curses library.
Also trim another eight bytes from vsprintf.o.  :)
2006-05-22 15:41:01 +00:00
Dan Lynch f778500739 - fixes to _wputch to get positioning and wrap working properly
- fixes to wborder (same)
- addition of a few minor functions
2006-05-22 13:10:19 +00:00
Michael Brown 95956443e1 Fixed debug code 2006-05-21 16:04:41 +00:00
Michael Brown 9dfb9d84b4 Made the LBA48 example clearer. 2006-05-21 16:02:38 +00:00
Michael Brown 80958ff69c Added (untested) support for ATA devices. This code should be generic
enough to support both real IDE chipsets and AoE.
2006-05-21 16:01:23 +00:00
Michael Brown ca2519cea3 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)
2006-05-20 15:33:32 +00:00
Michael Brown af4aacb978 Added missing @file block 2006-05-20 13:25:07 +00:00
Michael Brown 4d0a0f822d Use insb/outsb; it's marginally faster. 2006-05-20 12:28:44 +00:00
Michael Brown 402ba15c64 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".
2006-05-19 18:54:38 +00:00
Michael Brown 444b885a7d Add EOVERFLOW==ERANGE 2006-05-19 18:53:12 +00:00
Michael Brown b9cbae58fa Expert advice tells me that we *do* have to explicitly state the
options even when we want to use the defaults.
2006-05-19 17:50:49 +00:00
Dan Lynch acf572905c - 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
2006-05-19 16:22:10 +00:00
Dan Lynch d166dc57ab - 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
2006-05-19 16:18:08 +00:00
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