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

214 Commits

Author SHA1 Message Date
Michael Brown c10698b8b4 Add NULL_TRAP as a config option 2006-06-11 01:55:43 +00:00
Michael Brown 286bf68faf Added a very quick and dirty compatibility layer, to allow
not-yet-updated drivers to at least function.
2006-06-05 15:45:21 +00:00
Dan Lynch 34cfbf55a4 - added most slk functions 2006-06-05 15:03:11 +00:00
Michael Brown 6ab4b99f41 Quick hack to avoid trying to use an uninitialised net device. 2006-06-01 15:53:05 +00:00
Michael Brown d6866202f9 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.
2006-06-01 11:07:31 +00:00
Michael Brown cf96d325d8 Missing from previous checkin.
This is the core portion of the async I/O interface.
2006-05-31 18:45:43 +00:00
Michael Brown 1dbafa8950 Tidied up debugging messages 2006-05-27 13:38:49 +00:00
Michael Brown 0479e9f541 relocate.o is now dragged in by the objects that require it; there is no
need for a CONFIG_RELOCATE.
2006-05-25 01:34:13 +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
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
Dan Lynch 2814681d20 all window primitives implemented 2006-05-18 17:51:19 +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 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 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 ceba6ecb75 Added generic device model. 2006-05-16 14:10:21 +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 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 f8f75cef5b BSS is now zeroed by libprefix (along with the otherwise non-zeroable
portions such as the stack) during the installation process.

init_fns() are called from main().  We need to think about initial
control flow some more.
2006-05-02 21:10:45 +00:00
Michael Brown a42092d2a0 Add a temporary snprintf, so that safely-written code can at least
compile, even if it won't yet be safe.
2006-04-30 12:01:31 +00:00
Michael Brown 8df7e74990 Fix up prototype of strtoul() to match POSIX. 2006-04-30 11:45:38 +00:00
Michael Brown 352bf1bda2 Move init.h to gpxe/init.h. 2006-04-30 01:08:52 +00:00
Michael Brown 23c494d14e Added basic code for implementing co-operative multitasking.
Yes, you really can do it in 65 bytes.
2006-04-29 16:42:09 +00:00
Michael Brown 51feeab445 Add an explicit failure debug message 2006-04-28 14:07:41 +00:00
Michael Brown cfae86f6c8 Glenn managed to shrink .text by 5 more bytes. 2006-04-25 21:48:16 +00:00
Michael Brown face774c4c Fixed erroneous comparison 2006-04-25 11:54:58 +00:00
Michael Brown 95f8a42930 Removed incorrect comment; malloc() is inefficient only when the
alignment and size are both powers of two, and there's no way to
specify an alignment through the malloc() interface anyway.
2006-04-25 10:41:49 +00:00
Michael Brown 4e92f29c9e Now passes trivial tests. free_memblock() needs neatening up. 2006-04-25 04:01:58 +00:00
Michael Brown b601a7d355 Updated memory allocator to improve support for unaligned or partially
aligned blocks.

Moved header to include/malloc.h, since we now also provide the
POSIX-like malloc()/free() pair.

Not yet tested.
2006-04-25 03:30:46 +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 b6b6a0b5fe First draft of a dynamic memory allocator 2006-04-24 15:21:18 +00:00
Michael Brown d24042f0bb Update now that if_ether.h has moved. 2006-04-19 01:56:10 +00:00
Michael Brown 49f933fbc3 Moved if_ether.h and if_arp.h to include/gpxe, for consistency with Linux
kernel.

