Michael Brown
946967f09c
Abstracted out part of the concept of an SPI device to a generalised NVS
...
device.
Separated the mechanisms of non-volatile storage access and non-volatile
stored options.
2006-12-04 18:23:06 +00:00
Michael Brown
4cd56820ea
Basic non-volatile storage support
2006-11-29 02:41:08 +00:00
Michael Brown
c4677c7e73
Implemented realloc(), and changed the semantics of malloc(0) to allow
...
for realloc(0) being a valid way to free memory.
2006-11-24 16:51:18 +00:00
Michael Brown
6a18721ce8
Fixed off-by-one error
2006-11-22 04:54:17 +00:00
Michael Brown
ea97fe42dd
Note to self: do not write code late at night
2006-11-15 04:16:26 +00:00
Michael Brown
5753f2c58b
May as well add octal support to strtoul()
2006-11-15 02:57:24 +00:00
Michael Brown
bbfb2e02fd
Fixed endp bug in strtoul()
2006-11-15 02:54:28 +00:00
Michael Brown
65ff5357f1
Extend strtoul() to cope with hex as well as decimal. Doesn't cope
...
with octal yet, but we can probably live without that.
2006-11-15 02:52:06 +00:00
Michael Brown
88e38fa148
We don't actually have a stdio.h header file. Our printf() functions are
...
defined in vsprintf.h. (This may change, since vsprintf.h is a
non-standard name, but for now it's the one to use.)
There should be no need to include vsprintf.h just for DBG() statements,
since include/compiler.h forces it in for a debug build anyway.
2006-09-27 10:58:14 +00:00
Marty Connor
6ac78f6aff
added stdio.h to includes for DBG compilation
2006-09-27 05:57:06 +00:00
Marty Connor
1da4faa896
include stdio.h to suppress printf warning, general warnings fixups
2006-09-27 04:04:55 +00:00
Michael Brown
1a944a894e
Killed
2006-09-18 21:57:59 +00:00
Michael Brown
2f60aa42e7
Killed
2006-09-18 21:55:27 +00:00
Marty Connor
be0b19a690
commented out contents of core/nic.c, which should now be obsolete.
2006-09-18 15:08:08 +00:00
Michael Brown
69d2261016
Check that serial port init actually happens
2006-09-01 00:26:32 +00:00
Michael Brown
66dcd22f61
Added debug to catch initialisation failures
2006-09-01 00:19:09 +00:00
Michael Brown
c399e88aa3
Hopefully fix gcc3 build issue
2006-08-30 13:55:52 +00:00
Michael Brown
22511400c7
Added generic function for calculating ACPI table checksum
2006-08-27 22:02:08 +00:00
Michael Brown
27ba2d7527
Take out unused cleanup() function so that we can remove the link
...
dependency on dev.o.
2006-08-14 22:52:35 +00:00
Michael Brown
dbf3482ef5
Removed obsolete print_config()
2006-08-14 22:45:22 +00:00
Michael Brown
97439cb6eb
Kill off poll_interruptions(); it is lethal when we're acting as a PXE
...
stack or INT 13 emulator etc.
2006-08-14 22:29:51 +00:00
Michael Brown
3c35a0b16d
Added cmdl_show proof-of-concept
2006-08-11 18:40:27 +00:00
Michael Brown
dd9399f527
Added "hostname" and "ip" as sample settings
2006-08-11 18:29:20 +00:00
Michael Brown
fe774fe356
Added ipv4 configuration type
2006-08-11 18:22:41 +00:00
Michael Brown
7029fb8eff
Add string configuration type
2006-08-11 18:16:57 +00:00
Michael Brown
db46972349
Added basic infrastructure for manipulating settings.
2006-08-11 18:00:22 +00:00
Michael Brown
0dd0a8366e
Removed obsolete line merged in with the cmdline stuff
2006-08-09 03:22:29 +00:00
Michael Brown
56c995ff60
Aborted
2006-08-09 02:37:05 +00:00
Marty Connor
41af7457a8
Merge of Fredrik Hultin command_line
2006-08-09 02:30:35 +00:00
Michael Brown
6e3e5efaed
Accept '%i' as a synonym for '%d'.
2006-07-25 14:33:20 +00:00
Michael Brown
e74e20cb55
Remove the static IP address hack from netdevice.c, and change the
...
default test to the DHCP test.
2006-07-20 02:51:52 +00:00
Michael Brown
35b0233baa
Tidy up hex_dump() output.
2006-07-17 13:04:29 +00:00
Michael Brown
3acbff4f00
How did this ever work properly before?
2006-07-13 18:27:23 +00:00
Marty Connor
eb091f03e3
fix printf format args
2006-06-29 19:04:25 +00:00
Marty Connor
e8cc1c4333
Removed vestigal FILO code
2006-06-29 18:07:02 +00:00
Dan Lynch
446c1a3372
- deprecated in favour of a split library model
2006-06-27 11:05:13 +00:00
Michael Brown
3c8aafa209
Simplify RX data path.
...
Kill off the static single net device and move to proper dynamic
registration (which we need with the new device model).
Break the (flawed) assumption that all network-layer protocols can use
ARP; such network-layer protocols (i.e. IPv4) must now register as an ARP
protocol using ARP_NET_PROTOCOL() and provide a single method for checking
the existence of a local network-layer address.
2006-06-17 22:36:27 +00:00
Michael Brown
8aeead7c1c
Remove dependency on arptable[] (which is no longer used).
2006-06-16 14:48:31 +00:00
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