| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
btrfs_read() was really just a function to read data linearly while
using the metadata cache. Move it to cache.c and rename it
cache_read() so other filesystems can make use of it as well.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Holding down shift is supposed to force a command line unless noescape
is provided; make it behave that way.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
| |
Most of file system drivers initialize the cache themselves.
The problem is that the same cache could be again initialized later,
then invalidating the previous one. This patch fixes this.
Problem found while auditing the code.
Signed-off-by: Raphael S. Carvalho <raphael.scarv@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Filesystem UUID shows the partition we boot kernel from.
The kernel parameter has format like FSUUID=DA1A-0B2E.
The SYSAPPEND bit is 0x40000. Now the FAT only supports FSUUID.
The patch is based on 67aaaeeb228.
Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Remove the shuffle and boot comapi call. This is the last of the
comapi calls left; we should now be able to completely remove the
comapi support.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The only comapi calls left are the ones related to the ADV and to
shuffle and boot. Remove the ADV-related ones as part of getting rid
of the comapi framework completely.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|/
|
|
|
|
|
|
|
| |
Actually get the shuffler size sanely. At least for now, we are BIOS
only, so stub out the functions on EFI (they shouldn't even be
compiled for EFI; this stuff should be moved into some kind of
BIOS-only directory.)
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The __lowmem and __bss16 macros are only useful in the core itself.
Hide them from modules so people don't use them by mistake.
extern declarations don't need them (and are safe in modules), they
are only necessary at the point of definition (which must be in the
core.)
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
git://github.com/geneC/syslinux into firmware
Pull various network stack fixes from Gene Cumm and adapt to the 6.xx
core_udp_* API,
* 'elflink-pxe-fixes-for-mfleming-2' of git://github.com/geneC/syslinux:
PXE ISR: Force polling on select hardware WORKAROUND
core/lwip: Fix NULL pointer check
PXE: use ddprintf macro
com32: Define ddprintf() macro
PXELINUX: specify PXE/lwIP
undiif: show thread of execution on UNDIIF_ID_DEBUG
core: dprintf() the banner.
PXELINUX: Use sendto() instead of connect()/send()/disconnect()
core: make mbox_post()/__sem_down_slow() check if valid
core: mbox/semaphore NULL checks
core/lwip/undi: Improve UNDIIF_ID_DEBUG messages
Conflicts:
core/fs/pxe/pxe.c
core/fs/pxe/tftp.c
core/init.c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit prevents a race-condition on systems that have functional
interrupts (observed with iPXE and select other Dell systems). Without
this, the reply packet could be received by the core prior to the
disconnect() call, see that it doesn't have a matching PCB (protocol
control block, iirc) since the reply has a different far-end UDP port
than the original request, and lwIP will discard the packet before
PXELINUX can see it.
net_core_sendto() instead of
net_core_connect() net_core_send() net_core_disconnect()
Commit message expanded with Matt Fleming's assistance
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
|
| |
| |
| |
| |
| |
| | |
Also set mbox invalid and mbox pointer NULL when free()d
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use the one from syslinux/video.h. This makes it easier to write unit
tests for syslinux/load_linux.c without pulling in loads of core
definitions from core/include/graphics.h. It can also be argued that
syslinux_* symbols should have prototypes in syslinux/*.h files.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
We need to provide a __bcopyxx_len symbol for EFI because it's
referenced in generic code in libcom32.c32. Without this change,
libcom32.c32 will fail to load under EFI.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
To get rid of the following GCC warning,
efi/main.c:1237:2: warning: implicit declaration of function ‘load_env32’ [-Wimplicit-function-declaration]
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Unfortunately, there are still some references in generic code to
symbols that only make sense under BIOS. Use the __weak tag to allow
building for EFI without having to declare these symbols. Accessing
these __weak symbols under EFI will generate an error at runtime,
indicating to the user that they're executing a BIOS code path.
The long-term solution is to move these BIOS-specific symbols into
core/bios.c or somewhere equally BIOS-centric so that these symbols are
no longer global.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|\ \
| |/
| |
| |
| |
| |
| |
| | |
syslinux-5.11-pre2
Conflicts:
core/elflink/load_env32.c
version
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In retrospect, choosing the colon character as the entry separator for
the PATH directive was not a smart move, as that character is also used
in TFTP-style paths. This conflict manifests as PXELINUX being unable to
find and load files.
An example dnsmasq log looks like,
dnsmasq-tftp: sent /arch/boot/syslinux/lpxelinux.0 to 192.168.0.90
dnsmasq-tftp: file /arch/ldlinux.c32 not found
dnsmasq-tftp: file /arch//ldlinux.c32 not found
dnsmasq-tftp: file /arch//boot/isolinux/ldlinux.c32 not found
dnsmasq-tftp: file /arch//isolinux/ldlinux.c32 not found
dnsmasq-tftp: file /arch//boot/syslinuxldlinux.c32 not found
dnsmasq-tftp: sent /arch//boot/syslinux/ldlinux.c32 to 192.168.0.90
dnsmasq-tftp: error 0 No error, file close received from 192.168.0.90
dnsmasq-tftp: failed sending /arch//boot/syslinux/ldlinux.c32 to 192.168.0.90
dnsmasq-tftp: sent /arch/boot/syslinux/archiso.cfg to 192.168.0.90
dnsmasq-tftp: sent /arch/boot/syslinux/whichsys.c32 to 192.168.0.90
dnsmasq-tftp: file /arch/libcom32.c32 not found
dnsmasq-tftp: file /arch//libcom32.c32 not found
dnsmasq-tftp: file /arch/libcom32.c32 not found
dnsmasq-tftp: file /arch//arch//boot/syslinux/libcom32.c32 not found
The last line of the log is the indication that there's a problem.
Internally, Syslinux adds the location of ldlinux.c32 to PATH by
querying the current working directory once ldlinux.c32 is successfully
loaded. Under PXELINUX that means the initial PATH string will be,
"::/arch/boot/syslinux/"
The PATH parsing code doesn't know how to correctly parse the "::"
string and hence, the file is searched for relative to the 210 dhcp
option directory - /arch/.
Implement PATH with a linked list which *greatly* simplifies the path
code, and means we no longer have to parse strings backwards and
forwards.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The special handling of serial ports 0-3 meaning "look in a BIOS
table" is at least officially BIOS-specific, so create an inline
function and move it to bios.h.
While we are at it, make the function look slightly less like
converted assembly.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add TCP and UDP support to the EFI firmware backend. This necessitated
moving all tcp functions to a core_tcp_* prefix so that they could be
implemented differently for BIOS+lwip and EFI. Unfortunately, the tcp_*
prefix is already in use by the lwip code.
To maintain symmetry, the UDP functions were also moved from net_core_*
to core_udp_*. The net_core API was introduced in 5.x to allow the
legacy PXE and lwip stacks to live side by side, and the intention was
that net_core_init() would take a protocol argument to build a
protocol-specific object. It turned out to be easier to call either udp
or tcp functions directly because the semantics of read/write differ
between protocols.
Booting an IPv4 EFI PXE stack using tftp and http has been tested.
There are a couple of TODO items left,
o dns resolve code is missing
o ftp hasn't been tested
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
syslinux-5.10-pre2
Conflicts:
NEWS
com32/include/netinet/in.h
com32/include/sys/cpu.h
com32/lib/Makefile
core/Makefile
core/fs/diskio.c
core/fs/pxe/pxe.h
core/init.c
core/mem/free.c
core/mem/malloc.c
mk/devel.mk
version
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
While it's nice having the shiny new lwIP stack, there is definitely
merit in being able to choose between two different network stacks. We
want to keep the legacy network stack around as it is known to handle
funky BIOS implementations and provides a good reference point when
bugs are suspected in the lwIP code.
Users now have a choice of .0 files. pxelinux.0 uses the legacy
network stack, while lpxelinux.0 uses lwIP.
Note that not every protocol is converted to using this new API. The
http, ftp and tcp code is still inherently tied to the netconn API,
and is only available with lpxelinux.0 and the lwIP stack. It's
unlikely that this code will ever be fixed up to work with the legacy
network stack.
Network stack operations are abstracted behind the net_core_*
interface, and each network stack has private data fields contained
within a struct net_private.
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Gene Cumm <gene.cumm@gmail.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Welcome to Syslinux 5.10.
Conflicts:
NEWS
com32/lib/Makefile
com32/lib/sys/open.c
com32/lib/syslinux/ipappend.c
com32/modules/Makefile
com32/modules/prdhcp.c
core/Makefile
core/cmdline.inc
core/com32.inc
core/comboot.inc
core/configinit.inc
core/fs/chdir.c
core/fs/fs.c
core/fs/pxe/dnsresolv.c
core/fs/pxe/pxe.c
core/fs/pxe/pxe.h
core/idle.c
core/include/ctype.h
core/init.inc
core/mem/init.c
core/parseconfig.inc
core/runkernel.inc
core/syslinux.ld
core/ui.inc
doc/comboot.txt
version
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add a magic number to the thread control block; this helps check for
memory overwrites.
Add dprintf()s to the scheduler.
Force a minimum stack size.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add an operation to mark a semaphore or a mailbox invalid (need to be
reinitialized); and to test whether or not they are initialized.
Allow for static mboxes, that is, not using dynamic memory.
Both these changes should allow for the use of non-dynamic allocations
in lwIP 1.4 and higher.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
At least gPXE/iPXE apparently enters the NBP with the interrupt line
disabled at the PIC; explicitly enable it instead.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Pass the file flags down through the stack. This allows us to
distinguish between open for read, open for write, or opendir in the
low-level filesystem functions; this will matter for the PXE methods.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Fix set-but-not-used variable warnings and undefined references.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
need_schedule was no longer used by anything else, and schedule_lock
only verified if we were being called from inside sched_hook_func().
Make the localness of this data explicit.
While we're at it, call kaboom if we ever find ourselves without a
runnable thread (which should not be possible, as the idle thread is
not allowed to block.)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
kill_thread() had been modifying errno(!) as if it had been the return
value... in other words, it really did absolutely nothing.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Add additional sysappend strings from DMI; we may want to add even
more but let's think about it first.
- Pre-generate http cookies.
- Add a "sendcookies" command to mask out some of the information.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Generalize the ipappend handling to cover all the derivatives, and
rename it "sysappend" ("ipappend" is a valid alias for all
derivatives.) Move all the string handling to protected mode.
Currently only pxelinux exports strings, but the plan is to change
that in the future.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There are no more users of the .hugebss section, so remove it from
existence.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Clean up dead code in the PXE stack.
The buffer assignment no longer limits the number of open files
either, so raise it to something more than reasonable.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The idle thread can never sleep, so it's not really safe to do
anything inside it. Instead, run a separate poll thread at low
priority; we can also do that to poll the serial console if needed.
Overall, the "classic" Syslinux idle handling really should go away
and be replaced by the idle thread.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If the UNDI stack reports either IRQ 0 or does NOT report the NDIS IRQ
supported flag, then poll the interrupt routine from the idle thread
instead.
This is somewhat limited; we really should have a chain of idle poll
routines to support things like serial console.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When this code was originally written, we didn't have lmalloc(). Now
when lmalloc() is implemented, let each real-mode task have its own
stack.
Note that this means we absolutely have to continue to support the
SS != CS, DS model in the real-mode code, which should already be the
case, but...
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For some reason the core_pm_hook is not getting called
every time we get an interrupt with the result that
in some situations like arping for our neighbours mac
address or a tftp transfer we can stall, we never move
forward again.
The reason for those stalls likely bears more investigating
but for now it is sufficient for me to know that they exist
and that I can work around them by polling for wakekup
conditions everytime we call schedule. That gives us code
that works reliably and stays within the letter of the
pxe spec. The oddities of the pxelinux core can be ironed
out later.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
This is needed for the http file downloader.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
core.h brings in a lot of symbols and causes conflicts when
included into lwip, in particular conflicts on the symbol
lfree.
So do the simple thing and simplify what thread.h brings in to
reduce the change of symbol conflicts.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
lwip gets symbol conflicts when we include all of core.h
so move the declaration of the timers into their own header
so that we can use those declartions in thread.h and so
we can use thread.h from lwip without having to deal with
symbol conflicts.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
This allows kaboom to be used by lwip without having to inclued all of core.h
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Add a name field to struct thread, for debugging's sake.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Add the ability to statically declare initialized semaphores.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
lwip needs to find a per thread list of timeouts when it calls
sys_arch_thread_timeouts(). Since we support threads we
can easily support this extra bit of private data.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Move most our thread state to the stack. Task switch the errno
variable.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Merge mbox_post() and mbox_trypost() into a single function with a
timeout parameter.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|