diag/geodsp: add mk-lba-img.pl

To be used to replace the native C binary
diag/geodsp: Use perl to make the image; Fix Makefile

This reduces the host binary dependence and prevents the need for a
rebuild of the images after a 'make clean'.

This has the unfortunate side effect of going from 0.03s to 0.30s to
build an image.

Also fix Makefile to include (optional) raw targets and use $(GZIPPROG)

Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
Merge remote-tracking branch 'genec/diag-geodsp-perl-for-hpa'
Merge remote-tracking branch 'origin/master' into lwip
lwipopts: increase the number of netbufs

We need more netbufs than the default 2...

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
pxe, tftp: Unify UDP send and use pbuf memory

The spec says memory using netbuf_ref() isn't allowed to change, so
use pbuf memory.  This seems to avoid an assert in the lwip stack.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
pxe, tftp: make TimeoutTable static

TimeoutTable is now only used in tftp.c, so make it static.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
pxe, tftp: Handle block number wraparound

Variables which hold TFTP block numbers must be uint16_t, or they will
not wrap around properly.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
pxe: Remove stray debugging message

Unloading PXE was a debugging message, use dprintf().

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
lwip: Add return address to LWIP_PLATFORM_ASSERT()

It might help a little bit finding bugs...

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
pxe, ftp: Change anonymous password to syslinux@

Change the anonymous password from "pxelinux@" to "syslinux@".

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
core/lwip: update to lwIP-1.4.0

Also involved moving some calls as certain functions within lwip moved/changed.

Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
core/pxe: lwip changes to netconn_recv

Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
core/pxe: lwip  semaphore changes

Upstream changed how it called back to the system implementing
semaphores/mutexes

Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
Merge remote-tracking branch 'genec/lwip-1.4.0-test-2' into lwip
pxe: Add code to detect a struck interrupt line and disable (go to poll)

Add code to detect a stuck interrupt line and disable it; at that
point we will go to polling mode.  Currently we only give ourselves 3
timer ticks after initialization to detect this, but this is good
enough to deal with gPXE on virtio.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
pxe: drop the maximum spurious interrupt to 100 in a timer tick

More dangerous, but avoids false negatives...

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
pxe: always start the idle thread, in case we need it

Always start the idle thread, but leave it blocked unless we have an
indication that interrupts are not working.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
pxe: force polling on if we receive no interrupts

Some PXE stacks will claim to support interrupts and don't.  If 3
seconds after the first packet transmission we still have not received
any interrupt at all, activate the polling thread.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
pxe: use core for atomic modification of certain volatiles

pxe_need_poll and pxe_irq_count can be accessed from an interrupt
handler, so make sure that we modify them in a way that is locally
atomic.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>