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
Michael Brown
0afa9db2de
Tear out old heap code, replace with code that simply allocates memory
...
for use by malloc().
This breaks the image-loading code (which previously used the heap to
allocate the buffer for downloading the image), but that's not a major
concern since I'm going to tear out all the image formats within the next
couple of days anyway. Byebye, NBI! :)
2006-05-16 15:00:36 +00:00
Michael Brown
689218618f
Fix typo
2006-05-16 14:42:43 +00:00
Michael Brown
441189c6f8
Kill off the "all devices are boot devices" idea
2006-05-16 14:42:15 +00:00
Michael Brown
7cd0390013
Add list_for_each_entry_safe.
2006-05-16 14:14:31 +00:00
Michael Brown
ceba6ecb75
Added generic device model.
2006-05-16 14:10:21 +00:00
Michael Brown
6b514393d3
Change movetoyx(), putc() and getc() to methods of the screen.
2006-05-15 09:51:18 +00:00
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
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
f25731d08f
Split "iSCSI as a SCSI device" out from "iSCSI as a TCP protocol".
2006-05-14 23:29:16 +00:00
Michael Brown
29fb77b0a4
Fix a couple of minor typos.
2006-05-14 18:17:29 +00:00
Michael Brown
6e42cb95bd
Also capture INT 19 as a failure path, to allow for boot sectors that
...
don't conform to BBS (e.g. the one created by mkdosfs).
2006-05-14 14:13:55 +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
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
21493646c2
Moved to net/tcp/iscsi.c.
2006-05-13 11:45:49 +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
63499e9cfd
Allow re-entrancy and provide a global counter of the number of
...
interrupts hooked.
2006-05-13 11:44:11 +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
5009f8d6a2
Provide a SCSI device interface to the iSCSI protocol
2006-05-13 11:39:46 +00:00
Michael Brown
f33f01c126
Defined SCSI device interface, and added SCSI block device
...
implementation.
2006-05-13 11:37:50 +00:00
Michael Brown
8638a5e471
Defined a block device interface.
2006-05-13 11:36:30 +00:00
Michael Brown
1838b58c3f
Add drivers/block and arch/i386/interface/pcbios
2006-05-13 11:35:29 +00:00
Michael Brown
568cad0ddc
(Redoing check-in lost by SourceForge's failure.)
2006-05-13 11:30:03 +00:00
Michael Brown
8a229a16f6
(Redoing check-in lost by SourceForge's failure.)
...
Moved to net/
2006-05-13 11:24:25 +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
fdb983d473
Preserve the whole of %esp across prot_call(). We have to split this
...
between the low half stored in the static variable rm_sp, and the high
half stored on the prot_call() stack, because:
Just using the stack would screw up when a prot_call()ed routine
executes a real_call(); it would have no way to find the current top of
the RM stack.
Extending rm_sp to rm_esp would not be safe, because the guarantee that
rm_sp must return to the correct value by the time an external
real-mode call returns applies only to %sp, not to %esp.
2006-05-06 19:44:23 +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
c10d1aa9d7
Preserve GDT across prot_call().
2006-05-06 18:52:27 +00:00
Michael Brown
dcc1b0054e
This line should not have been checked in
2006-05-04 23:22:42 +00:00
Michael Brown
832807726a
Add infrastructure to support access to .data16 (and .text16) variables
...
from protected-mode code.
Set up %ds to point to .data16 in prot_to_real, so that code specified
via REAL_EXEC() and friends can access variables in .data16.
Move most real-mode librm variables from .text16 to .data16.
2006-05-04 23:14:06 +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
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
cc23057b59
Typo
2006-05-02 21:09:29 +00:00
Michael Brown
10c28a51bd
Create two easy-to-use entry points in libprefix: install and
...
install_prealloc. I *think* these will suffice for all the 16-bit
prefixes.
2006-05-02 20:51:07 +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
8f62b39c03
Move stack out to separate object, so that having a stack doesn't drag in
...
setup.S.
2006-05-02 14:57:48 +00:00
Michael Brown
5463169c1a
Verified as working
2006-05-02 14:04:21 +00:00
Michael Brown
d081d65d48
This should be much more elegant: we use flat real mode for the
...
highmem data, so decompress16 will be able to unpack blocks bigger
than 64kB.
2006-05-01 22:35:19 +00:00
Michael Brown
cc8821a443
Checking in because I don't want to lose this rather neat code for
...
running the decompresser in 16:16 protected mode using the real-mode
stack. However, there's an even simpler way to do it...
2006-05-01 21:26:44 +00:00
Michael Brown
2462047128
Typo
2006-04-30 18:19:39 +00:00
Michael Brown
9e1becaf8a
Merge TCP aborted(), timedout() and closed() methods into a single
...
closed() method with a reason code.
2006-04-30 16:59:45 +00:00
Michael Brown
8afb6303fb
Half-way tidy
2006-04-30 15:23:29 +00:00
Michael Brown
04b6a1e004
Make all TCP methods optional; at least FTP data is a read-only
...
connection and so legitimately ignores acked() and senddata().
2006-04-30 13:20:40 +00:00
Michael Brown
aec0e127d2
Proof-of-concept FTP implementation
2006-04-30 12:02:07 +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
01bd78d62a
Created net/tcp and moved hello.c there
2006-04-30 09:34:11 +00:00
Michael Brown
7af478b30d
Make tcp_connect() void; it will eventually have no failure case.
2006-04-30 02:13:52 +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
178b0a7e5e
Consistency
2006-04-30 01:35:01 +00:00
Michael Brown
592a5a99c8
Moved uIP and tcp.c from proto/ to net/
2006-04-30 01:16:37 +00:00
Michael Brown
352bf1bda2
Move init.h to gpxe/init.h.
2006-04-30 01:08:52 +00:00
Michael Brown
bac97eb979
Change semantics of network API so that packet-absorbing calls *always*
...
take ownership of the packet, rather than doing so only if they return
success. This breaks semantic compatibility with Linux's
hard_start_xmit() method, but means that we don't have to worry so much
about error cases.
Split mechanism of processing received packets (net_rx_process()) out
from policy (net_step()), preparatory to putting net_step() in a separate
object.
2006-04-29 17:17:43 +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
5fe31f1014
Give uIP a static IP address for proof-of-concept testing
2006-04-28 14:15:21 +00:00
Michael Brown
129c6c3968
Network layer now works as a proof of concept
2006-04-28 14:13:50 +00:00
Michael Brown
1488cd3b73
Fix a couple of broken assertions, and align the buffer correctly.
2006-04-28 14:09:31 +00:00
Michael Brown
79f64eea55
Transmit the buffer contents, not the buffer descriptor...
2006-04-28 14:08:41 +00:00
Michael Brown
51feeab445
Add an explicit failure debug message
2006-04-28 14:07:41 +00:00
Michael Brown
084f6b18f7
Exclude bin directory from tags generation.
...
Create something that might be usable as a symbol list for bochs'
internal debugger.
2006-04-28 14:07:08 +00:00
Michael Brown
d8e99bf28f
Gave up on adding POSIX errno's as required, and just added (almost) all
...
of them in one go.
EBADIMG has been replaced by ENOEXEC, and EIMGRET by ECANCELED.
2006-04-28 13:44:34 +00:00
Michael Brown
cfae86f6c8
Glenn managed to shrink .text by 5 more bytes.
2006-04-25 21:48:16 +00:00
Michael Brown
fee8b91015
D'oh
2006-04-25 12:56:18 +00:00
Michael Brown
7a82c3eca3
Added missing ssize_t
2006-04-25 12:55:23 +00:00
Michael Brown
cf3783b4ca
Actually, it's probably a good idea to have packet buffers avoid 4kB
...
crossings.
2006-04-25 12:11:36 +00:00
Michael Brown
00a1de964d
Update to use POSIX-like API.
2006-04-25 12:04:07 +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
2f0d412210
Add __constant_flsl(), because it's useful for finding out the next
...
power-of-two up from a given constant via
( 1 << fls ( constant - 1 ) )
fls(), flsl(), ffs() and ffsl() appear in strings.h according to
POSIX.
2006-04-24 23:00:32 +00:00
Michael Brown
a81f96998b
Added missing headers required for compilation in Etherboot.
2006-04-24 19:35:10 +00:00
Michael Brown
455b76980f
Added pkb_reserve().
2006-04-24 19:34:51 +00:00
Michael Brown
26749951dc
We have our own ARP layer now.
2006-04-24 19:19:13 +00:00
Michael Brown
fcf765e42d
Add missing {register,free}_netdev().
...
Tie into existing driver API; we'll fix that up soon.
2006-04-24 18:44:50 +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
4c4e4de18f
(librm_base-1b) is already an offset; no need to apply OFFSET().
...
Doing so, in fact, seems to expose an assembler bug; (a-b-0) is
apparently not the same as (a-b). Go figure.
2006-04-24 18:29:47 +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
53f78346bf
Network API now allows for multiple network devices (although the
...
implementation allows for only one, and does so without compromising on
the efficiency of static allocation).
Link-layer protocols are cleanly separated from the device drivers.
Network-layer protocols are cleanly separated from individual network
devices.
Link-layer and network-layer protocols are cleanly separated from each
other.
2006-04-24 15:38:53 +00:00
Michael Brown
fdc2ee79db
Network API now allows for multiple network devices (although the
...
implementation allows for only one, and does so without compromising on
the efficiency of static allocation).
Link-layer protocols are cleanly separated from the device drivers.
Network-layer protocols are cleanly separated from individual network
devices.
Link-layer and network-layer protocols are cleanly separated from each
other.
2006-04-24 15:33:06 +00:00
Michael Brown
0d97f0d482
Obviate uip_init(); our bss is zeroed at startup already.
2006-04-24 15:31:02 +00:00
Michael Brown
5423f876fb
Don't bother poisoning lists; it costs code size.
2006-04-24 15:28:56 +00:00
Michael Brown
1d7cfd5acf
Prototype now clashes with the macro in arch/i386.
2006-04-24 15:27:58 +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
b6b6a0b5fe
First draft of a dynamic memory allocator
2006-04-24 15:21:18 +00:00
Michael Brown
e323d1a29b
Add "net" directory.
...
Avoid including debug information in bin/%.s output, since the whole
point is to have easy-to-read assembler.
2006-04-24 15:20:01 +00:00
Michael Brown
6209bd873a
First sketch of a new net device API.
2006-04-19 12:07:46 +00:00
Michael Brown
bdc8190c8d
Remove the concept of the media-independent link-layer header and replace
...
it with metadata in the pkb structure. This is required since UNDI will
want to be able to parse the link-layer header without destroying it.
2006-04-19 11:32:24 +00:00
Michael Brown
b89ccac02d
Updated to remove obsolete constants
2006-04-19 02:11:56 +00:00
Michael Brown
3ca7dbe7ca
Added the concept of a network interface (a network-layer concept) as
...
separate from a network device (a link-layer concept).
2006-04-19 02:09:08 +00:00
Michael Brown
d65a66606b
Typo
2006-04-19 02:08:27 +00:00
Michael Brown
2558439ce4
First version, based on include/linux/list.h, stripped down to just
...
those functions we are likely to need.
Still need to come up with a way of getting the linker to create
static lists using this linking mechanism.
2006-04-19 02:05:50 +00:00
Michael Brown
d24042f0bb
Update now that if_ether.h has moved.
2006-04-19 01:56:10 +00:00
Michael Brown
4f3581e99c
Added ENOENT and EAFNOSUPPORT
2006-04-19 01:54:53 +00:00
Michael Brown
ab139ceda9
Added pkb_unput() and pkb_len().
2006-04-19 01:54:24 +00:00
Michael Brown
744b895077
Make flags more efficient.
...
Add 'raw' net_addr facility (needed for ARP).
2006-04-19 01:53:49 +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
9f67ad9db0
First version. ARP protocol independence in less than the size of uIP's
...
Ethernet-and-IPv4-only ARP module. :)
2006-04-19 01:43:56 +00:00
Michael Brown
363905e1b6
Add missing prototype
2006-04-19 01:42:33 +00:00
Michael Brown
02d342f38f
First version
2006-04-19 01:42:03 +00:00
Michael Brown
0b561ce972
First sketch
2006-04-18 17:52:51 +00:00
Michael Brown
42b659f926
First version
2006-04-18 17:49:51 +00:00
Michael Brown
0864a73347
First version, based on the concepts in linux/skbuff.h
2006-04-18 17:47:01 +00:00
Michael Brown
1a60444fe4
Added netmask and gateway global options.
...
Added iSCSI testing.
2006-04-05 11:46:18 +00:00
Michael Brown
6446767258
First draft of iSCSI protocol support. Is capable of retrieving disk
...
blocks.
2006-04-05 11:44:56 +00:00
Michael Brown
9ea782d339
Make pcap_inject non-static, so that its prototype doesn't conflict with
...
the real pcap_inject in the case where we do have it.
2006-04-05 11:44:05 +00:00
Michael Brown
c8a7133e9f
Added tcp_buffer, to give applications a zero-cost place to build data to
...
be transmitted.
2006-04-05 11:43:01 +00:00
Michael Brown
988bb50979
Added set_netmask() and set_gateway()
2006-04-05 11:41:15 +00:00
Michael Brown
ee058362fa
We don't need to know anything about ARP
2006-03-24 17:39:05 +00:00
Michael Brown
90892d5ec7
Allow specifying the local IP address via --from.
2006-03-24 17:28:40 +00:00
Michael Brown
b44332eb7d
Split non-TCP portions of the stack out into ip.[ch].
...
Added set_ipaddr().
2006-03-24 17:22:09 +00:00
Michael Brown
1c607470e3
Put in a substitute pcap_inject() function, since earlier versions of
...
libpcap are lacking the function. For now, we always use the
substitute version, since there's no easy way to determine whether or
not we need it.
2006-03-24 16:43:12 +00:00
Michael Brown
7e61f38799
Moved "hello world" protocol implementation out of prototester.c and into
...
the first standalong uIP-based protocol module.
2006-03-23 22:37:05 +00:00
Michael Brown
508dcdb303
Added container_of(). This seems about the best place to put it, since
...
the definition of it uses offsetof(), and the two concepts are related.
2006-03-23 22:07:21 +00:00
Michael Brown
99032becce
Pick up the gPXE include files when building prototester.
2006-03-23 21:35:20 +00:00
Michael Brown
2299435f1c
Added prototype for inet_ntoa, even though we don't have the function
...
yet, in order to allow prototester.c to compile. It might be worth
changing all the uses of "%@" in printf to use "%s" and inet_ntoa
instead, in order to improve the portability of our code.
2006-03-23 21:34:25 +00:00
Michael Brown
a4a0244aa3
Moved uIP wrapper out of prototester.c and into proto/tcp.c.
2006-03-23 21:32:03 +00:00
Michael Brown
17c0253ca0
Add include/gpxe as a directory to scan.
...
Exclude proto/uip, since uip.c and uip_arp.c both have global variables
called "c", which screws up doxygen's auto-generation of links to file
documentation when it encounters a file name such as "hello.c".
2006-03-23 21:06:36 +00:00
Michael Brown
2bc7c746a6
Updated with "doxygen -u" from doxygen 1.4.4
2006-03-23 20:39:26 +00:00
Michael Brown
05b284399e
Moved old tcp.h to old_tcp.h, to avoid name clash with new (uIP-based)
...
tcp.h.
2006-03-23 20:34:08 +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
55497b3402
Added missing #endif
2006-03-23 19:23:25 +00:00
Michael Brown
cb8e89de15
Added assert.h, with assert() defined (almost) as per POSIX, and
...
linker_assert() defined as gPXE-specific.
2006-03-23 17:28:51 +00:00
Michael Brown
531371efa2
Removed to make way for the uIP-based tcp.c.
2006-03-23 16:59:25 +00:00
Michael Brown
dde1c5ad18
Moved include/in.h to include/gpxe/in.h, so that it can be included by
...
prototester.
2006-03-23 16:45:01 +00:00
Michael Brown
eaf40883ff
Add Makefile for hijack and prototester utilities.
2006-03-23 13:11:41 +00:00
Michael Brown
21c58729ae
Add debug symbols to objects. (They will be stripped out of the final
...
-Obinary build anyway, so it doesn't waste any space).
2006-03-23 13:09:29 +00:00
Michael Brown
b2c94b32fc
Make the application state a void *.
2006-03-23 13:08:06 +00:00
Michael Brown
218c26ff2b
Can now also print data sent by the remote side.
2006-03-23 13:06:08 +00:00
Michael Brown
0d506a5c6a
Now capable of sending "Hello world!" via TCP.
2006-03-23 12:25:28 +00:00
Michael Brown
911486fe41
Added basic http-specific option parsing
2006-03-22 22:35:32 +00:00
Michael Brown
5263a5abf4
Started adding structure to allow for separate protocol tests, with
...
individual options.
Created the embryonic beginnings of a cleanly separated driver and
protocol stack API.
2006-03-22 21:25:35 +00:00
Michael Brown
c32e83ad8d
Skeleton version: contains device driver (connecting to network via
...
hijack daemon) and a functional but very ugly and very primitive
wrapper around uIP.
This passes proof-of-concept testing; it successfully initiates a TCP
connection and responds to pings.
2006-03-22 02:23:20 +00:00
Michael Brown
bb37bd47f8
Added from uip-0.9/uip/uip_arp.[ch]
2006-03-22 02:14:55 +00:00
Michael Brown
417e896f0a
Remove htons(); it is provided elsewhere in Etherboot
2006-03-22 01:25:43 +00:00
Michael Brown
1c7c24f21f
Basic, functional-but-extremely-pessimal versions (taken from
...
uip-0.9/unix/uip_arch.c).
2006-03-22 01:24:13 +00:00
Michael Brown
c5a9c38606
Terminate cleanly on SIGINT or SIGHUP
2006-03-21 17:48:33 +00:00
Michael Brown
e072baeb8c
Use libpcap API to send/receive packets.
...
Include automatic filtering (based on source MAC address of first
transmitted packet).
Proven to successfully elicit a ping response from a remote host.
2006-03-21 16:50:25 +00:00
Michael Brown
4485df516c
Basic structure in place: can daemonise, listen on a Unix domain
...
socket, accept new connections, open a network interface using libpcap
and forward (all) traffic.
2006-03-21 02:25:30 +00:00
Michael Brown
013ee958a1
These can come back when someone wants to support them
2006-03-17 14:16:05 +00:00
Michael Brown
7be870acd3
More purging
2006-03-17 14:14:36 +00:00
Michael Brown
b2909e547d
They can come back when they have someone to support them.
2006-03-17 14:13:09 +00:00
Michael Brown
a2b15fd1fe
GPXE code cleanup and purge.
2006-03-17 14:09:45 +00:00
Michael Brown
cdf1511d3e
Prefix semantics have changed
2006-03-16 19:28:38 +00:00
Michael Brown
0e611719d2
Add uip on HEAD; it's safe to build, since nothing links against it at the
...
moment.
2006-03-16 19:18:12 +00:00
Michael Brown
d08ce741a4
Build in gpxe
2006-03-16 19:09:31 +00:00
Michael Brown
0806436d99
Remove accidental duplicate arising from merge
2006-03-16 19:04:19 +00:00
Michael Brown
239579efcf
Build under gpxe
2006-03-16 19:02:18 +00:00
Michael Brown
d0777627c6
Back out duplication arising from the merge
2006-03-16 18:56:16 +00:00
Michael Brown
c4f25b637c
Fix to compile under gpxe
2006-03-16 18:54:57 +00:00
Michael Brown
4ee0e0f85e
Merge from Etherboot 5.4
2006-03-16 18:51:23 +00:00
Michael Brown
46e7bd5b52
Merge from Etherboot 5.4
2006-03-16 18:44:31 +00:00
Michael Brown
7e0a7a2e08
Merge from Etherboot 5.4
2006-03-16 18:30:54 +00:00
Michael Brown
28cefdccc4
Merge from Etherboot 5.4
2006-03-16 18:30:46 +00:00
Michael Brown
9b18017296
Merge from Etherboot 5.4
2006-03-16 18:15:48 +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
9c8a69b673
Merge from Etherboot 5.4
2006-03-16 17:31:29 +00:00
Michael Brown
9b320c1ca4
Merge from Etherboot 5.4
2006-03-16 17:11:36 +00:00