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

225 Commits

Author SHA1 Message Date
Michael Brown 5a54225aef Added support for INT 13,15; NTLDR calls it (though it may not
actually do anything with the result, since it carried on using us
even when we returned failure).
2006-08-27 01:22:01 +00:00
Michael Brown 6abfaa153b Towards making KEEP_IT_REAL work again.
Fix bug that caused over-allocation of .text16 and .data16 memory areas
by a factor of 16.
2006-08-24 13:18:05 +00:00
Michael Brown 6fd1bd0510 Added missing check-in 2006-06-09 10:19:17 +00:00
Michael Brown fdf62528ca It's astonishing how long really fundamental bugs can survive without
being noticed...
2006-06-08 15:06:09 +00:00
Michael Brown 191a906338 Fix some remarkably obvious mistakes in pcidirect.h 2006-06-08 14:57:04 +00:00
Michael Brown e4f8d6eed7 Add a "count" field to struct memory_map. 2006-05-25 00:00:30 +00:00
Michael Brown 986f6ffff1 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.
2006-05-24 14:41:27 +00:00
Michael Brown edcf89e2b0 Remove the automatic segment register save and restore; most users of
REAL_CODE() don't need it.
2006-05-24 14:11:36 +00:00
Michael Brown 02cf755f3f Removed REAL_EXEC(); there is no longer any code using it. 2006-05-24 14:10:15 +00:00
Michael Brown 103aff3ae2 Added potentially required "\n\t" on the end of asm_code_str 2006-05-24 14:06:28 +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 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 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 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 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 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 2421723a15 Rewrote printf and friends to better support standard C semantics. 2006-05-14 02:51:55 +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 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 568cad0ddc (Redoing check-in lost by SourceForge's failure.) 2006-05-13 11:30:03 +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
Michael Brown f8e087767b Allow access to variables in .text16 as well as .data16. Chained
interrupt vectors, for example, will be easiest to handle if placed in
.text16.
2006-05-06 18:57:31 +00:00
Michael Brown f4429533a6 Added methods for efficiently declaring and accessing variables in
.data16.  librm will need to supply "char *data16", i.e. the virtual
address of the start of .data16.
2006-05-04 17:00:20 +00:00
Michael Brown 9e1dd6402d <name>_size variable is no longer needed, since we don't copy the code.
However, it's worth adding a .size directive so that objdump reports the
correct sizes for the code fragments.
2006-05-02 16:38:46 +00:00
Michael Brown 9fcded3d23 Towards a(nother) new real-mode infrastructure, in which we take
advantage of the fact that we have to have a permanently-resident block
in base memory.
2006-05-02 15:41:21 +00:00
Michael Brown 9c9208a132 Put the TCP connection periodic processing in tcp.c, where it belongs. 2006-04-30 02:08:42 +00:00
Michael Brown 7a82c3eca3 Added missing ssize_t 2006-04-25 12:55:23 +00:00
Michael Brown 832e86246b gcc is rather over-aggressive about optimising out static data structures
even when __atribute__ (( unused )) is correctly set...
2006-04-24 18:31:37 +00:00
Michael Brown 824d6ffa7f Header rearrangement.
I want to get to the point where any header in include/ reflects a
standard user-level header (e.g. a POSIX header), while everything that's
specific to gPXE lives in include/gpxe/.  Headers that reflect a Linux
header (e.g. if_ether.h) should also be in include/gpxe/, with the same
name as the Linux header and, preferably, the same names used for the
definitions.
2006-04-24 15:42:49 +00:00
Michael Brown 510ccb2900 Added __constant_memcpy() based on version in Linux's string.h.
Added memswap().
2006-04-24 15:25:25 +00:00
Michael Brown 7b423c0988 Fixes for gcc >= 3.2 from Georg Baum 2005-05-23 23:47:54 +00:00
Michael Brown 809933d9f7 Split PXE code into preboot, udp, tftp, undi and loader units.
PXE code now compiles without errors (though it won't actually work).
2005-05-23 23:32:56 +00:00
Michael Brown 8becf0f65f Rearranging PXE header files 2005-05-23 22:45:48 +00:00
Michael Brown d3dec7c331 Update to cope with changes in registers.h 2005-05-20 11:23:51 +00:00
Michael Brown 5231b858c9 Don't use anonymous entries in a struct; it seems to aggravate gcc 3.4.3. 2005-05-20 11:22:09 +00:00
Michael Brown 4e87543c74 Synced across updates from Etherboot 5.4 tree 2005-05-19 16:47:19 +00:00
Michael Brown d0c9183903 Doxygenation 2005-05-19 14:51:37 +00:00
Michael Brown dd475a9b8c Add a const to avoid a warning 2005-05-19 13:02:38 +00:00
Michael Brown 9c832a6a69 First version 2005-05-17 13:41:00 +00:00
Michael Brown 479fb900a1 Added copy_phys_to_phys 2005-05-17 13:34:57 +00:00
Michael Brown 3bbf5f28a3 Use __unused instead of __used for static data structures.
Remove compiler.h defines from osdep.h
2005-05-17 12:16:28 +00:00
Michael Brown b94def2088 Include string.h, because we need to define copy_{to,from}_phys 2005-05-09 18:03:14 +00:00
Michael Brown 116f17f605 off_t should be signed. 2005-05-09 14:26:25 +00:00
Michael Brown e3f2aa7b4d Add off_t and physaddr_t, and the copy_{to,from}_phys helper routines. 2005-05-09 13:21:56 +00:00
Michael Brown dc0aa58fb2 Add memcpy 2005-05-09 12:48:00 +00:00
Michael Brown c08671e5fc Missing include 2005-04-27 12:17:09 +00:00
Michael Brown b9e72856b6 Post-relocation functions use the generic table mechanism. 2005-04-27 12:10:24 +00:00
Michael Brown 3dbdeb588f ISA bus driver updated to report devices as present only if a driver
thinks they are.
Other bus drivers modified for consistency.
2005-04-26 12:30:14 +00:00
Michael Brown fcee25024f BIOS floppy handling code moved to where it will really live. 2005-04-25 19:29:55 +00:00
Michael Brown c245ab75ad Moved disk functions to drivers/bus/bios_disks.c 2005-04-18 15:35:39 +00:00
Michael Brown 2c36f5e6c7 Save a few bytes by using naturally-sized ints. 2005-04-18 09:17:27 +00:00
Michael Brown 1a6ca649a2 Made copy_{to,from}_real volatile, so that they don't get optimised away.
Added REAL_FRAGMENT(), because it could conceivably be useful.
2005-04-17 12:17:06 +00:00
Michael Brown e44e5c7247 compiler.h is now always included on the command line. 2005-04-14 11:50:26 +00:00
Michael Brown 3095881c54 For pci_io.c 2005-04-12 16:44:50 +00:00
Michael Brown 87508aa0b2 arch_initialise() is now sufficiently generic that we may as well just
call it initialise() and place it in main.c.  :)
2005-04-10 18:30:34 +00:00
Michael Brown f06e8c9707 Added post-relocation function table. 2005-04-10 18:18:37 +00:00
Michael Brown 44e62317be Add librm_base. 2005-04-10 16:44:49 +00:00
Michael Brown dfb9c44994 hooks.o is now a single object, rather than having separate hooks.o and
hooks_rm.o
2005-04-10 16:44:29 +00:00
Michael Brown 44eee81d11 Don't build relocate() under KEEP_IT_REAL 2005-04-09 17:05:35 +00:00
Michael Brown 97ced37c71 Need to provide sizeof(struct free_base_memory_header) to assembly code. 2005-04-09 16:13:19 +00:00
Michael Brown 0574136c6d Split out from etherboot.h 2005-04-09 15:01:09 +00:00
Michael Brown 9cc90cbb07 First version 2005-04-09 13:32:26 +00:00
Michael Brown 0ff80b477d Merged mcb30-realmode-redesign back to HEAD 2005-04-08 15:01:17 +00:00
Michael Brown 3d6123e69a Initial revision 2005-03-08 18:53:11 +00:00