aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* core: pxe: beginnings of an FTP implementationHEADlwipH. Peter Anvin2009-10-061-0/+162
| | | | | | Basic FTP state machine, not yet functional. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: pxe: http: minor cleanupsH. Peter Anvin2009-10-061-3/+3
| | | | | | Clean up some incorrect types and stray variables. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: pxe: add a very simple network streaming interfaceH. Peter Anvin2009-10-064-120/+219
| | | | | | | Add a very simple network streaming interface, similar to the socket read interface, but much simpler. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: pxe: http: beginnings of a proper http transactorH. Peter Anvin2009-10-061-0/+251
| | | | | | | Beginnings of a proper http transactor, so far only header parsing done. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: pxe: urlparse: remove definitions from header fileH. Peter Anvin2009-10-061-16/+0
| | | | | | Remove definitions we already have in the header file. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: strbuf: fix the strbuf interfacesH. Peter Anvin2009-10-062-24/+50
| | | | | | | Fix compilation problems in the strbuf interfaces, and change them to take a pointer to the actual structure pointer. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: pxe: beginning of an URL-parsing frameworkH. Peter Anvin2009-10-064-0/+358
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* lwip: show stats when displaying speedtest resultsH. Peter Anvin2009-09-181-3/+25
| | | | | | | Performance seems to be heavily inversely correlated with packet loss... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* lwip: fix timestamps, statistics functionsH. Peter Anvin2009-09-182-1/+6
| | | | | | Add bits needed to support timestamps and stats functions. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: lwipopts: additional fine-tuningH. Peter Anvin2009-09-181-2/+6
| | | | | | Fine tune parameters a bit more... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* lwip: better speed testH. Peter Anvin2009-09-171-57/+66
| | | | | | Better speed test, to make tuning easier. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Make sure TCP_WND is < 64K-TCP_MSSH. Peter Anvin2009-09-171-1/+1
| | | | | | Avoid an error "len would wrap tcp_wnd" Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: lwip: tune parameters for performanceH. Peter Anvin2009-09-172-6/+12
| | | | | | | With these tweaks, we are up from 6 Mbps to over 200 Mbps on a back-to-back gigabit TCP connection. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* lwip: better test caseH. Peter Anvin2009-09-161-9/+39
| | | | | | | Download a large file from www3.kernel.org (Amsterdam) and time the result. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* jiffies.h: drop "const" from __jiffiesH. Peter Anvin2009-09-161-1/+2
| | | | | | | | | Apparently gcc thinks that "const volatile" means it can move references around -- it doesn't, it just means that it's not permitted to write to a location which is otherwise volatile. Mark it just plain volatile to un-confuse gcc. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* lwip: now to the point we can make a TCP connection...H. Peter Anvin2009-09-168-51/+198
| | | | | | | lwip is now functional enough that TCP and DNS seem to work. More tests still need to be done, though. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: thread: return 0 from sem_down() if we didn't have to waitH. Peter Anvin2009-09-161-0/+1
| | | | | | Return 0 from sem_down if we passed right through the assembly code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: pxe: additional work on the lwip portH. Peter Anvin2009-09-1521-190/+260
| | | | | | | | | | | | | | | Additional work on the lwip port. With this code, we can get pretty far before having problems. This moves malloc into the core directory, mostly so we can guard the malloc stuff with semaphores. I suspect we're going to have to have at least stub semaphores available to the library, since other things are going to need to be made thread-safe, too. This checkin contains debugging printfs and considerable amounts of placeholder code, that needs to be fixed. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge branch 'lwip' of ssh://terminus.zytor.com/pub/git/syslinux/lwip into lwipH. Peter Anvin2009-09-143-10/+6
|\
| * Merge commit 'origin/elflink' into lwipH. Peter Anvin2009-09-143-10/+6
| |\
| | * core: add .stack16 to layout.incelflinkH. Peter Anvin2009-09-141-0/+1
| | | | | | | | | | | | | | | | | | | | | It seems to get the right flags by default, but since .stack needed it we might as well put in .stack16 too... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * core: add .stack to layout.inc so it gets the proper flagsH. Peter Anvin2009-09-141-0/+3
| | | | | | | | | | | | | | | | | | | | | Add the .stack segment to layout.inc even as just a dummy, so that we end up with the correct flags in the output. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| | * core: get rid of .rel.dyn properlyH. Peter Anvin2009-09-142-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get rid of the .rel.dyn section properly. .rel.dyn isn't actually an input section name -- it is an output section name, so we need to specify the correct input sections, which all match *(.rel.*). Huge thanks to H.J. Lu for this tip. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | core: thread: add a name field, static declaration of semaphoresH. Peter Anvin2009-09-149-10/+38
| | | | | | | | | | | | | | | | | | | | | | | | Add a name field to struct thread, for debugging's sake. Add the ability to statically declare initialized semaphores. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | core: pxeisr.inc: fix compatibility with older versions of NASMH. Peter Anvin2009-09-131-2/+1
|/ / | | | | | | | | | | | | Older versions of NASM require "global" to precede the symbol definition. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: pxe: don't switch to the PXE stack if we're on it...H. Peter Anvin2009-09-111-0/+22
| | | | | | | | | | | | | | Don't switch to the PXE stack if we are already on it. This can happen if we take an interrupt inside the stack switch code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | pxe: lwip: busy-wait if transmit is blocked for buffersH. Peter Anvin2009-09-111-11/+13
| | | | | | | | | | | | | | If we can't send a packet because of insufficient buffers, simply busy-wait and keep trying. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | pxe: lwip: update data pointer after getting a secondary fragmentH. Peter Anvin2009-09-111-0/+1
| | | | | | | | | | | | | | After we receive a secondary fragment we need to update the frame data pointer. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | pxe: hook up the interrupt routine and the lwip receive routineH. Peter Anvin2009-09-112-46/+107
| | | | | | | | | | Hook up the interrupt routine to the lwip receive routine; this should be able to receive packets as written.
* | lwip: sys_arch.c: properly handle sys_mbox_trypostH. Peter Anvin2009-09-111-3/+1
| | | | | | | | | | | | Handle the return values for sys_mbox_trypost correctly. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: pxe: pm return hook to examine timer ticks and PXE ISR statusH. Peter Anvin2009-09-101-0/+44
| | | | | | | | | | | | | | When returning to protected mode, check to see if we have any pending actions due to interrupts. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | thread: add support for locking the schedulerH. Peter Anvin2009-09-104-0/+18
| | | | | | | | | | | | | | Add support for locking the scheduler; this is needed for the pm return hook to operate properly. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: add a way to invoke a function on return to protmodeH. Peter Anvin2009-09-102-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | Add a hook so we can invoke a protmode function immediately before enabling interrupts on the way back from protected mode. This will *not* be invoked if we are more than one level deep (i.e. [RM(0) ->] PM(0) -> RM(1) -> PM(1) -> RM(2) will not invoke the hook when returning to PM(1).) This is intended to provide a hook for taking an action after a real-mode interrupt did something, i.e. the PXE receive ISR or the timer tick. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | lwip: sys_arch: actually return the semaphore from sys_sem_new()H. Peter Anvin2009-09-101-0/+1
| | | | | | | | | | | | | | Allocating and initializing the semaphore is great, but it needs to actually be returned to the program, too... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: pxe: real-mode interrupt service routineH. Peter Anvin2009-09-103-0/+102
| | | | | | | | | | | | | | | | Real-mode interrupt service routine for PXE. All it does is poll the PXE stack, sets a flag, then issues EOI. It is then up to the PM stack to wake up the receive thread and process the packet receives. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | lwip: fix conflict with <netinet/in.h>H. Peter Anvin2009-09-101-3/+1
| | | | | | | | | | | | Fix a conflict with <netinet/in.h>. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | lwip: undiif - initial cut at a UNDI Ethernet-only driverH. Peter Anvin2009-09-101-0/+339
| | | | | | | | | | | | | | | | | | Initial cut at an UNDI driver -- still needs to be reworked to handle the receive side. For now, assume the underlying interface is Ethernet; supporting generic media types will require changes to the ARP handling in lwIP. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: import lwip TCP/IP stackH. Peter Anvin2009-09-10129-9/+56683
| | | | | | | | | | | | | | Import the lwip TCP/IP stack, with the intent to use it instead of raw PXE calls in PXELINUX. Lots of work to be done here, though. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | thread: mbox: fix return value for mbox_fetch()threadH. Peter Anvin2009-09-101-2/+6
| | | | | | | | | | | | Make mbox_fetch() actually return the time spent waiting. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: thread: add a "timeouts" pointer to the thread structureH. Peter Anvin2009-09-091-0/+3
| | | | | | | | | | | | | | | | Add a "timeouts" pointer to the thread structure; this is a private per-thread pointer for the benefit of lwIP. This is ad hoc, but a lot easier than implementing TLS. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: thread: move most thread state to stack; task switch errnoH. Peter Anvin2009-09-094-24/+39
| | | | | | | | | | | | | | Move most our thread state to the stack. Task switch the errno variable. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: thread: merge mbox_post() and mbox_trypost()H. Peter Anvin2009-09-092-14/+7
| | | | | | | | | | | | | | Merge mbox_post() and mbox_trypost() into a single function with a timeout parameter. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: add simple mailbox libraryH. Peter Anvin2009-09-092-0/+88
| | | | | | | | | | | | A very simple mailbox library, designed for lwIP porting. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: thread: add option to not wait on a semaphore at allH. Peter Anvin2009-09-091-26/+33
| | | | | | | | | | | | | | Implement a "trywait" option... if timeout is set to -1, then timeout immediately if the semaphore isn't available. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: thread: have start_thread() allocate memory dynamicallyH. Peter Anvin2009-09-094-12/+18
| | | | | | | | | | | | | | | | Have start_thread() allocate memory dynamically, using malloc(). XXX: should probably free that memory in __exit_thread()... could be "interesting". Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: simple thread libraryH. Peter Anvin2009-09-0811-0/+416
| | | | | | | | | | | | Simple thread library with the intent of making lwIP easier to port. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | core: declare jiffies_t, MS_PER_JIFFYH. Peter Anvin2009-09-081-3/+7
| | | | | | | | | | | | Create a specific type for jiffies, and an MS_PER_JIFFY macro. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | stddef.h: add container_of()H. Peter Anvin2009-09-081-0/+8
|/ | | | | | Add the container_of() macro. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge branch 'fsc' into elflinkH. Peter Anvin2009-09-043-0/+82
|\
| * core: pxe: need to save/restore es around EFI CSM hacksyslinux-4.00-pre6fscH. Peter Anvin2009-09-041-0/+2
| | | | | | | | | | | | | | | | Unlike in the Syslinux 3.x branch, we need to save/restore es around the PXE EFI CSM localboot hack. This really should be moved to C, anyway, at the same time USE_PXE_PROVIDED_STACK is finally killed off. Signed-off-by: H. Peter Anvin <hpa@zytor.com>