Michael Brown
e106a39ce8
Added missing include of stdint.h
2006-12-08 01:21:13 +00:00
Michael Brown
496563071d
Added strdup()
2006-12-08 00:34:47 +00:00
Michael Brown
1e4a838f55
Added missing prototype
2006-12-08 00:21:08 +00:00
Michael Brown
be0cd1cddd
Added a functional version of getopt() and getopt_long(), ready for use
...
in our commands.
2006-12-07 03:54:57 +00:00
Michael Brown
29db66fb51
Add support for non-volatile stored options in the RTL8139 EEPROM.
2006-12-06 20:45:44 +00:00
Michael Brown
2863d1a1de
inet_aton() has a non-traditional return value
2006-12-06 20:44:29 +00:00
Michael Brown
38ae94f8ce
A cleaner method of handling login redirection; just use the existing
...
reconnection mechanism. This avoids the problems of trying to reuse
the TCP connection structure before the old connection has cleanly exited.
2006-12-06 19:53:56 +00:00
Michael Brown
d2bf7abe75
Added write support for three-wire devices (e.g. the RTL8139 EEPROM)
2006-12-06 19:51:58 +00:00
Michael Brown
ac401f481d
Verify data after writing
2006-12-06 18:51:31 +00:00
Michael Brown
5edb85c8b4
Work around another confused-by-RST bug
2006-12-06 18:09:33 +00:00
Michael Brown
d88832ad7e
Support PXE and iSCSI by default
2006-12-05 23:26:07 +00:00
Michael Brown
b9f9230661
Work around another instance of the port re-use bug.
2006-12-05 23:15:35 +00:00
Michael Brown
8c3d09c564
Tweaked retry messages
2006-12-05 23:12:54 +00:00
Michael Brown
9600af14a3
Added debug messages
2006-12-05 22:53:49 +00:00
Michael Brown
cc0b92652f
Call closed() method only when the connection is genuinely in the
...
TCP_CLOSED state (i.e. after the final FIN/ACK exchange), and has been
removed from the list of TCP connections.
2006-12-05 22:53:28 +00:00
Michael Brown
fcc70c9d60
Ensure that tcp_rx() always frees its received packet buffer.
2006-12-05 21:23:23 +00:00
Michael Brown
28c711b91d
Killed off spurious <stdio.h> inclusion
2006-12-05 21:16:52 +00:00
Michael Brown
3fbfbad0f7
Avoid calling NULL methods!
2006-12-05 21:09:37 +00:00
Michael Brown
89bcb57201
Update ftp.c to work with Nikhil's TCP stack.
...
Remove the now-totally-obsolete sockaddr_in field from tcp.h.
2006-12-05 19:07:47 +00:00
Michael Brown
a128b33b8b
The VPD engine is broken and can't actually handle placing VPD
...
anywhere other than offset 0 within the EEPROM, so we have to put our
settings at 0x100 instead.
2006-12-05 17:56:13 +00:00
Michael Brown
4c3e0fede5
Adjust EEPROM/flash detection to fit expected manufacturing practice.
2006-12-05 16:00:06 +00:00
Michael Brown
6a91a03409
Added options listed in
...
http://www.microsoft.com/whdc/winlogo/hwrequirements.mspx as required
for iSCSI boot. Note that options 204-206 are listed in the document
but don't seem to be defined anywhere on the web.
2006-12-05 15:40:28 +00:00
Michael Brown
c6060a8fea
Tidy up some more output. The command-line code needs some severe
...
overhauling, but this is not the time to do it.
2006-12-05 10:27:16 +00:00
Michael Brown
e852f8e504
Slightly tidied up console messages.
2006-12-05 10:14:58 +00:00
Michael Brown
cb883b3faf
Change some debugging messages to use DBG()
2006-12-05 10:01:00 +00:00
Michael Brown
8bff0f0619
Avoid draining the keyboard buffer during gateA20_set(). It shouldn't
...
technically be necessary, because the "enable A20" command requires
only that the keyboard controller is ready to accept input (i.e. that
its input buffer is empty), and shouldn't also require that the
keyboard is ready to send output (i.e. that its output buffer is also
empty). See http://www.smsc.com/main/tools/io-bios/42i.pdf section
3.1 ("Command Invocation") for a justification.
gateA20_set() is called on every real-mode transition (in case some
idiot piece of external code such as Intel's PXE stack decided it
would be fun to re-disable A20), so draining the keyboard buffer means
that we end up losing keypresses on some systems. In particular, this
makes typing at the command line almost impossible, and causes
Etherboot to ignore Ctrl-Alt-Del.
We should really implement a gateA20_test() function to verify that
gate A20 has been correctly enabled, and think about adding other
commonly-used methods such as Fast Gate A20.
2006-12-05 09:45:39 +00:00
Michael Brown
d041d74054
Tied NVO commands into the human-interactable settings code that I
...
completely forgot I'd written ages ago.
2006-12-05 02:40:03 +00:00
Michael Brown
6842dd3222
Handle TargetAddress
2006-12-05 01:41:32 +00:00
Michael Brown
67577556a2
Handle strings as complete units, instead of a byte at a time.
2006-12-05 01:08:56 +00:00
Michael Brown
3a7d762c1c
Add iscsi_rx_buffered_data() and supporting infrastructure.
2006-12-05 00:39:05 +00:00
Michael Brown
16b81e442f
Added more debug messages
2006-12-04 23:47:44 +00:00
Michael Brown
d9f32726b4
Added quick and dirty commands for testing the new NVO code.
2006-12-04 23:40:35 +00:00
Michael Brown
6b45947a59
Added debug statements
2006-12-04 23:20:56 +00:00
Michael Brown
052ef6dc5a
Added nvs_write(). This shares a lot of code in common with nvs_read();
...
this can probably be optimised down quite a lot.
2006-12-04 22:06:54 +00:00
Michael Brown
ab4e1dba3f
Added nvo_save()
2006-12-04 22:04:10 +00:00
Michael Brown
cc9bcb99a0
Add the concept of a fragment list for non-volatile stored options.
2006-12-04 21:46:13 +00:00
Michael Brown
f944737045
Fixed two logic errors that were cancelling each other out.
2006-12-04 21:12:52 +00:00
Michael Brown
d62c83a350
Migrated etherfabric driver to using generic SPI layer.
2006-12-04 20:47:51 +00:00
Michael Brown
2d8d21fe74
Added the generic block-splitting code to nvs.c
2006-12-04 19:06:07 +00:00
Michael Brown
1961ba44e1
Added generic SPI protocol handler with read and write support.
2006-12-04 18:32:55 +00:00
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
dc06c895fc
Changed length parameter in SPI methods to be a byte length, rather than
...
a word length.
2006-12-04 16:09:59 +00:00
Michael Brown
931f94dca3
Generalised the SPI abstraction layer to also be able to handle interfaces
...
that don't provide the full flexibility of a bit-bashing interface.
Temporarily hacked rtl8139.c to use the new interface.
2006-12-04 15:36:51 +00:00
Michael Brown
2e41bfd268
Force syntax-checking on assertions even in non-asserting builds.
2006-12-04 15:09:57 +00:00
Michael Brown
3e0286dee3
Move ANSI C standard prototypes to stdlib.h; leave the gPXE-specific
...
function prototypes (e.g. malloc_dma()) in malloc.h.
2006-12-02 20:10:21 +00:00
Michael Brown
4cd56820ea
Basic non-volatile storage support
2006-11-29 02:41:08 +00:00
Michael Brown
70d4b4f7cf
Make the "drive number" option apply to iSCSI as well as AoE
2006-11-29 00:27:10 +00:00
Michael Brown
3234ef1b0b
Merged changes from Solarflare
2006-11-28 13:25:23 +00:00
Michael Brown
74c41fac06
Create "username" and "password" DHCP options, ready for placing this
...
information in NVS.
2006-11-28 02:14:20 +00:00
Michael Brown
3f0b4d9ed8
Updated to use asynchronous operation model for iSCSI requests
...
Added CHAP authentication
2006-11-28 00:29:02 +00:00
Michael Brown
82342e0b8f
Marked memcmp/strcmp as "pure" functions, to allow gcc to optimise
...
away code such as
if ( strcmp ( some_string, "some_value" ) != 0 ) {
DBG ( "Bad value received!" );
}
2006-11-27 23:50:24 +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
fdaddd969a
Added "name" field to digest algorithms
2006-11-21 16:14:50 +00:00
Michael Brown
d37f82509f
Added debug statements.
...
Don't crash when called on an uninitialised chap structure; this
allows us to avoid extra checks within iscsi.c to make sure that we
receive the CHAP_XXX keys in a sensible order.
2006-11-21 16:14:17 +00:00
Michael Brown
a9415d3da2
Reduce from 157 to 123 bytes
2006-11-21 16:01:12 +00:00
Michael Brown
c5428303e4
Added generic CHAP layer, independent of iSCSI
2006-11-21 13:26:59 +00:00
Michael Brown
57d539aab0
Made it temporarily possible to call MD5 routines directly from external
...
code, rather than going through the digest layer.
Removed a spurious line of constants.
2006-11-15 04:22:22 +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
fedc186fd7
Split login into security negotation and operational parameter
...
negotiation phases, to allow inclusion of CHAP authentication.
2006-10-03 09:17:38 +00:00
Michael Brown
b16de6ae66
Inhibit compiler warnings on DBG() when building a non-debug object,
...
while retaining the format string checking.
2006-09-27 11:09:56 +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
Marty Connor
757618edea
eth_ntoa and warnings cleanup
2006-09-27 03:05:21 +00:00
Marty Connor
cd8168b071
eth_ntoa cleanup. still has warnings. needs work.
2006-09-27 03:00:21 +00:00
Marty Connor
727a88709e
eth_ntoa and warnings cleanup
2006-09-27 02:18:07 +00:00
Marty Connor
0d1087a5de
eth_ntoa and warnings cleanup
2006-09-27 02:07:59 +00:00
Marty Connor
859cc71158
compilation warnings cleanup
2006-09-26 22:18:00 +00:00
Marty Connor
a02dccdafa
eth_ntoa cleanup
2006-09-26 22:11:45 +00:00
Marty Connor
b88aa51b07
warnings cleanup (still gives lots of compilation warnings from unused functions and missing legacy support)
2006-09-26 22:09:03 +00:00
Marty Connor
9588e20828
warnings cleanup
2006-09-26 22:04:33 +00:00
Marty Connor
e753444e04
compilation warnings cleanup
2006-09-26 21:58:08 +00:00
Marty Connor
cf84605271
eth_ntoa and compilation warnings fixes
2006-09-26 21:33:12 +00:00
Marty Connor
097c1b341d
eth_ntoa fixes
2006-09-26 21:06:29 +00:00
Michael Brown
7952bb76ec
Minor fix
2006-09-25 14:41:54 +00:00
Marty Connor
cce8755fb8
eth_ntoa and warnings fixups, memcpy compilation fix
2006-09-25 09:06:50 +00:00
Marty Connor
d86c080024
eth_ntoa and warnings fixups
2006-09-25 03:52:01 +00:00
Marty Connor
eefac0e258
eth_ntoa and warnings fixups
2006-09-25 03:21:25 +00:00
Marty Connor
d4b060be3b
eth_ntoa and warnings fixups
2006-09-25 02:55:13 +00:00
Marty Connor
f4d0f2e5b5
eth_ntoa and warnings fixups
2006-09-25 02:47:50 +00:00
Marty Connor
9e71390930
eth_ntoa and warnings fixups
2006-09-25 02:41:46 +00:00
Marty Connor
447ed77525
eth_ntoa and warnings fixups
2006-09-25 02:18:11 +00:00
Marty Connor
3ffeffebb2
eth_ntoa and warnings fixups
2006-09-25 02:11:52 +00:00
Marty Connor
c0e91255d0
eth_ntoa fixups
2006-09-20 00:20:37 +00:00
Marty Connor
fe62800bad
eth_ntoa fixups
2006-09-20 00:06:52 +00:00
Marty Connor
637411c2ab
eth_ntoa fixups
2006-09-20 00:00:44 +00:00
Marty Connor
3df3ac72e1
eth_ntoa fixups
2006-09-19 16:33:46 +00:00
Marty Connor
896f871fba
eth_ntoa fixups
2006-09-19 15:58:37 +00:00
Marty Connor
077bbc220a
eth_ntoa fixup
2006-09-19 15:49:57 +00:00
Marty Connor
338a6de549
eth_ntoa fixup, some warnings fixups (isa/pnp fixups still needed)
2006-09-19 15:23:28 +00:00
Marty Connor
5a39995f8b
eth_ntoa fixup, _disable arg fixup
2006-09-19 15:17:51 +00:00
Marty Connor
c4964c3e3a
fix args to _disable routine
2006-09-19 15:01:16 +00:00
Marty Connor
31d65dd73f
Minor edit to make HEAD build
2006-09-19 14:16:15 +00:00
Michael Brown
1a944a894e
Killed
2006-09-18 21:57:59 +00:00
Michael Brown
b8baee7632
Removed as a gesture of goodwill following a request from Microsoft
2006-09-18 21:56:15 +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
Marty Connor
a9cb4ca079
DBG MAC addr printout in driver
2006-09-15 12:54:11 +00:00
Marty Connor
a998286c8b
change MAC address printout to DBG using eth_ntoa (temporary legacy support)
2006-09-15 12:42:43 +00:00
Michael Brown
0dca1dc8ce
Made eth_ntoa() public for use in legacy drivers' DBG() statements.
2006-09-15 12:34:34 +00:00
Marty Connor
56a3ff7202
get rid of compile warnings (except intentionally generated ones)
2006-09-14 20:54:05 +00:00
Marty Connor
c30623b739
fix DBG macro unknown variable
2006-09-14 20:34:53 +00:00
Marty Connor
b41f754e3a
Fix compile warnings, remove unused var
2006-09-14 17:58:23 +00:00
Marty Connor
e2aca77132
update DBG_DISCARD macro to allow the compiler to see the argument for compile-time checking, while still having it optimized away during compilation
2006-09-14 17:38:17 +00:00
Marty Connor
08d7ea1d34
Fixed DBG macro format, fixed compile warnings. removed extra parameter from mtd80x_disable(...)
2006-09-14 17:15:53 +00:00
Marty Connor
35f90278a8
Remove nic_disable call from drivers. Call should be made at a higher level
2006-09-14 14:51:38 +00:00
Marty Connor
1ed6e69ea5
Remove printf of MAC address in driver.
2006-09-14 14:06:33 +00:00
Michael Brown
4ef1ef0ee4
Restored the le32_to_cpus() and cpu_to_le32s() calls
2006-09-11 17:54:50 +00:00
Michael Brown
bb8725bffa
Added the "swap in place" macros
2006-09-11 17:54:19 +00:00
Michael Brown
013f8c119a
Tidied up.
2006-09-11 17:45:51 +00:00
Michael Brown
2eed0bb8e5
Reduced size from 2087 bytes to 1056 bytes
2006-09-11 17:18:06 +00:00
Michael Brown
48bdde5d7b
Taken from Linux's md5.c. This implementation is not very
...
size-efficient, and will probably be rewritten.
The md5.c from MatrixSSL is too ugly to consider importing.
2006-09-11 16:30:36 +00:00
Michael Brown
1ddfce2308
Generalisation of a message digest algorithm
2006-09-11 16:29:45 +00:00
Michael Brown
0566ab2a2f
Added geometry-guessing code based on the partition table
2006-09-08 22:22:03 +00:00
Michael Brown
21bc2015f2
Fix gcc-induced reference to memcpy
2006-09-01 10:48:35 +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
78dd963c1f
Check to see if we've reached the end of the map before attempting to
...
skip past an empty region, otherwise we end up generating an infinitely
long e820 map. (Yes, there *are* real systems that provide e820 maps
with a zero-length region at the end...)
2006-08-31 13:25:45 +00:00
Michael Brown
c399e88aa3
Hopefully fix gcc3 build issue
2006-08-30 13:55:52 +00:00
Michael Brown
095fce14f8
Added extra debugging
2006-08-30 13:39:07 +00:00
Michael Brown
7e95980858
Added iBFT construction to iSCSI boot test
2006-08-27 23:54:20 +00:00
Michael Brown
22511400c7
Added generic function for calculating ACPI table checksum
2006-08-27 22:02:08 +00:00
Michael Brown
c46126bfa4
Does anyone still use 9600 baud?
2006-08-27 01:39:11 +00:00
Michael Brown
cab3f4502b
Correct option number for DHCP_DNS_SERVERS, and add it to the request
...
list.
2006-08-27 01:37:58 +00:00
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
40724431e8
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-26 23:42:02 +00:00
Michael Brown
19883779ba
Use TEXT16_CODE() rather than manually specifying ".code16" etc, since
...
our manual ".code32" will break a KEEP_IT_REAL build.
2006-08-24 18:43:28 +00:00
Michael Brown
028bc034e4
Always update the PnP checksum, even if the ident string is not being set.
2006-08-24 17:56:46 +00:00
Michael Brown
b4e559d7e2
Added basic profiling support
2006-08-24 16:22:56 +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
cddf8df8d4
Quick utility to pad floppy disk images for vmware/qemu
2006-08-23 03:07:41 +00:00
Nikhil Chandru Rao
dccb8358bd
Fixed a bug in the TCP state machine. Added a transition from ESTABLISHED to LAST_ACK on receiving a FIN,ACK
2006-08-19 16:14:53 +00:00
Nikhil Chandru Rao
d1d334b8e1
IP6 support
2006-08-19 15:58:22 +00:00
Michael Brown
f1e1dfae3d
Added RX tracing as well.
2006-08-16 00:15:40 +00:00
Michael Brown
cf2178f885
Added debug strings.
2006-08-16 00:05:24 +00:00
Michael Brown
bb3df618b8
Remove old-style debug message
2006-08-16 00:02:43 +00:00
Michael Brown
0743dc5b0d
Added some minimal debugging for transmitted PDUs.
2006-08-15 23:56:18 +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
d475ecd561
Removed TAGGED_IMAGE from the default build; NBI has been broken for ages.
2006-08-14 22:46:50 +00:00
Michael Brown
dbf3482ef5
Removed obsolete print_config()
2006-08-14 22:45:22 +00:00
Michael Brown
dd59181a0a
Removed DNS from the default configuration; it hasn't been updated to
...
the new UDP API yet.
2006-08-14 22:42:56 +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
Derek Pryor
562ab6d65c
Bug fixes to the HTTP protocol code
2006-08-12 19:05:08 +00:00
Derek Pryor
0f88703019
Bug fixes to the HTTP protocol code
2006-08-12 18:54:59 +00:00
Michael Brown
c48170ffaf
Print net device name when making request.
2006-08-11 18:49:58 +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
db0ff1731f
Fail gracefully when set_dhcp_option() is called with options==NULL.
2006-08-11 18:16:34 +00:00
Michael Brown
db46972349
Added basic infrastructure for manipulating settings.
2006-08-11 18:00:22 +00:00
Derek Pryor
3b45f05be4
Removing because of conflict with new HTTP protocol
2006-08-11 14:13:58 +00:00
Derek Pryor
25ea34a8d7
New HTTP protocol and test code
2006-08-11 14:13:02 +00:00
Michael Brown
2497270c14
command->data_{in,out} are now userptr_t, so it is invalid to compare
...
against NULL.
2006-08-10 17:35:14 +00:00
Michael Brown
ea5fa82b91
Fixed variable name in assertion
2006-08-10 17:09:48 +00:00
Michael Brown
bc1a37eacb
Added missing packed attribute
2006-08-10 00:10:09 +00:00
Michael Brown
35559ad87c
Added description for a basic ACPI table, taken from
...
include/linux/acpi.h.
2006-08-10 00:09:31 +00:00
Michael Brown
4afc494b83
Both the !PXE and PXENV+ structures must be paragraph-aligned
2006-08-09 18:22:25 +00:00
Michael Brown
c3a4f3c5da
Towards an RFC2988-compliant timer.
2006-08-09 15:54:17 +00:00
Michael Brown
f0718d562f
Don't call stop_timer() from within the timer expiry callback; it's
...
already stopped.
Don't call start_timer() when sending a dataless ACK. This may or may
not be the right thing to do; I can't tell.
Back out broken "send ACK only if required to" logic temporarily.
2006-08-09 15:50:20 +00:00
Nikhil Chandru Rao
3aff701001
Changed the TCP state machines behaviour in the ESTABLISHED state
2006-08-09 15:04:26 +00:00
Michael Brown
dc8b96b446
Temporarily work around the bug when port numbers are reused between
...
subsequent runs.
2006-08-09 14:44:58 +00:00
Michael Brown
09688cb3b5
Correct some packet ownership and freeing bugs.
2006-08-09 14:27:07 +00:00
Michael Brown
43d601b678
out_flags was being set but never used.
...
Use just random() to allocate initial sequence numbers; the previous
algorithm ended up with a high probability of zeroing the high word.
2006-08-09 13:35:03 +00:00
Michael Brown
065a2a486d
Port the UDP port allocation code to TCP
2006-08-09 12:08:20 +00:00
Michael Brown
de0c36a98a
Remove some of the confusion surrounding the amount to strip off from
...
a TCP packet before passing to newdata().
2006-08-09 12:01:09 +00:00
Michael Brown
867c7aef59
iphdr->hlen includes the IP header, so truncate packet *before*
...
stripping the header. Also fix an htons/ntohs confusion.
2006-08-09 11:52:53 +00:00
Marty Connor
ee9ae8130a
Remove _PROTOCOL macros for gcc 3.2 compatibility
2006-08-09 04:42:14 +00:00
Marty Connor
dd7e103d58
Make VERSION_MAJOR for gPXE be 0
2006-08-09 03:43:41 +00:00
Michael Brown
0dd0a8366e
Removed obsolete line merged in with the cmdline stuff
2006-08-09 03:22:29 +00:00
Michael Brown
504a705d9e
Do no evil. :)
2006-08-09 03:21:02 +00:00
Michael Brown
c9e6c33bba
Attempt a PXE NBP boot as the TFTP test.
2006-08-09 03:00:11 +00:00
Michael Brown
f018da8215
Implement enough of PXENV_GET_CACHED_INFO to support pxelinux.
2006-08-09 02:59:19 +00:00
Michael Brown
75d26d884a
Added pxe_netdev; a slight hack for now, but will need to be done
...
properly for the PXE UNDI API anyway.
2006-08-09 02:58:27 +00:00
Michael Brown
e9561aafc0
Derive xid dynamically from the netdev, so that we can call
...
create_dhcp_packet() from pxe_preboot.c, after the dhcp_session is long
gone.
Expose the functions required by pxe_preboot.c
2006-08-09 02:56:40 +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
691557281f
Add a couple of small but vital parts to PXENV_UDP_WRITE.
2006-08-09 01:57:02 +00:00
Michael Brown
a3d508b648
Clarified packet ownership transfer between a few functions.
...
Added a large number of missing calls to free_pkb(). In the case of UDP,
no received packets were ever freed, which lead to memory exhaustion
remarkably quickly once pxelinux started up.
In general, any function with _rx() in its name which accepts a pk_buff
*must* either call free_pkb() or pass the pkb to another _rx() function
(e.g. the next layer up the stack). Since the UDP (and TCP) layers don't
pass packet buffers up to the higher-layer protocols (the
"applications"), they must free the packet buffer after calling the
application's newdata() method.
2006-08-09 01:24:32 +00:00
Michael Brown
fd07f56f0d
Note to self: learn to count.
2006-08-09 00:56:07 +00:00
Michael Brown
843bcc291d
Added missing __from_text16()s when passing pointers to PXE NBP.
2006-08-09 00:39:21 +00:00
Michael Brown
71754ada2a
Allow linking by converting functions to stubs
2006-08-09 00:25:29 +00:00
Michael Brown
17ecfd1d67
Allow linking by converting all functions to stubs
2006-08-09 00:22:28 +00:00
Michael Brown
751ae718bd
pxe_int_1a is needed by pxe_call.c
2006-08-09 00:16:57 +00:00
Michael Brown
d1a123b1f4
Added TFTP test code (currently just dumps file to console).
2006-08-09 00:09:29 +00:00
Michael Brown
3611cb17b7
Initial (untested) implementation of TFTP over the new UDP API.
2006-08-08 23:45:52 +00:00
Michael Brown
eda79ec32b
The prototype for strcasecmp() is apparently in strings.h.
2006-08-08 22:52:16 +00:00
Nikhil Chandru Rao
409f69a08a
Changed ipv4_dump() to consume only one line.
2006-08-08 22:26:35 +00:00
Nikhil Chandru Rao
8bf38fb400
Corrected bugs in the TCP logic. There might be a few more which need to be taken care of.
2006-08-08 22:25:20 +00:00
Michael Brown
72cd29f13c
Added some TFTP definitions for use with the new UDP API.
2006-08-08 22:01:16 +00:00
Michael Brown
18c112d205
Added (not yet tested) PXE API entry point and support functions.
2006-08-08 20:43:33 +00:00
Michael Brown
d12383f1d3
Update to match the daft capitalisation in the actual PXE spec
2006-08-08 20:43:05 +00:00
Michael Brown
68e33224ef
gcc3 compatibility: removed ARP_NET_PROTOCOL().
2006-08-08 17:44:25 +00:00
Nikhil Chandru Rao
d2bdf81505
Removed some bugs in TCP
2006-08-08 03:42:30 +00:00
Nikhil Chandru Rao
cb42e573a0
Added retransmissions to TCP
2006-08-07 18:52:26 +00:00
Michael Brown
010288577f
Add very, very quick and dirty hello world test
2006-08-07 18:49:10 +00:00
Michael Brown
885a630ddf
Fix routing when a gateway exists. This should probably be split into
...
a separate function.
2006-08-07 17:51:19 +00:00
Michael Brown
8a3f4b7de6
Set a NUL terminator before calling inet_aton.
2006-08-07 17:50:41 +00:00
Michael Brown
ecdcdea1af
Remove unused attribute from __table macros; the tables are no longer
...
static since otherwise gcc4 optimises them away completely. Also, it
really *is* an error if the table start and end are unused, so they
certainly shouldn't be marked with attribute unused.
2006-08-07 17:06:31 +00:00
Michael Brown
d0e4f198d6
Add iSCSI to the DHCP tests.
...
Start updating iscsi.c to use Nikhil's TCP API.
2006-08-07 16:48:24 +00:00
Nikhil Chandru Rao
6714ec745a
Minor corrections
2006-08-07 07:37:23 +00:00
Michael Brown
eb24eece0e
Convert some trivial functions to static inlines.
2006-08-03 23:42:03 +00:00
Michael Brown
ffe0e24249
Make the UDP senddata() methods return a status code.
...
udp_connect() now follows the standard BSD sockets semantics and simply
sets the default address for outgoing packets; it doesn't filter incoming
packets.
2006-08-03 23:10:14 +00:00
Michael Brown
a0a872f7f1
Updated PXE UDP implementation to use the new Etherboot UDP API.
...
Updated PXE API dispatcher to use copy_{to,from}_user, and moved to
arch/i386 since the implementation is quite architecture-dependent.
(The individual PXE API calls can be largely
architecture-independent.)
2006-08-02 23:08:10 +00:00
Michael Brown
e24a6cb525
Moved the basic struct sockaddr out of in.h.
2006-08-02 00:06:30 +00:00
Michael Brown
467e9627cc
Added features that will be required for PXE UDP support.
...
Introduced struct sockaddr_tcpip, to simplify code that deals with
both IPv4 and IPv6 addresses.
Reorganised parts of tcpip.c and udp.c.
2006-08-02 00:02:21 +00:00
Nikhil Chandru Rao
9225f4edac
TCP support
2006-08-01 20:46:50 +00:00
Nikhil Chandru Rao
c24546c70b
Minor changes to the network layer rx() functions
2006-08-01 20:27:26 +00:00
Michael Brown
beadd82208
Remove unused functions.
2006-08-01 14:26:02 +00:00
Michael Brown
1ebb68e49a
Renamed trans_{rx,tx}() to tcpip_{rx,tx}(), since they are specific to
...
the TCP/IP protocol suite (rather than being general transport-layer
functions).
2006-08-01 14:22:04 +00:00
Michael Brown
3a0e293123
Renamed tcpip_if.[ch] to tcpip.[ch]
2006-08-01 14:18:09 +00:00
Michael Brown
21c3d63c2e
We shouldn't need to allocate a TX packet buffer when calling newdata();
...
if the application wants to send data then it will have to use the normal
senddata() mechanism.
2006-08-01 14:13:58 +00:00
Michael Brown
ae277992c2
Request bootfile name; it doesn't seem to be automatically supplied by
...
all servers.
2006-08-01 14:12:27 +00:00
Michael Brown
6e3e5efaed
Accept '%i' as a synonym for '%d'.
2006-07-25 14:33:20 +00:00
Michael Brown
9e761f5f28
Print out "DHCP..." message just in case people think the demo is sitting
...
there doing nothing when it's actually waiting for a DHCP reply.
2006-07-20 14:20:11 +00:00
Michael Brown
a92d242008
Allow an AoE boot to be directed via DHCP, so that we have a proof of
...
concept demo that actually does something useful.
2006-07-20 14:15:23 +00:00
Michael Brown
3085f03ad4
Request Etherboot encapsulated options.
...
Parameter request list is yet another option that ISC dhcpd ignores
unless it's in the main options block.
Fix logic error in parsing file and sname fields.
2006-07-20 14:14:41 +00:00
Michael Brown
b26806cf18
Add dhcp_snprintf() for extracting DHCP string options.
2006-07-20 14:13:11 +00:00
Michael Brown
7ca8bcd98c
Print out the lease time, just to show how easy it is.
2006-07-20 03:02:34 +00:00
Michael Brown
16d04386b6
Switch default stack to Nikhil's TCP/IP stack
2006-07-20 02:53:15 +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
00a1f000b1
Added dhcp_ipv4_option() and friends.
...
Added test code to configure the interface for IPv4 after DHCP.
2006-07-20 02:49:59 +00:00
Michael Brown
6a0b4c9772
Free up any allocated options if we fail
2006-07-20 02:25:39 +00:00
Michael Brown
764cb41456
Document memory ownership.
2006-07-20 02:23:42 +00:00
Michael Brown
7ca1bb0fbe
Now successfully negotiates the whole DHCPDISCOVER/OFFER/REQUEST/ACK
...
cycle. :)
2006-07-20 02:19:06 +00:00
Michael Brown
30d9bcdc6e
Rename unwieldy function
2006-07-20 00:24:25 +00:00
Michael Brown
9ad5cede96
Set DHCP_MESSAGE_TYPE option within the main options block. This
...
doesn't seem to be required by the RFCs, but at least ISC dhcpd and
ethereal refuse to recognise it otherwise.
2006-07-20 00:18:50 +00:00
Michael Brown
881b90e82c
Packets without a DHCP_MESSAGE_TYPE option are probably just BOOTP
...
packets.
2006-07-20 00:03:25 +00:00
Michael Brown
29b358dd39
conn->local_port is now network-endian; do not swap when comparing
...
against value in header.
Temporarily disable RX checksumming; it's broken and is holding up
work on higher-layer protocols
.
2006-07-20 00:03:01 +00:00
Michael Brown
36c94eae78
Clarify hexiness of header length
2006-07-20 00:01:50 +00:00
Michael Brown
2c0eb6eb1d
Correct TCP/IP checksum generation.
2006-07-19 23:38:05 +00:00
Michael Brown
0768670fd8
udp_open() takes ports in network-endian order.
2006-07-19 21:56:27 +00:00
Nikhil Chandru Rao
13dbf5494d
Minor edits
2006-07-19 21:05:58 +00:00
Michael Brown
224529d8dd
Now capable of sending what, to me, looks like a valid DHCPDISCOVER
...
(apart from the bad UDP checksum).
2006-07-19 20:50:50 +00:00
Michael Brown
a38010fb0e
Make udp_send() call udp_sendto(), rather than vice-versa.
2006-07-19 20:38:49 +00:00
Michael Brown
7c84b74185
A small but very critical bug.
2006-07-19 20:16:46 +00:00
Michael Brown
82f3295794
Use more standardised format specifiers in debug messages (e.g. %p for
...
a pointer).
2006-07-19 18:45:18 +00:00
Michael Brown
ab633f6a73
Reserve space for lower-layer headers when allocating packet buffer.
...
Use pkb_available() rather than pkb_len() (which will always return 0
on a freshly allocated buffer).
udp_send() should assume that the buffer has already been allocated.
2006-07-19 18:21:30 +00:00
Michael Brown
6858b14a34
Add pkb_available()
2006-07-19 18:16:48 +00:00
Michael Brown
e8daeb62b1
Eliminate confusion between functions that return pointers and
...
functions that return status codes.
Zero the DHCP packet buffer *before* creating the options structures
inside it.
2006-07-19 18:11:31 +00:00
Michael Brown
3369f93036
Add block identification to debug messages
2006-07-19 17:58:27 +00:00
Michael Brown
6d9d48537e
Added some debug messages and DHCP test code
2006-07-19 17:49:31 +00:00
Michael Brown
317b962b65
Proof of concept: transmit a single DHCPDISCOVER and dump out any
...
parsed DHCP responses.
2006-07-19 17:32:13 +00:00
Michael Brown
76070cd226
Added missing prototype
2006-07-19 17:29:18 +00:00
Michael Brown
16fc9858db
Beginnings of DHCP protocol implementation
2006-07-19 17:01:06 +00:00
Michael Brown
a7011edfd4
Add net/udp
2006-07-19 17:00:40 +00:00
Michael Brown
bf0cdd42cf
Add some DHCP options that we are likely to use
2006-07-19 17:00:32 +00:00
Michael Brown
e0668ad8df
Correct typo
2006-07-19 16:58:44 +00:00
Nikhil Chandru Rao
bf515d3d65
Minor edit in net/udp.c
2006-07-19 16:27:54 +00:00
Nikhil Chandru Rao
ab577e1a3a
The following edits were made: \
...
1. Updated UDP send data code\
2. Corrected internet checksum\
3. Moved udp_buffer() and udp_buflen() to udp.c from udp.h
2006-07-19 16:25:23 +00:00
Michael Brown
b8d619e822
Added macros for generating static DHCP options
2006-07-19 16:16:51 +00:00
Michael Brown
254fe6e00e
Split DHCP packet creation into two parts: creating the basic packet
...
structure, and populating it with options. This should allow us to
use the same basic options list for both DHCPDISCOVER and DHCPREQUEST,
plus making it much easier to set the non-constant parameters
(e.g. requested IP address) in request packets.
2006-07-19 12:12:45 +00:00
Michael Brown
e40ebb67de
Allow for calling find_dhcp_option() with "options" set to NULL, in order
...
to search through all registered option blocks.
Move some static inlines that are likely to be used frequently into
dhcpopts.c as normal functions, to save space.
2006-07-19 11:05:38 +00:00
Michael Brown
7ab29b0bfe
This file breaks "make blib"; please find a way to avoid doing this.
2006-07-17 19:19:17 +00:00
Derek Pryor
e71098a652
The first packet (ClientHello Handshake) can be constructed and is accepted
...
by SSL servers. Framework.c allows me to test the library against a given
https server.
2006-07-17 16:38:20 +00:00
Michael Brown
6c01d3bb95
Fix creation of the htype field; the ll_proto field from which it is
...
derived is a 16-bit big-endian field, but htype is only 8 bits wide.
2006-07-17 13:07:14 +00:00
Michael Brown
35b0233baa
Tidy up hex_dump() output.
2006-07-17 13:04:29 +00:00
Michael Brown
b24947f0c0
Add sketch code to reassemble a DHCP packet from our internal "everything
...
is a DHCP option" data structures.
We need this code in order to be able to return a DHCP packet to a PXE NBP
which reflects options from our multiple sources (e.g. NVS and DHCP
server). This is expensive, but necessary. Having paid this cost, we may
as well try to use the same code to generate our DHCP request packets,
since the process is similar.
2006-07-17 12:47:22 +00:00
Michael Brown
12da7ea475
Add (untested) code for parsing a received DHCP packet and constructing a
...
DHCP options block from the contents.
2006-07-15 19:24:55 +00:00
Michael Brown
19e8b41562
Add code to modify DHCP option values within a block.
2006-07-13 20:49:04 +00:00
Michael Brown
3acbff4f00
How did this ever work properly before?
2006-07-13 18:27:23 +00:00
Derek Pryor
47be47bf17
Adding SSL Constructs header file. (First version)
2006-07-10 13:26:20 +00:00
Nikhil Chandru Rao
5f651f8622
Added fragment reassembly code
2006-06-30 08:52:03 +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
Marty Connor
623f2e7b9d
Added bin/.blib.list to VERYCLEANUP so .bin directory is made empty
2006-06-29 17:58:48 +00:00
Nikhil Chandru Rao
8de630c62b
Removing net/interface.c and include/gpxe/interface.h
2006-06-29 06:51:11 +00:00
Michael Brown
51d62d1a3c
Provide a mechanism for returning the encapsulator as well as the
...
encapsulated option; this will be needed for modifications to the options
block.
2006-06-28 18:59:54 +00:00
Nikhil Chandru Rao
c9ea710930
Renamed net/interface.c and include/gpxe/interface.h to net/tcpip_if.c and include/gpxe/tcpip_if.h respectively. Made changes in the other files.
2006-06-28 15:43:08 +00:00
Michael Brown
291f072b82
Add priority mechanism
2006-06-28 13:48:02 +00:00
Michael Brown
bd0c8b21ad
Change dhcp_num_option() to return the numerical value directly.
2006-06-28 12:16:41 +00:00
Dan Lynch
d8b51332c6
typo in macro fixed
2006-06-28 11:53:41 +00:00
Dan Lynch
ba2bfd54ed
- modified length of password string to match visible field length
...
- value of n passed to wgetnstr should now be equivalent to output from strlen (i.e. length excluding NUL-terminating character)
2006-06-28 11:52:30 +00:00
Dan Lynch
f9887c3f0f
started on ANSI sequence processing
2006-06-28 11:50:02 +00:00
Dan Lynch
c29c868475
- implemented cursor retreat function (_wcursback) as a core function
...
- reimplemented cleaner wgetnstr
- fixed wdelch for use with _wcursback
2006-06-28 11:48:40 +00:00
Nikhil Chandru Rao
6e2c97b0c0
Added ipv4_pseudo_header structure
2006-06-28 09:59:27 +00:00
Nikhil Chandru Rao
e60817fa7a
IP6 specifications
2006-06-28 09:44:41 +00:00
Nikhil Chandru Rao
41b399d672
Fixed endianness of 16- and 32- bit values
2006-06-28 09:10:35 +00:00
Nikhil Chandru Rao
a6c6b3d739
Fixed whitespaces; updated UDP code
2006-06-28 07:46:28 +00:00
Dan Lynch
2b15084388
- first check-in for mucurses_test.c
...
- added mucurses_test.c build targets
2006-06-27 17:31:01 +00:00
Michael Brown
0bcaa8a21f
First stab at DHCP option handling in a way that will allow us to have
...
multiple option sources (e.g. multiple DHCP replies, non-volatile
storage etc.)
2006-06-27 17:24:07 +00:00
Dan Lynch
7f4cfe4a84
- put in the screen initialisation stuff and clear the screen...
2006-06-27 17:18:11 +00:00
Dan Lynch
11e280670d
- works with test ansi tty, but will need a rethink when we start
...
getting key_ codes instead
2006-06-27 17:15:34 +00:00
Dan Lynch
f78fa3c59d
- working basic ansi termnal extension for mucurses
2006-06-27 17:11:57 +00:00
Dan Lynch
916f21921f
check whether malloc returns a valid pointer
2006-06-27 13:32:15 +00:00
Dan Lynch
9ca2f64ee1
moved console specific items out of mucurses (should be handled by external screen object)
2006-06-27 13:31:30 +00:00
Dan Lynch
197c0c91b2
make path relative (so that I don't break eb top of tree !)
2006-06-27 13:28:43 +00:00
Dan Lynch
05c0b3ce09
included contents of input.{c,h} in kb.c
2006-06-27 13:27:28 +00:00
Dan Lynch
04fcee2306
enabled build entry for mucurses libraries
2006-06-27 11:40:04 +00:00
Dan Lynch
446c1a3372
- deprecated in favour of a split library model
2006-06-27 11:05:13 +00:00
Dan Lynch
6d34baaef9
- testable console framework implementing mucurses SCREEN struct
2006-06-27 11:00:14 +00:00
Dan Lynch
e442447f37
- multiple static inline definitions added
...
- changes made to some constants and macros
- changes made to _curses_screen struct
- identified and removed prototypes for yet more unsupportable functions
2006-06-27 10:38:57 +00:00
Dan Lynch
5d2f39bbc2
added placeholder SRCDIRS entry for mucurses
2006-06-27 10:31:42 +00:00
Dan Lynch
1c87d54bb8
- recoded wgetch and wgetnstr for greater more efficiency
...
- wgetch now includes non, part and full blocking read support
2006-06-27 10:24:40 +00:00
Michael Brown
35557914e3
Simplify ipv4_tx() by not having a separate "source" variable now that
...
we are constructing the IP header ourselves.
Formatting fix-ups (80 column limit is mandatory!)
2006-06-26 16:10:34 +00:00
Michael Brown
b49de73950
Factorise out common code
2006-06-26 16:01:24 +00:00
Michael Brown
e517a4771b
Split ipv6 functions out from ipv4.c
2006-06-26 15:33:46 +00:00
Michael Brown
e04ea505c9
Whitespace fixes
2006-06-26 13:45:24 +00:00
Dan Lynch
fb85954249
first working version - nasty, but mostly works
2006-06-26 08:24:34 +00:00
Nikhil Chandru Rao
f5ebf067c4
added generalized sockaddr structure and ip6 sockaddr
2006-06-25 05:18:24 +00:00
Nikhil Chandru Rao
90fbff8f34
added support for processing and transmitting without uIP
2006-06-25 05:16:54 +00:00
Nikhil Chandru Rao
74339b3c6e
updated UDP interface
2006-06-25 05:13:17 +00:00
Nikhil Chandru Rao
fdc05e2664
created interface for transport-network interface
2006-06-25 05:12:07 +00:00
Derek Pryor
8b0cac40ca
Added gpxe-0.5/src/crypto/ for the SSL Library
2006-06-22 17:15:45 +00:00
Dan Lynch
890dc758e8
- proper layout formatted soft label array, with justification formatted labels
...
- some minor preventatives
2006-06-21 15:09:55 +00:00
Dan Lynch
811df504a5
- erradicate compiler warning due to possibility of uninitialised variables (switch statement)
2006-06-21 10:38:03 +00:00
Dan Lynch
6fc723c294
- added doxygen @file header
...
- no longer depends on slk
2006-06-21 10:35:46 +00:00
Dan Lynch
d77120541a
- added doxygen @file header
2006-06-21 10:31:59 +00:00
Dan Lynch
172a568af5
- added doxygen @file header
...
- some more minor functionality implemented
2006-06-21 10:31:20 +00:00
Dan Lynch
3049a1f026
added doxygen @file header
2006-06-21 10:30:03 +00:00
Dan Lynch
14f5d3203d
- removed slk references
...
- corrected minor algo errors in primitives
- added doxygen @file header
2006-06-21 10:29:13 +00:00
Dan Lynch
79a9aced26
- added doxygen @file header
...
- wdeleteln function implemented
2006-06-21 10:27:52 +00:00
Dan Lynch
12ca5aa442
added doxygen file header
2006-06-21 10:26:01 +00:00
Dan Lynch
1632c25c78
- major implementation work completed (testing in progress)
...
- some optimisation done
2006-06-21 10:21:40 +00:00
Dan Lynch
3994688804
initial check in
2006-06-21 10:20:39 +00:00
Michael Brown
3a660f9b25
Update ftp.c and hello.c to use the generic async_operations API.
2006-06-19 15:46:58 +00:00
Michael Brown
15397db2b4
Placeholder
2006-06-17 23:34:48 +00:00
Michael Brown
8637834031
Made the temporary buffer part of the TCP senddata() API, to ease the
...
transition away from uIP.
Prepared ipv4.c for transition away from uIP.
2006-06-17 23:20:54 +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
d393e61d8a
Temporary hack to work around the "TX overflow" problem in the interim
...
period before updating to the new driver API (which can cope with
having TX packets in progress).
2006-06-16 14:38:16 +00:00
Michael Brown
52de4935f9
Add 4 bytes to maximum frame length to allow for the frame checksum.
...
(This actually matters once you try using TCP, because you *will*
receive full-sized frames.)
2006-06-16 14:30:41 +00:00
Michael Brown
7c76791730
Improve debugging output for legacy wrapper
2006-06-16 14:27:04 +00:00
Michael Brown
e5865e796b
Forward-port event queue fixes from 5.4 tree.
2006-06-16 14:05:43 +00:00
Michael Brown
a20c565ef3
Forward-port start-of-day fixes from 5.4 tree
2006-06-16 14:03:43 +00:00
Michael Brown
50ab8c0e5b
Forward-port reset-related changes from 5.4 tree.
2006-06-16 14:00:43 +00:00
Michael Brown
968501e323
For consistency
2006-06-16 13:17:40 +00:00
Michael Brown
bcdcd796fb
32kB window is actually larger than our typical receive ring size.
...
Shrink to 4kB for now. We might want to see if it can be made
genuinely indicative of the RX ring size in the new TCP
implementation.
2006-06-16 13:16:59 +00:00
Michael Brown
bbd9e28061
Simplify TX datapath.
2006-06-16 00:19:46 +00:00
Michael Brown
cce2e47ff4
Added iSCSI boot test code
2006-06-14 17:00:25 +00:00
Michael Brown
3b51c719d3
Generalise three-wire interface to generic SPI interface.
...
Update rtl8139 driver to instantiate an SPI interface with a three-wire
device attached.
2006-06-14 00:22:50 +00:00
Michael Brown
ab4f96e525
Move per-transition delays from generic bit-bashing layer to i2c layer
...
(since SPI bit-bashing will require different delay semantics).
2006-06-14 00:20:35 +00:00
Michael Brown
714641ae6d
Translate between "0 = success" and "0 = failure" call standards.
2006-06-14 00:18:13 +00:00
Michael Brown
51a36f1cfb
Change read_bit() to return 0 or -1UL, rather than 0 or 1.
2006-06-12 19:29:50 +00:00
Michael Brown
2e49441535
Updated debug message to reflect change in data structure.
2006-06-12 01:10:08 +00:00
Michael Brown
2138db36ca
Add "addr32" required explicitly by older gas.
2006-06-12 01:07:43 +00:00
Michael Brown
c10698b8b4
Add NULL_TRAP as a config option
2006-06-11 01:55:43 +00:00
Michael Brown
55bb40c39a
Fix typo
2006-06-11 01:55:12 +00:00
Michael Brown
df4b503a8c
Added null trap code for debugging. (Must be included by adding
...
--nulltrap to the make target at the moment.)
2006-06-11 01:48:29 +00:00
Michael Brown
7ce44f7480
Update to use the generic i2c bit-bashing code.
2006-06-11 00:57:38 +00:00
Michael Brown
3ed40686c9
Added bit-bashing i2c interface code
2006-06-11 00:57:00 +00:00
Michael Brown
476d02051f
Windows Server 2003 sulks if we feed it an empty region in base memory
...
as a result of our memory map editing, so strip out any empty regions.
2006-06-09 12:20:03 +00:00
Michael Brown
6fd1bd0510
Added missing check-in
2006-06-09 10:19:17 +00:00
Michael Brown
e90b64d625
Added sketch of bit-bashing interface common code
2006-06-08 19:47:09 +00:00
Michael Brown
17eea9f933
Fix bug with >256 cylinders.
...
Allow our functions to return a non-zero, non-error status (since the
INT 13 Extensions Check has to return the API version in the register
that is otherwise always used for the error code).
Report a non-zero API version from the INT 13 Extensions Check; GRUB
now uses extended reads.
2006-06-08 19:28:08 +00:00
Dan Lynch
ad1aca0634
- separated curses.c out into separate source files to optimise
...
library use later on
- some small mods to existing functions
2006-06-08 17:23:37 +00:00
Michael Brown
1697c78848
Legacy drivers cannot cope with multiple active devices.
2006-06-08 15:18:27 +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
763b7e2ef9
We now have just romprefix, rather than having isaprefix and pciprefix
2006-06-06 15:41:21 +00:00
Michael Brown
ef37f78cbe
Cut out almost all the optional code paths, drastically simplifying the
...
flow of control through this code.
We now always add PCI and PnP headers even for ISA ROMs; there's no harm
in doing so.
UNDI loader is still missing.
2006-06-06 15:33:39 +00:00
Michael Brown
e7eca7b7cb
Code segment may not be writable; create the temporary pointer to the GDT
...
on the stack.
2006-06-06 15:30:28 +00:00
Michael Brown
46253ba618
Calculate _rom_size for the ROM prefix
2006-06-06 15:29:39 +00:00
Michael Brown
8d0c5f3302
Use byte 6 for the checksum, rather than byte 5. (Byte 5 may be part of
...
the jmp instruction).
2006-06-06 15:29:14 +00:00
Michael Brown
02df45352c
Force pci.o to be included.
...
Print warning message at probe time.
2006-06-05 16:17:52 +00:00
Michael Brown
754cfdfcf4
Legacy drivers will not pad when necessary
2006-06-05 16:10:36 +00:00
Michael Brown
7826de3f7e
PNIC doesn't auto-pad.
2006-06-05 16:10:14 +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
Michael Brown
c3e41e6fd1
Added soon-to-be-requisite missing include.
2006-06-05 15:41:22 +00:00
Dan Lynch
34cfbf55a4
- added most slk functions
2006-06-05 15:03:11 +00:00
Michael Brown
d78581297b
Improve tcpdump legibility.
2006-06-01 19:23:52 +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
48fb6c6dc2
Updated retry timer mechanism to incorporate smoothed RTT estimation.
...
AoE now uses the retry timer mechanism.
2006-06-01 14:33:52 +00:00
Michael Brown
50415b3aca
Make DBG_DISCARD correct
2006-06-01 12:11:09 +00:00
Michael Brown
1f394c2f7c
Backing out last change; no immediate plans to make the whole block-device
...
layer asynchronous, so keeping the sync/async boundary within aoedev.c
seems cleanest for now.
2006-06-01 11:14:59 +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
d21fc3610f
Added sample AoE test code to tree
2006-06-01 11:05:36 +00:00
Michael Brown
f6d20bb0f4
Put in a method to get the MAC address for the AoE target. (It's not
...
elegant, but it works).
2006-05-31 19:12:17 +00:00
Michael Brown
99ef98d0bf
ATA devices are now asynchronous. The ATA layer itself now performs the
...
async_wait(), though we may wish to move this higher up the stack, and
consider making the block device model asynchronous. (There is only a
marginal cost for synchronous devices, since they can simply call
async_done() before returning; async_wait() will work seamlessly in this
situation).
2006-05-31 18:57:11 +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
68125bc441
Added generic asynchronous operations code.
...
Removed data_in_len and data_out_len from ata_command structure; the
lengths are implied by the sector count and the presence of the data_in
or data_out pointers.
Changed AoE code to use subcommands by default, and made aoe_issue()
nonblocking (with completion via async_wait()).
2006-05-31 14:34:17 +00:00
Michael Brown
73a449e96b
Added drivers/ata directory (forgot to check this in previously).
2006-05-31 14:31:48 +00:00
Michael Brown
552b4a178e
One bit of an ASCII character can make a big difference.
2006-05-29 21:00:00 +00:00
Michael Brown
1db1a6dad3
Added first sketch of a generic retry timer mechanism. The idea is to use
...
these timer objects in AoE and UDP protocols (where there is no underlying
retransmission mechanism) without requiring each protocol to implement its
own individual retry logic. Eventually, we should be able to use the same
timer code for TCP retransmissions as well.
2006-05-29 14:55:07 +00:00
Michael Brown
6541338897
Handle multi-sector reads by splitting them into subcommands.
2006-05-29 08:25:31 +00:00
Michael Brown
9a2a52693d
Initial AoE implementation. Limitations are:
...
Cannot yet handle reads of more than two sectors
No retransmission
No way to find out a target's MAC address (this proof of concept uses
broadcasts)
These limitations shall not last long! :)
2006-05-28 23:29:43 +00:00
Michael Brown
6f998cecb3
Use separate data-in and data-out buffers.
...
Increase code simplicity at the expense of around 64 bytes.
2006-05-28 23:26:42 +00:00
Michael Brown
6d6252067f
Add ETH_P_AOE
2006-05-28 21:47:52 +00:00
Michael Brown
35b04b1514
Tidy up comment
2006-05-28 14:40:04 +00:00
Michael Brown
041a04335e
Fixed assembly on old versions of gas
2006-05-28 14:21:29 +00:00
Michael Brown
f743de4858
Added tcp_kick(). This speed up LILO and GRUB booting by almost two
...
orders of magnitude.
2006-05-27 19:01:20 +00:00
Michael Brown
cd3ecac809
Avoid causing TX overflow on small TX queues.
2006-05-27 13:55:36 +00:00
Michael Brown
70ef6dbb7c
Rewrote to use the new net driver API, the updated PCI API, and the
...
generic three-wire serial device support for EEPROM access.
2006-05-27 13:45:14 +00:00
Michael Brown
69b1f24a97
I have no idea how this ever worked before.
2006-05-27 13:43:56 +00:00
Michael Brown
6c50564724
Make PKB_ZLEN the minimum possible size of packet buffer (to allow for
...
hardware that can't autopad).
2006-05-27 13:39:45 +00:00
Michael Brown
1dbafa8950
Tidied up debugging messages
2006-05-27 13:38:49 +00:00
Michael Brown
aa2468babe
Added abstraction layer for a three-wire serial device (e.g. the EEPROM
...
used on RTL8139 cards).
2006-05-26 15:39:24 +00:00
Michael Brown
9f86754f90
Updated to work with libprefix.
2006-05-25 22:04:47 +00:00
Michael Brown
29340d7728
Documented the fact that the prefix can prot_call(main) without
...
worrying about its stack being destroyed during the Etherboot run.
2006-05-25 22:04:17 +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
Michael Brown
3204a1e941
Removed some obsolete INIT_XXX constants.
2006-05-25 01:09:06 +00:00
Michael Brown
d82f71efd0
Also hide base memory region from E820 map.
2006-05-25 00:10:58 +00:00
Michael Brown
89da833c5d
init_librm() and prot_call() are now real-mode far calls.
...
install() now calls relocate(), moves the protected-mode code to the new
location, and calls hide_etherboot().
2006-05-25 00:06:45 +00:00
Michael Brown
4d81b48504
Has been obsolete for a while.
2006-05-25 00:04:37 +00:00
Michael Brown
1966945a5d
Update relocate() to work with get_memmap().
...
Change semantics; relocate() now just finds a suitable location; it
doesn't actually perform the relocation itself. Code in libprefix does
the copy in flat real mode.
2006-05-25 00:04:13 +00:00
Michael Brown
f939ff7cb5
Fix printf format warning error
2006-05-25 00:02:27 +00:00
Michael Brown
3bd3c13c7b
Why should pushal/popal put the registers on the stack in a logical
...
order?
2006-05-25 00:01:46 +00:00
Michael Brown
dd75965057
Typo.
2006-05-25 00:00:53 +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
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
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