Removed obsolete struct arprequest from if_arp.h and put it in nic.c so
that nic.c will still compile.  ARP will very shortly be handled by
net/arp.c instead.
2006-04-19 01:52:41 +00:00
Michael Brown af23ff8a24 Assertions are now handled via the POSIX-like <assert.h>. 2006-03-23 19:33:57 +00:00
Michael Brown bb7394b041 Merge from Etherboot 5.4 2006-03-16 17:59:51 +00:00
Michael Brown 708bbc43bc Merge from Etherboot 5.4 2006-03-16 17:40:55 +00:00
Michael Brown df9cbc23cc Added documentation and ASSERT() statements. 2005-06-06 12:01:19 +00:00
Michael Brown 33dbdda28e Allow data blocks to be less than sizeof ( struct buffer_free_block ) in
size.  (The restriction on the size of free blocks remains.)
2005-06-06 11:42:14 +00:00
Michael Brown cbed5ed9ad Always include code for sending multicast packets. 2005-06-02 10:14:26 +00:00
Michael Brown be7897523d IGMP protocol now uses the generic background protocol mechanism. 2005-06-01 22:22:14 +00:00
Michael Brown 85a380530d Add generic mechanism for background protocols (e.g. ARP, IGMP) 2005-06-01 22:18:38 +00:00
Geert Stappers 5265975334 patch of Helge Wagner 2005-05-31 11:32:45 +00:00
Michael Brown 0e494614b5 Some versions of doxygen seem to object to "@ret None" or similar. 2005-05-24 00:11:25 +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 8fcb6448bd Moved pxe_errors.c to pxe/interface/ 2005-05-23 22:47:21 +00:00
Michael Brown 6bcd74b65c Moved pxe_export.c to pxe.c, since the old pxe.c no longer exists. 2005-05-20 15:32:41 +00:00
Michael Brown a96759f9c8 Use "#var" rather than "@c var" for doxygen. 2005-05-20 10:27:02 +00:00
Michael Brown bf32da87f0 Doxygenation 2005-05-20 10:24:11 +00:00
Michael Brown 8bc4551f5e API docs to .h 2005-05-19 18:41:54 +00:00
Michael Brown 2ddbac101e Move API docs to buffer.h, implementation to buffer.c. 2005-05-19 18:32:04 +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 eff1cd867b errno.h now required in order to compile. 2005-05-19 14:49:56 +00:00
Michael Brown e911a74724 More documentation 2005-05-19 11:54:41 +00:00
Michael Brown a2915ad06d Added preliminary doxygen documentation 2005-05-19 00:17:48 +00:00
Michael Brown 0e921cdd9e More doxygen docs 2005-05-18 15:28:33 +00:00
Michael Brown d04b607eb9 Add doxygen documentation 2005-05-18 14:44:38 +00:00
Michael Brown 127362581f Document %m 2005-05-18 14:44:05 +00:00
Michael Brown 307cf36fca Linker symbols no longer defined in etherboot.h
Use %m to print error
2005-05-18 14:43:27 +00:00
Michael Brown ab07740755 First version 2005-05-17 18:39:27 +00:00
Michael Brown ff9104e029 Added errno, strerror and the "%m" printf metacharacter. These will allow
us to return proper PXE status codes, while simultaneously allowing for
more consistent error reporting (complete with verbose error messages as a
build-time option).
2005-05-17 18:26:41 +00:00
Michael Brown 40c7b127aa Added const to fill_buffer 2005-05-17 14:34:46 +00:00
Michael Brown 022661283a Load buffer is now handled by the autoload() function. 2005-05-17 13:44:08 +00:00
Michael Brown 510de6cb8c Restructured to allow per-object image formats 2005-05-17 13:40:31 +00:00
Michael Brown 0571dcdb05 Added print_images() and autoload(). 2005-05-17 13:38:24 +00:00
Michael Brown 9968c9513e Moved find_segment into elf_loader.c 2005-05-17 13:37:29 +00:00
Michael Brown 3ce6504f14 Use shared symbols for heap_ptr and heap_end 2005-05-17 13:35:43 +00:00
Michael Brown 6e8f29d3cb Image formats moved into the new config system 2005-05-17 13:33:49 +00:00
Michael Brown 5c8ea0b93a Add realloc, since the load buffer code requires it. 2005-05-13 13:20:16 +00:00
Michael Brown 59a1662978 Added debugging 2005-05-13 11:24:02 +00:00
Michael Brown 42250e9b1a Tidied up init_heap() 2005-05-13 11:16:14 +00:00
Michael Brown f0d048bf91 Added ASSERT() macro 2005-05-13 10:18:21 +00:00
Michael Brown eff4fa5a04 Merged the unaligned and aligned heap APIs and simplified the code. 2005-05-12 16:34:57 +00:00
Michael Brown a5a14dc05d Use the global load_buffer, and the boot_image function. 2005-05-09 18:10:04 +00:00
Michael Brown 73429d6da1 Make "struct buffer"s reusable between sessions. 2005-05-09 18:03:44 +00:00
Michael Brown 58ee2c4b2e First versions 2005-05-09 18:01:50 +00:00
Michael Brown 0fe74493f4 Protocols now load data into a buffer; they don't execute it. 2005-05-09 14:27:29 +00:00
Michael Brown bab2924e89 Return -1 to indicate buffer overflow. Allow buffer fill level to be read
easily from struct buffer.
2005-05-09 14:26:10 +00:00
Michael Brown a89651f3bb Added debugging 2005-05-09 13:47:04 +00:00
Michael Brown b2869ed6b8 Added explanatory comment. 2005-05-09 13:25:43 +00:00
Michael Brown e75b7480d0 Modified to use physical addresses, and to not assume that we can directly
refer to data outside of our data or stack segments.
2005-05-09 13:24:01 +00:00
Michael Brown ef05a27f25 Start of an implementation using doubly-linked lists and virtual
addresses.  This will have to be reworked to use physical addresses thanks
to the PXE spec.
2005-05-09 10:11:11 +00:00
Michael Brown 462234f373 Make vga_font const to avoid warning about large symbol 2005-05-03 13:17:08 +00:00
Michael Brown a918abc036 Split TCP code out into proto/tcp.c 2005-05-02 12:07:47 +00:00
Michael Brown cc980d1c94 Moved DOWNLOAD_PROTO_XXX options to config.h 2005-05-02 11:13:47 +00:00
Michael Brown f9f1d2c84c More URL parsing moved into url.c 2005-05-01 23:58:45 +00:00
Michael Brown d5bf9e71ea http.h obsoleted (no content) 2005-05-01 23:58:20 +00:00
Michael Brown 63482e4fe9 Made parse_url do more of the processing, to avoid duplicating parts of
nic.c in http.c
2005-05-01 19:10:04 +00:00
Michael Brown 2227a711fd umountall() handled by nfs.c's reset function 2005-05-01 15:08:19 +00:00
Michael Brown 85d9eae44e Moved protocols to proto/ 2005-05-01 14:04:11 +00:00
Michael Brown e1d6f3a8ac Add NMB_RESOLVER 2005-05-01 10:58:49 +00:00
Michael Brown 552f33c663 Always request DNS server. DHCP handling will be generalised in future. 2005-04-30 19:39:50 +00:00