aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2019-02-07 20:05:52 -0800
committerH. Peter Anvin (Intel) <hpa@zytor.com>2019-02-07 20:05:52 -0800
commit458a54133ecdf1685c02294d812cb562fe7bf4c3 (patch)
treef3dc3a87dfdeb5d179e3f4ef73bf74d651136432 /core
parentb40487005223a78c3bb4c300ef6c436b3f6ec1f7 (diff)
downloadsyslinux-458a54133ecdf1685c02294d812cb562fe7bf4c3.tar.gz
syslinux-458a54133ecdf1685c02294d812cb562fe7bf4c3.tar.xz
syslinux-458a54133ecdf1685c02294d812cb562fe7bf4c3.zip
Fix all warnings, and better separate code that should not be mixedsyslinux-6.04-pre3
Clean up a number of warnings in the tree. Refactor especially the core code so we don't end up building a bunch of BIOS-specific code for EFI, and general build cleanups. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'core')
-rw-r--r--core/Makefile156
-rw-r--r--core/bios/adv.inc (renamed from core/adv.inc)0
-rw-r--r--core/bios/bcopy32.inc (renamed from core/bcopy32.inc)0
-rw-r--r--core/bios/bcopyxx.inc (renamed from core/bcopyxx.inc)0
-rw-r--r--core/bios/bios.c (renamed from core/bios.c)0
-rw-r--r--core/bios/bios.inc (renamed from core/bios.inc)0
-rw-r--r--core/bios/call16.c (renamed from core/call16.c)0
-rw-r--r--core/bios/callback.inc (renamed from core/callback.inc)0
-rw-r--r--core/bios/com32.inc (renamed from core/com32.inc)0
-rw-r--r--core/bios/common.inc (renamed from core/common.inc)0
-rw-r--r--core/bios/config.inc (renamed from core/config.inc)0
-rw-r--r--core/bios/conio.c295
-rw-r--r--core/bios/diskboot.inc (renamed from core/diskboot.inc)0
-rw-r--r--core/bios/diskfs.inc (renamed from core/diskfs.inc)0
-rw-r--r--core/bios/diskio_bios.c (renamed from core/fs/diskio_bios.c)0
-rw-r--r--core/bios/diskstart.inc (renamed from core/diskstart.inc)0
-rw-r--r--core/bios/extern.inc (renamed from core/extern.inc)7
-rw-r--r--core/bios/font.c (renamed from core/font.c)0
-rw-r--r--core/bios/graphics.c (renamed from core/graphics.c)0
-rw-r--r--core/bios/head.inc (renamed from core/head.inc)0
-rw-r--r--core/bios/init.inc (renamed from core/init.inc)0
-rw-r--r--core/bios/io.inc (renamed from core/io.inc)0
-rw-r--r--core/bios/isolinux-c.c (renamed from core/isolinux-c.c)0
-rw-r--r--core/bios/isolinux-debug-c.c1
-rw-r--r--core/bios/isolinux-debug.asm (renamed from core/isolinux-debug.asm)0
-rw-r--r--core/bios/isolinux.asm (renamed from core/isolinux.asm)0
-rw-r--r--core/bios/kaboom.c (renamed from core/kaboom.c)0
-rw-r--r--core/bios/kernel.inc (renamed from core/kernel.inc)0
-rw-r--r--core/bios/keywords.inc (renamed from core/keywords.inc)0
-rw-r--r--core/bios/layout.inc (renamed from core/layout.inc)0
-rw-r--r--core/bios/ldlinux-c.c (renamed from core/ldlinux-c.c)0
-rw-r--r--core/bios/ldlinux.asm (renamed from core/ldlinux.asm)0
-rw-r--r--core/bios/legacynet/core.c (renamed from core/legacynet/core.c)2
-rw-r--r--core/bios/legacynet/dnsresolv.c (renamed from core/legacynet/dnsresolv.c)2
-rw-r--r--core/bios/legacynet/idle.c (renamed from core/legacynet/idle.c)2
-rw-r--r--core/bios/legacynet/portnum.c (renamed from core/legacynet/portnum.c)2
-rw-r--r--core/bios/localboot.c (renamed from core/localboot.c)3
-rw-r--r--core/bios/localboot.inc (renamed from core/localboot.inc)0
-rw-r--r--core/bios/lpxelinux-c.c1
-rw-r--r--core/bios/lpxelinux.asm2
-rw-r--r--core/bios/lwip/CHANGELOG (renamed from core/lwip/CHANGELOG)0
-rw-r--r--core/bios/lwip/COPYING (renamed from core/lwip/COPYING)0
-rw-r--r--core/bios/lwip/FILES (renamed from core/lwip/FILES)0
-rw-r--r--core/bios/lwip/README (renamed from core/lwip/README)0
-rw-r--r--core/bios/lwip/UPGRADING (renamed from core/lwip/UPGRADING)0
-rw-r--r--core/bios/lwip/core.c (renamed from core/fs/pxe/core.c)2
-rw-r--r--core/bios/lwip/dnsresolv.c (renamed from core/fs/pxe/dnsresolv.c)2
-rw-r--r--core/bios/lwip/doc/FILES (renamed from core/lwip/doc/FILES)0
-rw-r--r--core/bios/lwip/doc/contrib.txt (renamed from core/lwip/doc/contrib.txt)0
-rw-r--r--core/bios/lwip/doc/rawapi.txt (renamed from core/lwip/doc/rawapi.txt)0
-rw-r--r--core/bios/lwip/doc/savannah.txt (renamed from core/lwip/doc/savannah.txt)0
-rw-r--r--core/bios/lwip/doc/snmp_agent.txt (renamed from core/lwip/doc/snmp_agent.txt)0
-rw-r--r--core/bios/lwip/doc/sys_arch.txt (renamed from core/lwip/doc/sys_arch.txt)0
-rw-r--r--core/bios/lwip/isr.c (renamed from core/fs/pxe/isr.c)15
-rw-r--r--core/bios/lwip/src/FILES (renamed from core/lwip/src/FILES)0
-rw-r--r--core/bios/lwip/src/api/api_lib.c (renamed from core/lwip/src/api/api_lib.c)0
-rw-r--r--core/bios/lwip/src/api/api_msg.c (renamed from core/lwip/src/api/api_msg.c)0
-rw-r--r--core/bios/lwip/src/api/err.c (renamed from core/lwip/src/api/err.c)0
-rw-r--r--core/bios/lwip/src/api/netbuf.c (renamed from core/lwip/src/api/netbuf.c)0
-rw-r--r--core/bios/lwip/src/api/netdb.c (renamed from core/lwip/src/api/netdb.c)0
-rw-r--r--core/bios/lwip/src/api/netifapi.c (renamed from core/lwip/src/api/netifapi.c)0
-rw-r--r--core/bios/lwip/src/api/sockets.c (renamed from core/lwip/src/api/sockets.c)0
-rw-r--r--core/bios/lwip/src/api/tcpip.c (renamed from core/lwip/src/api/tcpip.c)0
-rw-r--r--core/bios/lwip/src/arch/sys_arch.c (renamed from core/lwip/src/arch/sys_arch.c)0
-rw-r--r--core/bios/lwip/src/core/def.c (renamed from core/lwip/src/core/def.c)0
-rw-r--r--core/bios/lwip/src/core/dhcp.c (renamed from core/lwip/src/core/dhcp.c)0
-rw-r--r--core/bios/lwip/src/core/dns.c (renamed from core/lwip/src/core/dns.c)0
-rw-r--r--core/bios/lwip/src/core/init.c (renamed from core/lwip/src/core/init.c)0
-rw-r--r--core/bios/lwip/src/core/ipv4/autoip.c (renamed from core/lwip/src/core/ipv4/autoip.c)0
-rw-r--r--core/bios/lwip/src/core/ipv4/icmp.c (renamed from core/lwip/src/core/ipv4/icmp.c)0
-rw-r--r--core/bios/lwip/src/core/ipv4/igmp.c (renamed from core/lwip/src/core/ipv4/igmp.c)0
-rw-r--r--core/bios/lwip/src/core/ipv4/inet.c (renamed from core/lwip/src/core/ipv4/inet.c)0
-rw-r--r--core/bios/lwip/src/core/ipv4/inet_chksum.c (renamed from core/lwip/src/core/ipv4/inet_chksum.c)0
-rw-r--r--core/bios/lwip/src/core/ipv4/ip.c (renamed from core/lwip/src/core/ipv4/ip.c)0
-rw-r--r--core/bios/lwip/src/core/ipv4/ip_addr.c (renamed from core/lwip/src/core/ipv4/ip_addr.c)0
-rw-r--r--core/bios/lwip/src/core/ipv4/ip_frag.c (renamed from core/lwip/src/core/ipv4/ip_frag.c)0
-rw-r--r--core/bios/lwip/src/core/mem.c (renamed from core/lwip/src/core/mem.c)0
-rw-r--r--core/bios/lwip/src/core/memp.c (renamed from core/lwip/src/core/memp.c)0
-rw-r--r--core/bios/lwip/src/core/netif.c (renamed from core/lwip/src/core/netif.c)0
-rw-r--r--core/bios/lwip/src/core/pbuf.c (renamed from core/lwip/src/core/pbuf.c)0
-rw-r--r--core/bios/lwip/src/core/raw.c (renamed from core/lwip/src/core/raw.c)0
-rw-r--r--core/bios/lwip/src/core/snmp/asn1_dec.c (renamed from core/lwip/src/core/snmp/asn1_dec.c)0
-rw-r--r--core/bios/lwip/src/core/snmp/asn1_enc.c (renamed from core/lwip/src/core/snmp/asn1_enc.c)0
-rw-r--r--core/bios/lwip/src/core/snmp/mib2.c (renamed from core/lwip/src/core/snmp/mib2.c)0
-rw-r--r--core/bios/lwip/src/core/snmp/mib_structs.c (renamed from core/lwip/src/core/snmp/mib_structs.c)0
-rw-r--r--core/bios/lwip/src/core/snmp/msg_in.c (renamed from core/lwip/src/core/snmp/msg_in.c)0
-rw-r--r--core/bios/lwip/src/core/snmp/msg_out.c (renamed from core/lwip/src/core/snmp/msg_out.c)0
-rw-r--r--core/bios/lwip/src/core/stats.c (renamed from core/lwip/src/core/stats.c)0
-rw-r--r--core/bios/lwip/src/core/sys.c (renamed from core/lwip/src/core/sys.c)0
-rw-r--r--core/bios/lwip/src/core/tcp.c (renamed from core/lwip/src/core/tcp.c)0
-rw-r--r--core/bios/lwip/src/core/tcp_in.c (renamed from core/lwip/src/core/tcp_in.c)0
-rw-r--r--core/bios/lwip/src/core/tcp_out.c (renamed from core/lwip/src/core/tcp_out.c)0
-rw-r--r--core/bios/lwip/src/core/timers.c (renamed from core/lwip/src/core/timers.c)0
-rw-r--r--core/bios/lwip/src/core/udp.c (renamed from core/lwip/src/core/udp.c)0
-rw-r--r--core/bios/lwip/src/include/arch/cc.h (renamed from core/lwip/src/include/arch/cc.h)0
-rw-r--r--core/bios/lwip/src/include/arch/perf.h (renamed from core/lwip/src/include/arch/perf.h)0
-rw-r--r--core/bios/lwip/src/include/arch/sys_arch.h (renamed from core/lwip/src/include/arch/sys_arch.h)0
-rw-r--r--core/bios/lwip/src/include/ipv4/lwip/autoip.h (renamed from core/lwip/src/include/ipv4/lwip/autoip.h)0
-rw-r--r--core/bios/lwip/src/include/ipv4/lwip/icmp.h (renamed from core/lwip/src/include/ipv4/lwip/icmp.h)0
-rw-r--r--core/bios/lwip/src/include/ipv4/lwip/igmp.h (renamed from core/lwip/src/include/ipv4/lwip/igmp.h)0
-rw-r--r--core/bios/lwip/src/include/ipv4/lwip/inet.h (renamed from core/lwip/src/include/ipv4/lwip/inet.h)0
-rw-r--r--core/bios/lwip/src/include/ipv4/lwip/inet_chksum.h (renamed from core/lwip/src/include/ipv4/lwip/inet_chksum.h)0
-rw-r--r--core/bios/lwip/src/include/ipv4/lwip/ip.h (renamed from core/lwip/src/include/ipv4/lwip/ip.h)0
-rw-r--r--core/bios/lwip/src/include/ipv4/lwip/ip_addr.h (renamed from core/lwip/src/include/ipv4/lwip/ip_addr.h)0
-rw-r--r--core/bios/lwip/src/include/ipv4/lwip/ip_frag.h (renamed from core/lwip/src/include/ipv4/lwip/ip_frag.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/api.h (renamed from core/lwip/src/include/lwip/api.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/api_msg.h (renamed from core/lwip/src/include/lwip/api_msg.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/arch.h (renamed from core/lwip/src/include/lwip/arch.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/debug.h (renamed from core/lwip/src/include/lwip/debug.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/def.h (renamed from core/lwip/src/include/lwip/def.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/dhcp.h (renamed from core/lwip/src/include/lwip/dhcp.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/dns.h (renamed from core/lwip/src/include/lwip/dns.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/err.h (renamed from core/lwip/src/include/lwip/err.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/init.h (renamed from core/lwip/src/include/lwip/init.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/mem.h (renamed from core/lwip/src/include/lwip/mem.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/memp.h (renamed from core/lwip/src/include/lwip/memp.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/memp_std.h (renamed from core/lwip/src/include/lwip/memp_std.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/netbuf.h (renamed from core/lwip/src/include/lwip/netbuf.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/netdb.h (renamed from core/lwip/src/include/lwip/netdb.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/netif.h (renamed from core/lwip/src/include/lwip/netif.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/netifapi.h (renamed from core/lwip/src/include/lwip/netifapi.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/opt.h (renamed from core/lwip/src/include/lwip/opt.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/pbuf.h (renamed from core/lwip/src/include/lwip/pbuf.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/raw.h (renamed from core/lwip/src/include/lwip/raw.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/sio.h (renamed from core/lwip/src/include/lwip/sio.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/snmp.h (renamed from core/lwip/src/include/lwip/snmp.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/snmp_asn1.h (renamed from core/lwip/src/include/lwip/snmp_asn1.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/snmp_msg.h (renamed from core/lwip/src/include/lwip/snmp_msg.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/snmp_structs.h (renamed from core/lwip/src/include/lwip/snmp_structs.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/sockets.h (renamed from core/lwip/src/include/lwip/sockets.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/stats.h (renamed from core/lwip/src/include/lwip/stats.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/sys.h (renamed from core/lwip/src/include/lwip/sys.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/tcp.h (renamed from core/lwip/src/include/lwip/tcp.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/tcp_impl.h (renamed from core/lwip/src/include/lwip/tcp_impl.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/tcpip.h (renamed from core/lwip/src/include/lwip/tcpip.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/timers.h (renamed from core/lwip/src/include/lwip/timers.h)0
-rw-r--r--core/bios/lwip/src/include/lwip/udp.h (renamed from core/lwip/src/include/lwip/udp.h)0
-rw-r--r--core/bios/lwip/src/include/lwipopts.h (renamed from core/lwip/src/include/lwipopts.h)0
-rw-r--r--core/bios/lwip/src/include/netif/etharp.h (renamed from core/lwip/src/include/netif/etharp.h)0
-rw-r--r--core/bios/lwip/src/include/netif/ppp_oe.h (renamed from core/lwip/src/include/netif/ppp_oe.h)0
-rw-r--r--core/bios/lwip/src/include/netif/slipif.h (renamed from core/lwip/src/include/netif/slipif.h)0
-rw-r--r--core/bios/lwip/src/netif/FILES (renamed from core/lwip/src/netif/FILES)0
-rw-r--r--core/bios/lwip/src/netif/etharp.c (renamed from core/lwip/src/netif/etharp.c)0
-rw-r--r--core/bios/lwip/src/netif/ethernetif.c (renamed from core/lwip/src/netif/ethernetif.c)0
-rw-r--r--core/bios/lwip/src/netif/ppp/auth.c (renamed from core/lwip/src/netif/ppp/auth.c)0
-rw-r--r--core/bios/lwip/src/netif/ppp/auth.h (renamed from core/lwip/src/netif/ppp/auth.h)0
-rw-r--r--core/bios/lwip/src/netif/ppp/chap.c (renamed from core/lwip/src/netif/ppp/chap.c)0
-rw-r--r--core/bios/lwip/src/netif/ppp/chap.h (renamed from core/lwip/src/netif/ppp/chap.h)0
-rw-r--r--core/bios/lwip/src/netif/ppp/chpms.c (renamed from core/lwip/src/netif/ppp/chpms.c)0
-rw-r--r--core/bios/lwip/src/netif/ppp/chpms.h (renamed from core/lwip/src/netif/ppp/chpms.h)0
-rw-r--r--core/bios/lwip/src/netif/ppp/fsm.c (renamed from core/lwip/src/netif/ppp/fsm.c)0
-rw-r--r--core/bios/lwip/src/netif/ppp/fsm.h (renamed from core/lwip/src/netif/ppp/fsm.h)0
-rw-r--r--core/bios/lwip/src/netif/ppp/ipcp.c (renamed from core/lwip/src/netif/ppp/ipcp.c)0
-rw-r--r--core/bios/lwip/src/netif/ppp/ipcp.h (renamed from core/lwip/src/netif/ppp/ipcp.h)0
-rw-r--r--core/bios/lwip/src/netif/ppp/lcp.c (renamed from core/lwip/src/netif/ppp/lcp.c)0
-rw-r--r--core/bios/lwip/src/netif/ppp/lcp.h (renamed from core/lwip/src/netif/ppp/lcp.h)0
-rw-r--r--core/bios/lwip/src/netif/ppp/magic.c (renamed from core/lwip/src/netif/ppp/magic.c)0
-rw-r--r--core/bios/lwip/src/netif/ppp/magic.h (renamed from core/lwip/src/netif/ppp/magic.h)0
-rw-r--r--core/bios/lwip/src/netif/ppp/md5.c (renamed from core/lwip/src/netif/ppp/md5.c)0
-rw-r--r--core/bios/lwip/src/netif/ppp/md5.h (renamed from core/lwip/src/netif/ppp/md5.h)0
-rw-r--r--core/bios/lwip/src/netif/ppp/pap.c (renamed from core/lwip/src/netif/ppp/pap.c)0
-rw-r--r--core/bios/lwip/src/netif/ppp/pap.h (renamed from core/lwip/src/netif/ppp/pap.h)0
-rw-r--r--core/bios/lwip/src/netif/ppp/ppp.c (renamed from core/lwip/src/netif/ppp/ppp.c)0
-rw-r--r--core/bios/lwip/src/netif/ppp/ppp.h (renamed from core/lwip/src/netif/ppp/ppp.h)0
-rw-r--r--core/bios/lwip/src/netif/ppp/ppp_oe.c (renamed from core/lwip/src/netif/ppp/ppp_oe.c)0
-rw-r--r--core/bios/lwip/src/netif/ppp/pppdebug.h (renamed from core/lwip/src/netif/ppp/pppdebug.h)0
-rw-r--r--core/bios/lwip/src/netif/ppp/randm.c (renamed from core/lwip/src/netif/ppp/randm.c)0
-rw-r--r--core/bios/lwip/src/netif/ppp/randm.h (renamed from core/lwip/src/netif/ppp/randm.h)0
-rw-r--r--core/bios/lwip/src/netif/ppp/vj.c (renamed from core/lwip/src/netif/ppp/vj.c)0
-rw-r--r--core/bios/lwip/src/netif/ppp/vj.h (renamed from core/lwip/src/netif/ppp/vj.h)0
-rw-r--r--core/bios/lwip/src/netif/slipif.c (renamed from core/lwip/src/netif/slipif.c)0
-rw-r--r--core/bios/lwip/src/netif/undiif.c (renamed from core/lwip/src/netif/undiif.c)2
-rw-r--r--core/bios/lwip/tcp.c (renamed from core/fs/pxe/tcp.c)2
-rw-r--r--core/bios/lwip/thread/exit_thread.c (renamed from core/thread/exit_thread.c)0
-rw-r--r--core/bios/lwip/thread/idle_thread.c (renamed from core/thread/idle_thread.c)0
-rw-r--r--core/bios/lwip/thread/kill_thread.c (renamed from core/thread/kill_thread.c)0
-rw-r--r--core/bios/lwip/thread/mbox.c (renamed from core/thread/mbox.c)0
-rw-r--r--core/bios/lwip/thread/root_thread.c (renamed from core/thread/root_thread.c)0
-rw-r--r--core/bios/lwip/thread/schedule.c (renamed from core/thread/schedule.c)6
-rw-r--r--core/bios/lwip/thread/sem_asm.S (renamed from core/thread/sem_asm.S)0
-rw-r--r--core/bios/lwip/thread/semaphore.c (renamed from core/thread/semaphore.c)0
-rw-r--r--core/bios/lwip/thread/start_thread.c (renamed from core/thread/start_thread.c)0
-rw-r--r--core/bios/lwip/thread/thread_asm.S (renamed from core/thread/thread_asm.S)0
-rw-r--r--core/bios/lwip/thread/timeout.c (renamed from core/thread/timeout.c)0
-rw-r--r--core/bios/lzo/enter.ash (renamed from core/lzo/enter.ash)0
-rw-r--r--core/bios/lzo/leave.ash (renamed from core/lzo/leave.ash)0
-rw-r--r--core/bios/lzo/lzo1c_d.ash (renamed from core/lzo/lzo1c_d.ash)0
-rw-r--r--core/bios/lzo/lzo1f_d.ash (renamed from core/lzo/lzo1f_d.ash)0
-rw-r--r--core/bios/lzo/lzo1x_d.ash (renamed from core/lzo/lzo1x_d.ash)0
-rw-r--r--core/bios/lzo/lzo1x_f2.S (renamed from core/lzo/lzo1x_f2.S)0
-rw-r--r--core/bios/lzo/lzo_asm.h (renamed from core/lzo/lzo_asm.h)0
-rw-r--r--core/bios/macros.inc (renamed from core/macros.inc)0
-rw-r--r--core/bios/null_thread.c18
-rw-r--r--core/bios/plaincon.c (renamed from core/plaincon.c)0
-rw-r--r--core/bios/pm.inc (renamed from core/pm.inc)0
-rw-r--r--core/bios/pmcall.inc (renamed from core/pmcall.inc)0
-rw-r--r--core/bios/prefix.inc (renamed from core/prefix.inc)0
-rw-r--r--core/bios/pxe.inc (renamed from core/pxe.inc)0
-rw-r--r--core/bios/pxe/bios.c (renamed from core/fs/pxe/bios.c)30
-rw-r--r--core/bios/pxe/pxeboot.c (renamed from core/pxeboot.c)2
-rw-r--r--core/bios/pxeisr.inc (renamed from core/pxeisr.inc)0
-rw-r--r--core/bios/pxelinux-c.c (renamed from core/pxelinux-c.c)0
-rw-r--r--core/bios/pxelinux.asm2
-rw-r--r--core/bios/pxelinux.inc (renamed from core/pxelinux.asm)5
-rw-r--r--core/bios/rawcon.c (renamed from core/rawcon.c)0
-rw-r--r--core/bios/regdump.inc (renamed from core/regdump.inc)0
-rw-r--r--core/bios/rllpack.c (renamed from core/rllpack.c)0
-rw-r--r--core/bios/serirq.c (renamed from core/serirq.c)0
-rw-r--r--core/bios/stack.inc (renamed from core/stack.inc)0
-rw-r--r--core/bios/strcpy.inc (renamed from core/strcpy.inc)0
-rw-r--r--core/bios/syslinux.ld (renamed from core/i386/syslinux.ld)0
-rw-r--r--core/bios/timer.inc (renamed from core/timer.inc)0
-rw-r--r--core/bios/tracers.inc (renamed from core/tracers.inc)0
-rw-r--r--core/bios/writedec.inc (renamed from core/writedec.inc)0
-rw-r--r--core/bios/writehex.inc (renamed from core/writehex.inc)0
-rw-r--r--core/conio.c265
-rw-r--r--core/elflink/elfutils.h18
-rw-r--r--core/fs/ext2/ext2.c2
-rw-r--r--core/fs/ntfs/ntfs.c2
-rw-r--r--core/fs/ntfs/ntfs.h3
-rw-r--r--core/fs/pxe/dhcp_option.c5
-rw-r--r--core/fs/pxe/ftp.c2
-rw-r--r--core/fs/pxe/ftp_readdir.c2
-rw-r--r--core/fs/pxe/gpxeurl.c11
-rw-r--r--core/fs/pxe/http.c2
-rw-r--r--core/fs/pxe/http_readdir.c2
-rw-r--r--core/fs/pxe/idle.c10
-rw-r--r--core/fs/pxe/pxe.c29
-rw-r--r--core/fs/pxe/tftp.c2
-rw-r--r--core/include/core_pxe.h (renamed from core/fs/pxe/pxe.h)0
-rw-r--r--core/strcasecmp.c11
-rw-r--r--core/tests/hello.c (renamed from core/hello.c)0
232 files changed, 460 insertions, 465 deletions
diff --git a/core/Makefile b/core/Makefile
index 50ff35af..fc608e51 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -25,8 +25,10 @@ include $(MAKEDIR)/embedded.mk
-include $(objdir)/version.mk
OPTFLAGS =
-INCLUDES = -I$(SRC)/include -I$(com32)/include -I$(com32)/include/sys -I$(com32)/lib \
- -I$(SRC)/lwip/src/include -I$(SRC)/lwip/src/include/ipv4 -I$(SRC)/fs/pxe
+INCLUDES = -I$(SRC)/include -I$(com32)/include -I$(com32)/include/sys \
+ -I$(com32)/lib \
+ -I$(SRC)/bios/lwip/src/include \
+ -I$(SRC)/bios/lwip/src/include/ipv4 -I$(SRC)/fs/pxe
# This is very similar to cp437; technically it's for Norway and Denmark,
# but it's unlikely the characters that are different will be used in
@@ -34,13 +36,12 @@ INCLUDES = -I$(SRC)/include -I$(com32)/include -I$(com32)/include/sys -I$(com32)
CODEPAGE = cp865
# The targets to build in this directory...
-BTARGET = kwdhash.gen \
- ldlinux.bss ldlinux.sys ldlinux.bin \
+BTARGET = kwdhash.gen ldlinux.bss ldlinux.sys \
isolinux.bin isolinux-debug.bin pxelinux.0 lpxelinux.0
# All primary source files for the main syslinux files
-NASMSRC := $(sort $(wildcard $(SRC)/*.asm))
-NASMHDR := $(sort $(wildcard $(SRC)/*.inc))
+NASMSRC := $(sort $(shell find $(SRC) -name '*.asm' -print))
+NASMHDR := $(sort $(shell find $(SRC) -name '*.inc' -print))
CSRC := $(sort $(shell find $(SRC) -name '*.c' -print))
SSRC := $(sort $(shell find $(SRC) -name '*.S' -print))
CHDR := $(sort $(shell find $(SRC) -name '*.h' -print))
@@ -52,50 +53,35 @@ SOBJ := $(subst $(SRC)/,,$(patsubst %.S,%.o,$(SSRC)))
# To make this compatible with the following $(filter-out), make sure
# we prefix everything with $(SRC)
-CORE_PXE_CSRC = \
- $(addprefix $(SRC)/fs/pxe/, dhcp_option.c pxe.c tftp.c urlparse.c bios.c)
-
-LPXELINUX_CSRC = $(CORE_PXE_CSRC) \
- $(sort $(shell find $(SRC)/lwip -name '*.c' -print)) \
- $(addprefix $(SRC)/fs/pxe/, \
- core.c dnsresolv.c ftp.c ftp_readdir.c gpxeurl.c http.c \
- http_readdir.c idle.c isr.c tcp.c)
-
-PXELINUX_CSRC = $(CORE_PXE_CSRC) \
- $(sort $(shell find $(SRC)/legacynet -name '*.c' -print))
-
-LPXELINUX_OBJS = $(subst $(SRC)/,,$(LPXELINUX_CSRC:%.c=%.o))
-PXELINUX_OBJS = $(subst $(SRC)/,,$(PXELINUX_CSRC:%.c=%.o))
-
-UNITTEST_CSRC = $(shell find $(SRC) -path '*/tests/*.c' -print)
-UNITTEST_OBJS = $(subst $(SRC)/,,$(UNITTEST_CSRC:%.c=%.o))
-
-# Don't include console and network stack specific objects or unit tests
-FILTER_OBJS = %rawcon.o %plaincon.o %pxelinux-c.o %ldlinux-c.o \
- %isolinux-c.o %localboot.o %pxeboot.o \
- $(subst $(OBJ)/,,$(UNITTEST_OBJS)) \
- $(subst $(OBJ)/,,$(LPXELINUX_OBJS)) \
- $(subst $(OBJ)/,,$(PXELINUX_OBJS))
-
+CORE_PXE_DIRS = $(SRC)/bios/pxe
+LPXELINUX_DIRS = $(SRC)/bios/lwip
+PXELINUX_DIRS = $(SRC)/bios/legacynet
+
+CORE_PXE_CSRC = $(sort $(shell find $(CORE_PXE_DIRS) -name '*.c' -print))
+CORE_PXE_SSRC = $(sort $(shell find $(CORE_PXE_DIRS) -name '*.S' -print))
+LPXELINUX_CSRC = $(sort $(shell find $(LPXELINUX_DIRS) -name '*.c' -print))
+LPXELINUX_SSRC = $(sort $(shell find $(LPXELINUX_DIRS) -name '*.S' -print))
+PXELINUX_CSRC = $(sort $(shell find $(PXELINUX_DIRS) -name '*.c' -print))
+PXELINUX_SSRC = $(sort $(shell find $(PXELINUX_DIRS) -name '*.S' -print))
+
+CORE_PXE_OBJS = $(subst $(SRC)/,,$(CORE_PXE_CSRC:%.c=%.o) $(CORE_PXE_SSRC:%.S=%.o))
+LPXELINUX_OBJS = $(subst $(SRC)/,,$(LPXELINUX_CSRC:%.c=%.o) $(LPXELINUX_SSRC:%.S=%.o))
+PXELINUX_OBJS = $(subst $(SRC)/,,$(PXELINUX_CSRC:%.c=%.o) $(PXELINUX_SSRC:%.S=%.o))
+
+UNITTEST_DIRS = $(sort $(shell find $(SRC) -type d -name tests))
+
+# Don't include network stack specific objects or unit tests
+FILTER_DIRS = $(UNITTEST_DIRS) $(CORE_PXE_DIRS) \
+ $(PXELINUX_DIRS) $(LPXELINUX_DIRS)
ifeq ($(FWCLASS),EFI)
-# EFI is single-threaded, and doesn't use the LZO assembly decoder
-FILTER_OBJS += $(subst $(SRC)/,, \
- $(patsubst %.S,%.o, $(sort $(wildcard $(SRC)/lzo/*.S))) \
- $(patsubst %.c,%.o, $(sort $(wildcard $(SRC)/thread/*.c))) \
- $(patsubst %.S,%.o, $(sort $(wildcard $(SRC)/thread/*.S)))) \
- $(patsubst %.asm,%.o, $(sort $(wildcard $(SRC)/*.asm))) \
- $(patsubst %.c,%.o, $(sort $(wildcard $(SRC)/bios*.c)))
+FILTER_DIRS += $(SRC)/bios
endif
+FILTER_OBJS = $(patsubst $(SRC)/%,%/%,$(FILTER_DIRS))
COBJS = $(filter-out $(FILTER_OBJS),$(COBJ))
SOBJS = $(filter-out $(FILTER_OBJS),$(SOBJ))
-ifeq ($(FWCLASS),EFI)
-COBJS += $(subst $(SRC)/,,$(CORE_PXE_CSRC:%.c=%.o) fs/pxe/ftp.o fs/pxe/ftp_readdir.o \
- fs/pxe/http.o fs/pxe/http_readdir.o)
-endif
-
-LIB = libcom32.a
+LIB = bios/libsyslinux.a
LIBS = $(LIB) --whole-archive $(objdir)/com32/lib/libcom32core.a
LIBDEP = $(filter-out -% %start%,$(LIBS))
LIBOBJS = $(COBJS) $(SOBJS)
@@ -145,79 +131,49 @@ ifeq ($(FWCLASS),BIOS)
$(NASM) -f $(NASM_ELF) $(NASMOPT) -DDATE_STR="'$(DATE)'" \
-DHEXDATE="$(HEXDATE)" \
-D$(ARCH) \
- -I$(SRC)/ \
- -l $(@:.o=.lsr) -o $@ -MP -MD $(dir $@).$(notdir $@).d $<
-
-AUXLIBS = libisolinux.a libisolinux-debug.a libldlinux.a \
- libpxelinux.a liblpxelinux.a
+ -I$(SRC)/ -I$(SRC)/bios/ \
+ -l $(@:.o=.lsr) -o $@ -MP -MD $(@D)/.$(@F).d $<
-LDSCRIPT = $(SRC)/$(ARCH)/syslinux.ld
+AUXLIBS = bios/libpxelinux.a bios/liblpxelinux.a
+LDSCRIPT = $(SRC)/bios/syslinux.ld
NASM_ELF = elf
-%.elf: %.o $(LIBDEP) $(LDSCRIPT) $(AUXLIBS)
+%.elf: %.o %-c.o lib%.a $(LIBDEP) $(LDSCRIPT)
$(LD) $(LDFLAGS) -pie -Bsymbolic \
-T $(LDSCRIPT) \
--unresolved-symbols=report-all \
- -E --hash-style=gnu -M -o $@ $< \
- --start-group $(LIBS) $(subst $(*F).elf,lib$(*F).a,$@) --end-group \
- > $(@:.elf=.map)
+ -E --hash-style=gnu -M -o $@ $< $*-c.o \
+ --start-group $(*D)/lib$(*F).a $(LIBS) --end-group \
+ > $*.map
if [ `$(NM) -D -u $@ | wc -l` -ne 0 ]; then \
$(NM) -D -u $@ 1>&2; rm -f $@; false; fi
- $(OBJDUMP) -h $@ > $(@:.elf=.sec)
- $(PERL) $(SRC)/lstadjust.pl $(@:.elf=.lsr) $(@:.elf=.sec) $(@:.elf=.lst)
-
-libisolinux.a: rawcon.o localboot.o isolinux-c.o
- rm -f $@
- $(AR) cq $@ $^
- $(RANLIB) $@
-
-libisolinux-debug.a: libisolinux.a
- cp $^ $@
+ $(OBJDUMP) -h $@ > $*.sec
+ $(PERL) $(SRC)/lstadjust.pl $*.lsr $*.sec $*.lst
# Legacy network stack
-libpxelinux.a: rawcon.o pxeboot.o pxelinux-c.o $(PXELINUX_OBJS)
- rm -f $@
- $(AR) cq $@ $^
- $(RANLIB) $@
+bios/libpxelinux.a: $(CORE_PXE_OBJS) $(PXELINUX_OBJS)
# LwIP network stack
-liblpxelinux.a: rawcon.o pxeboot.o pxelinux-c.o $(LPXELINUX_OBJS)
- rm -f $@
- $(AR) cq $@ $^
- $(RANLIB) $@
+bios/liblpxelinux.a: $(CORE_PXE_OBJS) $(LPXELINUX_OBJS)
-libldlinux.a: plaincon.o localboot.o ldlinux-c.o
+# Otherwise, no special library needed, a null library will be created
+
+bios/lib%.a:
rm -f $@
$(AR) cq $@ $^
$(RANLIB) $@
-pxelinux.o: pxelinux.asm kwdhash.gen ../version.gen
- $(NASM) -f $(NASM_ELF) $(NASMOPT) -DDATE_STR="'$(DATE)'" \
- -DHEXDATE="$(HEXDATE)" \
- -D$(ARCH) \
- -I$(SRC)/ \
- -DIS_LPXELINUX=0 \
- -l $(@:.o=.lsr) -o $@ -MP -MD $(dir $@).$(notdir $@).d $<
-
-pxelinux.0: pxelinux.bin
+%.0: bios/%.bin
cp -f $< $@
-lpxelinux.o: pxelinux.asm kwdhash.gen ../version.gen
- $(NASM) -f $(NASM_ELF) $(NASMOPT) -DDATE_STR="'$(DATE)'" \
- -DHEXDATE="$(HEXDATE)" \
- -D$(ARCH) \
- -I$(SRC)/ \
- -DIS_LPXELINUX=1 \
- -l $(@:.o=.lsr) -o $@ -MP -MD $(dir $@).$(notdir $@).d $<
-
-lpxelinux.0: lpxelinux.bin
+%.bin: bios/%.bin
cp -f $< $@
-ldlinux.bss: ldlinux.bin
+ldlinux.bss: bios/ldlinux.bin
dd if=$< of=$@ bs=512 count=1
-ldlinux.sys: ldlinux.bin
+ldlinux.sys: bios/ldlinux.bin
dd if=$< of=$@ bs=512 skip=2
endif # BIOS
@@ -241,11 +197,13 @@ install-all: install install-lib
netinstall: installer
tidy dist:
- find . -type f \( -name '*.o' -o -name '*.a' -o -name '.*.d' \
- -o -name '*.lst' \) -print | xargs -rt rm -f
- rm -f codepage.cp *.elf stupid.* patch.offset .depend
- rm -f *.elf.tmp *.sym
- rm -f *.lsr *.map *.sec *.raw
+ for d in $(find . -type d -print) ; do \
+ ( cd "$$d" ; \
+ rm -f *.o *.a .*.d *.lst \
+ codepage.cp *.elf stupid.* patch.offset .depend \
+ *.elf.tmp *.sym \
+ *.lsr *.map *.sec *.raw \
+ ); done
rm -f $(OBSOLETE) $(LIB)
clean: tidy
@@ -254,4 +212,4 @@ spotless: clean
rm -f $(BTARGET) *.bin *_bin.c
# Include dependencies file
--include $(shell find . -name '.*.d' -print)
+-include $(shell find $(OBJ) -name '.*.d' -print)
diff --git a/core/adv.inc b/core/bios/adv.inc
index a18020c5..a18020c5 100644
--- a/core/adv.inc
+++ b/core/bios/adv.inc
diff --git a/core/bcopy32.inc b/core/bios/bcopy32.inc
index ab601452..ab601452 100644
--- a/core/bcopy32.inc
+++ b/core/bios/bcopy32.inc
diff --git a/core/bcopyxx.inc b/core/bios/bcopyxx.inc
index 3658f097..3658f097 100644
--- a/core/bcopyxx.inc
+++ b/core/bios/bcopyxx.inc
diff --git a/core/bios.c b/core/bios/bios.c
index 7fb37fec..7fb37fec 100644
--- a/core/bios.c
+++ b/core/bios/bios.c
diff --git a/core/bios.inc b/core/bios/bios.inc
index 2e150594..2e150594 100644
--- a/core/bios.inc
+++ b/core/bios/bios.inc
diff --git a/core/call16.c b/core/bios/call16.c
index 471aef96..471aef96 100644
--- a/core/call16.c
+++ b/core/bios/call16.c
diff --git a/core/callback.inc b/core/bios/callback.inc
index f1332e8e..f1332e8e 100644
--- a/core/callback.inc
+++ b/core/bios/callback.inc
diff --git a/core/com32.inc b/core/bios/com32.inc
index 5561c720..5561c720 100644
--- a/core/com32.inc
+++ b/core/bios/com32.inc
diff --git a/core/common.inc b/core/bios/common.inc
index c42fc56b..c42fc56b 100644
--- a/core/common.inc
+++ b/core/bios/common.inc
diff --git a/core/config.inc b/core/bios/config.inc
index 999d3d91..999d3d91 100644
--- a/core/config.inc
+++ b/core/bios/config.inc
diff --git a/core/bios/conio.c b/core/bios/conio.c
new file mode 100644
index 00000000..ea7a3e5b
--- /dev/null
+++ b/core/bios/conio.c
@@ -0,0 +1,295 @@
+/*
+ * -----------------------------------------------------------------------
+ *
+ * Copyright 1994-2008 H. Peter Anvin - All Rights Reserved
+ * Copyright 2009-2014 Intel Corporation; author: H. Peter Anvin
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, Inc., 53 Temple Place Ste 330,
+ * Boston MA 02111-1307, USA; either version 2 of the License, or
+ * (at your option) any later version; incorporated herein by reference.
+ *
+ * -----------------------------------------------------------------------
+ *
+ *
+ * conio.c
+ *
+ * Console I/O code, except:
+ * writechr, writestr_early - module-dependent
+ * writestr, crlf - writestr.inc
+ * writehex* - writehex.inc
+ */
+#include <sys/io.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <fs.h>
+#include <com32.h>
+#include <x86/cpu.h>
+#include <syslinux/firmware.h>
+
+#include "bios.h"
+#include "graphics.h"
+
+union screen _cursor;
+union screen _screensize;
+
+/*
+ * Serial console stuff.
+ */
+__export uint16_t SerialPort = 0; /* Serial port base (or 0 for no serial port) */
+__export uint8_t FlowInput = 0; /* Input bits for serial flow */
+__export uint16_t BaudDivisor = 115200/9600; /* Baud rate divisor */
+__export uint8_t FlowIgnore = 0; /* Ignore input unless these bits set */
+__export uint16_t DisplayCon = 0x01; /* Display console enabled */
+__export uint8_t FlowOutput = 0; /* Output to assert for serial flow */
+
+__export uint8_t DisplayMask = 0x07; /* Display modes mask */
+
+uint8_t ScrollAttribute = 0x07; /* Grey on white (normal text color) */
+
+/*
+ * loadkeys: Load a LILO-style keymap
+ *
+ * Returns 0 on success, or -1 on error.
+ */
+__export int loadkeys(const char *filename)
+{
+ FILE *f;
+
+ f = fopen(filename, "r");
+ if (!f)
+ return -1;
+
+ fread(KbdMap, 1, sizeof(KbdMap), f);
+
+ fclose(f);
+ return 0;
+}
+
+/*
+ * write_serial: If serial output is enabled, write character on
+ * serial port.
+ */
+__export void write_serial(char data)
+{
+ if (!SerialPort)
+ return;
+
+ if (!(DisplayMask & 0x04))
+ return;
+
+ while (1) {
+ char ch;
+
+ ch = inb(SerialPort + 5); /* LSR */
+
+ /* Wait for space in transmit register */
+ if (!(ch & 0x20))
+ continue;
+
+ /* Wait for input flow control */
+ ch = inb(SerialPort + 6);
+ ch &= FlowInput;
+ if (ch != FlowInput)
+ continue;
+
+ break;
+ }
+
+ outb(data, SerialPort); /* Send data */
+ io_delay();
+}
+
+void pm_write_serial(com32sys_t *regs)
+{
+ write_serial(regs->eax.b[0]);
+}
+
+void serialcfg(uint16_t *iobase, uint16_t *divisor, uint16_t *flowctl)
+{
+ uint8_t al, ah;
+
+ *iobase = SerialPort;
+ *divisor = BaudDivisor;
+
+ al = FlowOutput;
+ ah = FlowInput;
+
+ al |= ah;
+ ah = FlowIgnore;
+ ah >>= 4;
+
+ if (!DisplayCon)
+ ah |= 0x80;
+
+ *flowctl = al | (ah << 8);
+}
+
+void pm_serialcfg(com32sys_t *regs)
+{
+ serialcfg(&regs->eax.w[0], &regs->ecx.w[0], &regs->ebx.w[0]);
+}
+
+/*
+ * write_serial_str: write_serial for strings
+ */
+__export void write_serial_str(char *data)
+{
+ char ch;
+
+ while ((ch = *data++))
+ write_serial(ch);
+}
+
+/*
+ * pollchar: check if we have an input character pending
+ *
+ * Returns 1 if character pending.
+ */
+int bios_pollchar(void)
+{
+ com32sys_t ireg, oreg;
+ uint8_t data = 0;
+
+ memset(&ireg, 0, sizeof(ireg));
+
+ ireg.eax.b[1] = 0x11; /* Poll keyboard */
+ __intcall(0x16, &ireg, &oreg);
+
+ if (!(oreg.eflags.l & EFLAGS_ZF))
+ return 1;
+
+ if (SerialPort) {
+ cli();
+
+ /* Already-queued input? */
+ if (SerialTail == SerialHead) {
+ /* LSR */
+ data = inb(SerialPort + 5) & 1;
+ if (data) {
+ /* MSR */
+ data = inb(SerialPort + 6);
+
+ /* Required status bits */
+ data &= FlowIgnore;
+
+ if (data == FlowIgnore)
+ data = 1;
+ else
+ data = 0;
+ }
+ } else
+ data = 1;
+ sti();
+ }
+
+ return data;
+}
+
+void pm_pollchar(com32sys_t *regs)
+{
+ if (pollchar())
+ regs->eflags.l &= ~EFLAGS_ZF;
+ else
+ regs->eflags.l |= EFLAGS_ZF;
+}
+
+char bios_getchar(char *hi)
+{
+ com32sys_t ireg, oreg;
+ unsigned char data;
+
+ memset(&ireg, 0, sizeof(ireg));
+ memset(&oreg, 0, sizeof(oreg));
+ while (1) {
+ __idle();
+
+ ireg.eax.b[1] = 0x11; /* Poll keyboard */
+ __intcall(0x16, &ireg, &oreg);
+
+ if (oreg.eflags.l & EFLAGS_ZF) {
+ if (!SerialPort)
+ continue;
+
+ cli();
+ if (SerialTail != SerialHead) {
+ /* serial queued */
+ sti(); /* We already know we'll consume data */
+ data = *SerialTail++;
+
+ if (SerialTail > SerialHead + serial_buf_size)
+ SerialTail = SerialHead;
+ } else {
+ /* LSR */
+ data = inb(SerialPort + 5) & 1;
+ if (!data) {
+ sti();
+ continue;
+ }
+ data = inb(SerialPort + 6);
+ data &= FlowIgnore;
+ if (data != FlowIgnore) {
+ sti();
+ continue;
+ }
+
+ data = inb(SerialPort);
+ sti();
+ break;
+ }
+ } else {
+ /* Keyboard input? */
+ ireg.eax.b[1] = 0x10; /* Get keyboard input */
+ __intcall(0x16, &ireg, &oreg);
+
+ data = oreg.eax.b[0];
+ *hi = oreg.eax.b[1];
+
+ if (data == 0xE0)
+ data = 0;
+
+ if (data) {
+ /* Convert character sets */
+ data = KbdMap[data];
+ }
+ }
+
+ break;
+ }
+
+ reset_idle(); /* Character received */
+ return data;
+}
+
+uint8_t bios_shiftflags(void)
+{
+ com32sys_t reg;
+ uint8_t ah, al;
+
+ memset(&reg, 0, sizeof reg);
+ reg.eax.b[1] = 0x12;
+ __intcall(0x16, &reg, &reg);
+ ah = reg.eax.b[1];
+ al = reg.eax.b[0];
+
+ /*
+ * According to the Interrupt List, "many machines" don't correctly
+ * fold the Alt state, presumably because it might be AltGr.
+ * Explicitly fold the Alt and Ctrl states; it fits our needs
+ * better.
+ */
+
+ if (ah & 0x0a)
+ al |= 0x08;
+ if (ah & 0x05)
+ al |= 0x04;
+
+ return al;
+}
+
+void pm_getchar(com32sys_t *regs)
+{
+ regs->eax.b[0] = getchar((char *)&regs->eax.b[1]);
+}
diff --git a/core/diskboot.inc b/core/bios/diskboot.inc
index 19d6bcf7..19d6bcf7 100644
--- a/core/diskboot.inc
+++ b/core/bios/diskboot.inc
diff --git a/core/diskfs.inc b/core/bios/diskfs.inc
index 93016649..93016649 100644
--- a/core/diskfs.inc
+++ b/core/bios/diskfs.inc
diff --git a/core/fs/diskio_bios.c b/core/bios/diskio_bios.c
index 7feb7fc4..7feb7fc4 100644
--- a/core/fs/diskio_bios.c
+++ b/core/bios/diskio_bios.c
diff --git a/core/diskstart.inc b/core/bios/diskstart.inc
index 875b4093..875b4093 100644
--- a/core/diskstart.inc
+++ b/core/bios/diskstart.inc
diff --git a/core/extern.inc b/core/bios/extern.inc
index f5460232..e3539611 100644
--- a/core/extern.inc
+++ b/core/bios/extern.inc
@@ -9,16 +9,9 @@
; rllpack.c
extern rllpack, rllunpack
- ; hello.c
- extern hello
-
; elflink/load_env32.c
extern load_env32, pm_env32_run
- extern mp1, mp2, mp3, mp4, mp5
-
- extern hexdump
-
extern mem_init
; fs.c
diff --git a/core/font.c b/core/bios/font.c
index 508f7059..508f7059 100644
--- a/core/font.c
+++ b/core/bios/font.c
diff --git a/core/graphics.c b/core/bios/graphics.c
index 471847f5..471847f5 100644
--- a/core/graphics.c
+++ b/core/bios/graphics.c
diff --git a/core/head.inc b/core/bios/head.inc
index b97db352..b97db352 100644
--- a/core/head.inc
+++ b/core/bios/head.inc
diff --git a/core/init.inc b/core/bios/init.inc
index 8ecbdbd8..8ecbdbd8 100644
--- a/core/init.inc
+++ b/core/bios/init.inc
diff --git a/core/io.inc b/core/bios/io.inc
index 71613463..71613463 100644
--- a/core/io.inc
+++ b/core/bios/io.inc
diff --git a/core/isolinux-c.c b/core/bios/isolinux-c.c
index b0173e08..b0173e08 100644
--- a/core/isolinux-c.c
+++ b/core/bios/isolinux-c.c
diff --git a/core/bios/isolinux-debug-c.c b/core/bios/isolinux-debug-c.c
new file mode 100644
index 00000000..14f05005
--- /dev/null
+++ b/core/bios/isolinux-debug-c.c
@@ -0,0 +1 @@
+#include "isolinux-c.c"
diff --git a/core/isolinux-debug.asm b/core/bios/isolinux-debug.asm
index 9c74b7cd..9c74b7cd 100644
--- a/core/isolinux-debug.asm
+++ b/core/bios/isolinux-debug.asm
diff --git a/core/isolinux.asm b/core/bios/isolinux.asm
index 50d9fe1c..50d9fe1c 100644
--- a/core/isolinux.asm
+++ b/core/bios/isolinux.asm
diff --git a/core/kaboom.c b/core/bios/kaboom.c
index 4c150e76..4c150e76 100644
--- a/core/kaboom.c
+++ b/core/bios/kaboom.c
diff --git a/core/kernel.inc b/core/bios/kernel.inc
index 5e1c7a39..5e1c7a39 100644
--- a/core/kernel.inc
+++ b/core/bios/kernel.inc
diff --git a/core/keywords.inc b/core/bios/keywords.inc
index d91ca4ff..d91ca4ff 100644
--- a/core/keywords.inc
+++ b/core/bios/keywords.inc
diff --git a/core/layout.inc b/core/bios/layout.inc
index bb7cb333..bb7cb333 100644
--- a/core/layout.inc
+++ b/core/bios/layout.inc
diff --git a/core/ldlinux-c.c b/core/bios/ldlinux-c.c
index 1d01d9a7..1d01d9a7 100644
--- a/core/ldlinux-c.c
+++ b/core/bios/ldlinux-c.c
diff --git a/core/ldlinux.asm b/core/bios/ldlinux.asm
index 050f503b..050f503b 100644
--- a/core/ldlinux.asm
+++ b/core/bios/ldlinux.asm
diff --git a/core/legacynet/core.c b/core/bios/legacynet/core.c
index 24a670e0..13d47029 100644
--- a/core/legacynet/core.c
+++ b/core/bios/legacynet/core.c
@@ -2,7 +2,7 @@
#include <com32.h>
#include <core.h>
#include <net.h>
-#include <pxe.h>
+#include "core_pxe.h"
#include <minmax.h>
/* Common receive buffer */
diff --git a/core/legacynet/dnsresolv.c b/core/bios/legacynet/dnsresolv.c
index 9be0a436..809c7120 100644
--- a/core/legacynet/dnsresolv.c
+++ b/core/bios/legacynet/dnsresolv.c
@@ -1,7 +1,7 @@
#include <stdio.h>
#include <string.h>
#include <core.h>
-#include "pxe.h"
+#include "core_pxe.h"
/* DNS CLASS values we care about */
#define CLASS_IN 1
diff --git a/core/legacynet/idle.c b/core/bios/legacynet/idle.c
index 5a94166d..02efc85d 100644
--- a/core/legacynet/idle.c
+++ b/core/bios/legacynet/idle.c
@@ -17,7 +17,7 @@
#include <fs.h>
#include <minmax.h>
#include <x86/cpu.h>
-#include "pxe.h"
+#include "core_pxe.h"
static int pxe_idle_poll(void)
{
diff --git a/core/legacynet/portnum.c b/core/bios/legacynet/portnum.c
index e10af29e..5c066cc1 100644
--- a/core/legacynet/portnum.c
+++ b/core/bios/legacynet/portnum.c
@@ -13,7 +13,7 @@
#include <stdint.h>
#include <stdbool.h>
#include <netinet/in.h>
-#include "pxe.h"
+#include "core_pxe.h"
/* Port number bitmap - port numbers 49152 (0xc000) to 57343 (0xefff) */
#define PORT_NUMBER_BASE 49152
diff --git a/core/localboot.c b/core/bios/localboot.c
index c5fb9eca..d0c289d0 100644
--- a/core/localboot.c
+++ b/core/bios/localboot.c
@@ -22,6 +22,7 @@
* localboot.c
*
* Boot from a local disk, or invoke INT 18h.
+ * This is default, but overridden for pxelinux, hence weak.
*/
#define LOCALBOOT_MSG "Booting from local disk..."
@@ -34,7 +35,7 @@ extern void local_boot16(void);
* Boot a specified local disk. AX specifies the BIOS disk number; or
* -1 in case we should execute INT 18h ("next device.")
*/
-__export void local_boot(int16_t ax)
+__export void __attribute__((weak)) local_boot(int16_t ax)
{
com32sys_t ireg, oreg;
int i;
diff --git a/core/localboot.inc b/core/bios/localboot.inc
index b7840427..b7840427 100644
--- a/core/localboot.inc
+++ b/core/bios/localboot.inc
diff --git a/core/bios/lpxelinux-c.c b/core/bios/lpxelinux-c.c
new file mode 100644
index 00000000..93b4bc9e
--- /dev/null
+++ b/core/bios/lpxelinux-c.c
@@ -0,0 +1 @@
+#include "pxelinux-c.c"
diff --git a/core/bios/lpxelinux.asm b/core/bios/lpxelinux.asm
new file mode 100644
index 00000000..f41961d4
--- /dev/null
+++ b/core/bios/lpxelinux.asm
@@ -0,0 +1,2 @@
+%define IS_LPXELINUX 1
+%include "pxelinux.inc"
diff --git a/core/lwip/CHANGELOG b/core/bios/lwip/CHANGELOG
index 6e27a66b..6e27a66b 100644
--- a/core/lwip/CHANGELOG
+++ b/core/bios/lwip/CHANGELOG
diff --git a/core/lwip/COPYING b/core/bios/lwip/COPYING
index e23898b5..e23898b5 100644
--- a/core/lwip/COPYING
+++ b/core/bios/lwip/COPYING
diff --git a/core/lwip/FILES b/core/bios/lwip/FILES
index 66253196..66253196 100644
--- a/core/lwip/FILES
+++ b/core/bios/lwip/FILES
diff --git a/core/lwip/README b/core/bios/lwip/README
index a62cc4f3..a62cc4f3 100644
--- a/core/lwip/README
+++ b/core/bios/lwip/README
diff --git a/core/lwip/UPGRADING b/core/bios/lwip/UPGRADING
index 6501107a..6501107a 100644
--- a/core/lwip/UPGRADING
+++ b/core/bios/lwip/UPGRADING
diff --git a/core/fs/pxe/core.c b/core/bios/lwip/core.c
index a43ac465..b7a16825 100644
--- a/core/fs/pxe/core.c
+++ b/core/bios/lwip/core.c
@@ -4,7 +4,7 @@
#include <lwip/dns.h>
#include <core.h>
#include <net.h>
-#include "pxe.h"
+#include "core_pxe.h"
#include <dprintf.h>
diff --git a/core/fs/pxe/dnsresolv.c b/core/bios/lwip/dnsresolv.c
index 26c5b34b..0a61392e 100644
--- a/core/fs/pxe/dnsresolv.c
+++ b/core/bios/lwip/dnsresolv.c
@@ -1,7 +1,7 @@
#include <stdio.h>
#include <string.h>
#include <core.h>
-#include "pxe.h"
+#include "core_pxe.h"
#include "lwip/api.h"
#include "lwip/dns.h"
diff --git a/core/lwip/doc/FILES b/core/bios/lwip/doc/FILES
index 05d356f4..05d356f4 100644
--- a/core/lwip/doc/FILES
+++ b/core/bios/lwip/doc/FILES
diff --git a/core/lwip/doc/contrib.txt b/core/bios/lwip/doc/contrib.txt
index 39596fca..39596fca 100644
--- a/core/lwip/doc/contrib.txt
+++ b/core/bios/lwip/doc/contrib.txt
diff --git a/core/lwip/doc/rawapi.txt b/core/bios/lwip/doc/rawapi.txt
index c727da99..c727da99 100644
--- a/core/lwip/doc/rawapi.txt
+++ b/core/bios/lwip/doc/rawapi.txt
diff --git a/core/lwip/doc/savannah.txt b/core/bios/lwip/doc/savannah.txt
index 409905b1..409905b1 100644
--- a/core/lwip/doc/savannah.txt
+++ b/core/bios/lwip/doc/savannah.txt
diff --git a/core/lwip/doc/snmp_agent.txt b/core/bios/lwip/doc/snmp_agent.txt
index 2653230f..2653230f 100644
--- a/core/lwip/doc/snmp_agent.txt
+++ b/core/bios/lwip/doc/snmp_agent.txt
diff --git a/core/lwip/doc/sys_arch.txt b/core/bios/lwip/doc/sys_arch.txt
index 4eb93078..4eb93078 100644
--- a/core/lwip/doc/sys_arch.txt
+++ b/core/bios/lwip/doc/sys_arch.txt
diff --git a/core/fs/pxe/isr.c b/core/bios/lwip/isr.c
index 1fc9c3f2..ef7d95ec 100644
--- a/core/fs/pxe/isr.c
+++ b/core/bios/lwip/isr.c
@@ -7,7 +7,7 @@
#include "core.h"
#include "thread.h"
-#include "pxe.h"
+#include "core_pxe.h"
#include <string.h>
#include <x86/cpu.h>
#include <sys/io.h>
@@ -266,11 +266,18 @@ void pxe_start_isr(void)
dprintf("pxe_start_isr: trying poll by model\n");
int hwad = ((int)MAC[0] << 16) + ((int)MAC[1] << 8) + MAC[2];
dprintf("pxe_start_isr: got %06x %04x\n", hwad, pxe_undi_iface.ServiceFlags);
- if ((hwad == 0x000023ae) && (pxe_undi_iface.ServiceFlags == 0xdc1b) ||
- (hwad == 0x005c260a) && (pxe_undi_iface.ServiceFlags == 0xdc1b) ||
- (hwad == 0x00180373) && (pxe_undi_iface.ServiceFlags == 0xdc1b)) {
+ if (pxe_undi_iface.ServiceFlags == 0xdc1b) {
+ switch (hwad) {
+ case 0x000023ae:
+ case 0x005c260a:
+ case 0x00180373:
asm volatile("orb $1,%0" : "+m" (pxe_need_poll));
dprintf("pxe_start_isr: forcing pxe_need_poll by model\n");
+ break;
+ default:
+ /* Assume we can (or maybe have to) actually use interrupts */
+ break;
+ }
}
}
}
diff --git a/core/lwip/src/FILES b/core/bios/lwip/src/FILES
index 952aeabb..952aeabb 100644
--- a/core/lwip/src/FILES
+++ b/core/bios/lwip/src/FILES
diff --git a/core/lwip/src/api/api_lib.c b/core/bios/lwip/src/api/api_lib.c
index b1a9e525..b1a9e525 100644
--- a/core/lwip/src/api/api_lib.c
+++ b/core/bios/lwip/src/api/api_lib.c
diff --git a/core/lwip/src/api/api_msg.c b/core/bios/lwip/src/api/api_msg.c
index 448f96dd..448f96dd 100644
--- a/core/lwip/src/api/api_msg.c
+++ b/core/bios/lwip/src/api/api_msg.c
diff --git a/core/lwip/src/api/err.c b/core/bios/lwip/src/api/err.c
index 92fa8b7d..92fa8b7d 100644
--- a/core/lwip/src/api/err.c
+++ b/core/bios/lwip/src/api/err.c
diff --git a/core/lwip/src/api/netbuf.c b/core/bios/lwip/src/api/netbuf.c
index 9390c9ee..9390c9ee 100644
--- a/core/lwip/src/api/netbuf.c
+++ b/core/bios/lwip/src/api/netbuf.c
diff --git a/core/lwip/src/api/netdb.c b/core/bios/lwip/src/api/netdb.c
index a7e4e06b..a7e4e06b 100644
--- a/core/lwip/src/api/netdb.c
+++ b/core/bios/lwip/src/api/netdb.c
diff --git a/core/lwip/src/api/netifapi.c b/core/bios/lwip/src/api/netifapi.c
index 43e47203..43e47203 100644
--- a/core/lwip/src/api/netifapi.c
+++ b/core/bios/lwip/src/api/netifapi.c
diff --git a/core/lwip/src/api/sockets.c b/core/bios/lwip/src/api/sockets.c
index e36012ce..e36012ce 100644
--- a/core/lwip/src/api/sockets.c
+++ b/core/bios/lwip/src/api/sockets.c
diff --git a/core/lwip/src/api/tcpip.c b/core/bios/lwip/src/api/tcpip.c
index 857e7d9b..857e7d9b 100644
--- a/core/lwip/src/api/tcpip.c
+++ b/core/bios/lwip/src/api/tcpip.c
diff --git a/core/lwip/src/arch/sys_arch.c b/core/bios/lwip/src/arch/sys_arch.c
index 4081d01e..4081d01e 100644
--- a/core/lwip/src/arch/sys_arch.c
+++ b/core/bios/lwip/src/arch/sys_arch.c
diff --git a/core/lwip/src/core/def.c b/core/bios/lwip/src/core/def.c
index 352b5524..352b5524 100644
--- a/core/lwip/src/core/def.c
+++ b/core/bios/lwip/src/core/def.c
diff --git a/core/lwip/src/core/dhcp.c b/core/bios/lwip/src/core/dhcp.c
index 81b4be27..81b4be27 100644
--- a/core/lwip/src/core/dhcp.c
+++ b/core/bios/lwip/src/core/dhcp.c
diff --git a/core/lwip/src/core/dns.c b/core/bios/lwip/src/core/dns.c
index ca807c14..ca807c14 100644
--- a/core/lwip/src/core/dns.c
+++ b/core/bios/lwip/src/core/dns.c
diff --git a/core/lwip/src/core/init.c b/core/bios/lwip/src/core/init.c
index 36038350..36038350 100644
--- a/core/lwip/src/core/init.c
+++ b/core/bios/lwip/src/core/init.c
diff --git a/core/lwip/src/core/ipv4/autoip.c b/core/bios/lwip/src/core/ipv4/autoip.c
index 92bb4591..92bb4591 100644
--- a/core/lwip/src/core/ipv4/autoip.c
+++ b/core/bios/lwip/src/core/ipv4/autoip.c
diff --git a/core/lwip/src/core/ipv4/icmp.c b/core/bios/lwip/src/core/ipv4/icmp.c
index 32902a52..32902a52 100644
--- a/core/lwip/src/core/ipv4/icmp.c
+++ b/core/bios/lwip/src/core/ipv4/icmp.c
diff --git a/core/lwip/src/core/ipv4/igmp.c b/core/bios/lwip/src/core/ipv4/igmp.c
index 4e4405e1..4e4405e1 100644
--- a/core/lwip/src/core/ipv4/igmp.c
+++ b/core/bios/lwip/src/core/ipv4/igmp.c
diff --git a/core/lwip/src/core/ipv4/inet.c b/core/bios/lwip/src/core/ipv4/inet.c
index e283a576..e283a576 100644
--- a/core/lwip/src/core/ipv4/inet.c
+++ b/core/bios/lwip/src/core/ipv4/inet.c
diff --git a/core/lwip/src/core/ipv4/inet_chksum.c b/core/bios/lwip/src/core/ipv4/inet_chksum.c
index 960252f6..960252f6 100644
--- a/core/lwip/src/core/ipv4/inet_chksum.c
+++ b/core/bios/lwip/src/core/ipv4/inet_chksum.c
diff --git a/core/lwip/src/core/ipv4/ip.c b/core/bios/lwip/src/core/ipv4/ip.c
index 6f248716..6f248716 100644
--- a/core/lwip/src/core/ipv4/ip.c
+++ b/core/bios/lwip/src/core/ipv4/ip.c
diff --git a/core/lwip/src/core/ipv4/ip_addr.c b/core/bios/lwip/src/core/ipv4/ip_addr.c
index 8f633ff2..8f633ff2 100644
--- a/core/lwip/src/core/ipv4/ip_addr.c
+++ b/core/bios/lwip/src/core/ipv4/ip_addr.c
diff --git a/core/lwip/src/core/ipv4/ip_frag.c b/core/bios/lwip/src/core/ipv4/ip_frag.c
index 8d184345..8d184345 100644
--- a/core/lwip/src/core/ipv4/ip_frag.c
+++ b/core/bios/lwip/src/core/ipv4/ip_frag.c
diff --git a/core/lwip/src/core/mem.c b/core/bios/lwip/src/core/mem.c
index 2934e5a9..2934e5a9 100644
--- a/core/lwip/src/core/mem.c
+++ b/core/bios/lwip/src/core/mem.c
diff --git a/core/lwip/src/core/memp.c b/core/bios/lwip/src/core/memp.c
index 4da879a5..4da879a5 100644
--- a/core/lwip/src/core/memp.c
+++ b/core/bios/lwip/src/core/memp.c
diff --git a/core/lwip/src/core/netif.c b/core/bios/lwip/src/core/netif.c
index f190b1f2..f190b1f2 100644
--- a/core/lwip/src/core/netif.c
+++ b/core/bios/lwip/src/core/netif.c
diff --git a/core/lwip/src/core/pbuf.c b/core/bios/lwip/src/core/pbuf.c
index dd9ff64e..dd9ff64e 100644
--- a/core/lwip/src/core/pbuf.c
+++ b/core/bios/lwip/src/core/pbuf.c
diff --git a/core/lwip/src/core/raw.c b/core/bios/lwip/src/core/raw.c
index 9fcb1003..9fcb1003 100644
--- a/core/lwip/src/core/raw.c
+++ b/core/bios/lwip/src/core/raw.c
diff --git a/core/lwip/src/core/snmp/asn1_dec.c b/core/bios/lwip/src/core/snmp/asn1_dec.c
index 1d565820..1d565820 100644
--- a/core/lwip/src/core/snmp/asn1_dec.c
+++ b/core/bios/lwip/src/core/snmp/asn1_dec.c
diff --git a/core/lwip/src/core/snmp/asn1_enc.c b/core/bios/lwip/src/core/snmp/asn1_enc.c
index 64dfc5f6..64dfc5f6 100644
--- a/core/lwip/src/core/snmp/asn1_enc.c
+++ b/core/bios/lwip/src/core/snmp/asn1_enc.c
diff --git a/core/lwip/src/core/snmp/mib2.c b/core/bios/lwip/src/core/snmp/mib2.c
index 29decd30..29decd30 100644
--- a/core/lwip/src/core/snmp/mib2.c
+++ b/core/bios/lwip/src/core/snmp/mib2.c
diff --git a/core/lwip/src/core/snmp/mib_structs.c b/core/bios/lwip/src/core/snmp/mib_structs.c
index 2f185cb4..2f185cb4 100644
--- a/core/lwip/src/core/snmp/mib_structs.c
+++ b/core/bios/lwip/src/core/snmp/mib_structs.c
diff --git a/core/lwip/src/core/snmp/msg_in.c b/core/bios/lwip/src/core/snmp/msg_in.c
index 2dfb55b2..2dfb55b2 100644
--- a/core/lwip/src/core/snmp/msg_in.c
+++ b/core/bios/lwip/src/core/snmp/msg_in.c
diff --git a/core/lwip/src/core/snmp/msg_out.c b/core/bios/lwip/src/core/snmp/msg_out.c
index 4778bee6..4778bee6 100644
--- a/core/lwip/src/core/snmp/msg_out.c
+++ b/core/bios/lwip/src/core/snmp/msg_out.c
diff --git a/core/lwip/src/core/stats.c b/core/bios/lwip/src/core/stats.c
index 69f97d41..69f97d41 100644
--- a/core/lwip/src/core/stats.c
+++ b/core/bios/lwip/src/core/stats.c
diff --git a/core/lwip/src/core/sys.c b/core/bios/lwip/src/core/sys.c
index d3a77deb..d3a77deb 100644
--- a/core/lwip/src/core/sys.c
+++ b/core/bios/lwip/src/core/sys.c
diff --git a/core/lwip/src/core/tcp.c b/core/bios/lwip/src/core/tcp.c
index c629bc4e..c629bc4e 100644
--- a/core/lwip/src/core/tcp.c
+++ b/core/bios/lwip/src/core/tcp.c
diff --git a/core/lwip/src/core/tcp_in.c b/core/bios/lwip/src/core/tcp_in.c
index 90952648..90952648 100644
--- a/core/lwip/src/core/tcp_in.c
+++ b/core/bios/lwip/src/core/tcp_in.c
diff --git a/core/lwip/src/core/tcp_out.c b/core/bios/lwip/src/core/tcp_out.c
index 86e09195..86e09195 100644
--- a/core/lwip/src/core/tcp_out.c
+++ b/core/bios/lwip/src/core/tcp_out.c
diff --git a/core/lwip/src/core/timers.c b/core/bios/lwip/src/core/timers.c
index 4e94f0d1..4e94f0d1 100644
--- a/core/lwip/src/core/timers.c
+++ b/core/bios/lwip/src/core/timers.c
diff --git a/core/lwip/src/core/udp.c b/core/bios/lwip/src/core/udp.c
index 4596ba2b..4596ba2b 100644
--- a/core/lwip/src/core/udp.c
+++ b/core/bios/lwip/src/core/udp.c
diff --git a/core/lwip/src/include/arch/cc.h b/core/bios/lwip/src/include/arch/cc.h
index 5ab13dec..5ab13dec 100644
--- a/core/lwip/src/include/arch/cc.h
+++ b/core/bios/lwip/src/include/arch/cc.h
diff --git a/core/lwip/src/include/arch/perf.h b/core/bios/lwip/src/include/arch/perf.h
index 4ceb850c..4ceb850c 100644
--- a/core/lwip/src/include/arch/perf.h
+++ b/core/bios/lwip/src/include/arch/perf.h
diff --git a/core/lwip/src/include/arch/sys_arch.h b/core/bios/lwip/src/include/arch/sys_arch.h
index 732a19c4..732a19c4 100644
--- a/core/lwip/src/include/arch/sys_arch.h
+++ b/core/bios/lwip/src/include/arch/sys_arch.h
diff --git a/core/lwip/src/include/ipv4/lwip/autoip.h b/core/bios/lwip/src/include/ipv4/lwip/autoip.h
index 23c264a1..23c264a1 100644
--- a/core/lwip/src/include/ipv4/lwip/autoip.h
+++ b/core/bios/lwip/src/include/ipv4/lwip/autoip.h
diff --git a/core/lwip/src/include/ipv4/lwip/icmp.h b/core/bios/lwip/src/include/ipv4/lwip/icmp.h
index d47a7d8a..d47a7d8a 100644
--- a/core/lwip/src/include/ipv4/lwip/icmp.h
+++ b/core/bios/lwip/src/include/ipv4/lwip/icmp.h
diff --git a/core/lwip/src/include/ipv4/lwip/igmp.h b/core/bios/lwip/src/include/ipv4/lwip/igmp.h
index 8aabac24..8aabac24 100644
--- a/core/lwip/src/include/ipv4/lwip/igmp.h
+++ b/core/bios/lwip/src/include/ipv4/lwip/igmp.h
diff --git a/core/lwip/src/include/ipv4/lwip/inet.h b/core/bios/lwip/src/include/ipv4/lwip/inet.h
index 0513c740..0513c740 100644
--- a/core/lwip/src/include/ipv4/lwip/inet.h
+++ b/core/bios/lwip/src/include/ipv4/lwip/inet.h
diff --git a/core/lwip/src/include/ipv4/lwip/inet_chksum.h b/core/bios/lwip/src/include/ipv4/lwip/inet_chksum.h
index 79a2d90f..79a2d90f 100644
--- a/core/lwip/src/include/ipv4/lwip/inet_chksum.h
+++ b/core/bios/lwip/src/include/ipv4/lwip/inet_chksum.h
diff --git a/core/lwip/src/include/ipv4/lwip/ip.h b/core/bios/lwip/src/include/ipv4/lwip/ip.h
index 74f501d1..74f501d1 100644
--- a/core/lwip/src/include/ipv4/lwip/ip.h
+++ b/core/bios/lwip/src/include/ipv4/lwip/ip.h
diff --git a/core/lwip/src/include/ipv4/lwip/ip_addr.h b/core/bios/lwip/src/include/ipv4/lwip/ip_addr.h
index 77f84e02..77f84e02 100644
--- a/core/lwip/src/include/ipv4/lwip/ip_addr.h
+++ b/core/bios/lwip/src/include/ipv4/lwip/ip_addr.h
diff --git a/core/lwip/src/include/ipv4/lwip/ip_frag.h b/core/bios/lwip/src/include/ipv4/lwip/ip_frag.h
index 77b5eb1e..77b5eb1e 100644
--- a/core/lwip/src/include/ipv4/lwip/ip_frag.h
+++ b/core/bios/lwip/src/include/ipv4/lwip/ip_frag.h
diff --git a/core/lwip/src/include/lwip/api.h b/core/bios/lwip/src/include/lwip/api.h
index 91b9e5d2..91b9e5d2 100644
--- a/core/lwip/src/include/lwip/api.h
+++ b/core/bios/lwip/src/include/lwip/api.h
diff --git a/core/lwip/src/include/lwip/api_msg.h b/core/bios/lwip/src/include/lwip/api_msg.h
index f99d8c3b..f99d8c3b 100644
--- a/core/lwip/src/include/lwip/api_msg.h
+++ b/core/bios/lwip/src/include/lwip/api_msg.h
diff --git a/core/lwip/src/include/lwip/arch.h b/core/bios/lwip/src/include/lwip/arch.h
index 524af6be..524af6be 100644
--- a/core/lwip/src/include/lwip/arch.h
+++ b/core/bios/lwip/src/include/lwip/arch.h
diff --git a/core/lwip/src/include/lwip/debug.h b/core/bios/lwip/src/include/lwip/debug.h
index d8359ea3..d8359ea3 100644
--- a/core/lwip/src/include/lwip/debug.h
+++ b/core/bios/lwip/src/include/lwip/debug.h
diff --git a/core/lwip/src/include/lwip/def.h b/core/bios/lwip/src/include/lwip/def.h
index 9b6de6a8..9b6de6a8 100644
--- a/core/lwip/src/include/lwip/def.h
+++ b/core/bios/lwip/src/include/lwip/def.h
diff --git a/core/lwip/src/include/lwip/dhcp.h b/core/bios/lwip/src/include/lwip/dhcp.h
index 32d93381..32d93381 100644
--- a/core/lwip/src/include/lwip/dhcp.h
+++ b/core/bios/lwip/src/include/lwip/dhcp.h
diff --git a/core/lwip/src/include/lwip/dns.h b/core/bios/lwip/src/include/lwip/dns.h
index 6c7d9b07..6c7d9b07 100644
--- a/core/lwip/src/include/lwip/dns.h
+++ b/core/bios/lwip/src/include/lwip/dns.h
diff --git a/core/lwip/src/include/lwip/err.h b/core/bios/lwip/src/include/lwip/err.h
index ac907729..ac907729 100644
--- a/core/lwip/src/include/lwip/err.h
+++ b/core/bios/lwip/src/include/lwip/err.h
diff --git a/core/lwip/src/include/lwip/init.h b/core/bios/lwip/src/include/lwip/init.h
index 77dcdfc7..77dcdfc7 100644
--- a/core/lwip/src/include/lwip/init.h
+++ b/core/bios/lwip/src/include/lwip/init.h
diff --git a/core/lwip/src/include/lwip/mem.h b/core/bios/lwip/src/include/lwip/mem.h
index 4dbf2f64..4dbf2f64 100644
--- a/core/lwip/src/include/lwip/mem.h
+++ b/core/bios/lwip/src/include/lwip/mem.h
diff --git a/core/lwip/src/include/lwip/memp.h b/core/bios/lwip/src/include/lwip/memp.h
index f0d07399..f0d07399 100644
--- a/core/lwip/src/include/lwip/memp.h
+++ b/core/bios/lwip/src/include/lwip/memp.h
diff --git a/core/lwip/src/include/lwip/memp_std.h b/core/bios/lwip/src/include/lwip/memp_std.h
index 6ce408fb..6ce408fb 100644
--- a/core/lwip/src/include/lwip/memp_std.h
+++ b/core/bios/lwip/src/include/lwip/memp_std.h
diff --git a/core/lwip/src/include/lwip/netbuf.h b/core/bios/lwip/src/include/lwip/netbuf.h
index 7d247d71..7d247d71 100644
--- a/core/lwip/src/include/lwip/netbuf.h
+++ b/core/bios/lwip/src/include/lwip/netbuf.h
diff --git a/core/lwip/src/include/lwip/netdb.h b/core/bios/lwip/src/include/lwip/netdb.h
index 7587e2f2..7587e2f2 100644
--- a/core/lwip/src/include/lwip/netdb.h
+++ b/core/bios/lwip/src/include/lwip/netdb.h
diff --git a/core/lwip/src/include/lwip/netif.h b/core/bios/lwip/src/include/lwip/netif.h
index 8e799295..8e799295 100644
--- a/core/lwip/src/include/lwip/netif.h
+++ b/core/bios/lwip/src/include/lwip/netif.h
diff --git a/core/lwip/src/include/lwip/netifapi.h b/core/bios/lwip/src/include/lwip/netifapi.h
index 33318efa..33318efa 100644
--- a/core/lwip/src/include/lwip/netifapi.h
+++ b/core/bios/lwip/src/include/lwip/netifapi.h
diff --git a/core/lwip/src/include/lwip/opt.h b/core/bios/lwip/src/include/lwip/opt.h
index 490aab43..490aab43 100644
--- a/core/lwip/src/include/lwip/opt.h
+++ b/core/bios/lwip/src/include/lwip/opt.h
diff --git a/core/lwip/src/include/lwip/pbuf.h b/core/bios/lwip/src/include/lwip/pbuf.h
index 3b1d608b..3b1d608b 100644
--- a/core/lwip/src/include/lwip/pbuf.h
+++ b/core/bios/lwip/src/include/lwip/pbuf.h
diff --git a/core/lwip/src/include/lwip/raw.h b/core/bios/lwip/src/include/lwip/raw.h
index 17d0a1c5..17d0a1c5 100644
--- a/core/lwip/src/include/lwip/raw.h
+++ b/core/bios/lwip/src/include/lwip/raw.h
diff --git a/core/lwip/src/include/lwip/sio.h b/core/bios/lwip/src/include/lwip/sio.h
index 28ae2f22..28ae2f22 100644
--- a/core/lwip/src/include/lwip/sio.h
+++ b/core/bios/lwip/src/include/lwip/sio.h
diff --git a/core/lwip/src/include/lwip/snmp.h b/core/bios/lwip/src/include/lwip/snmp.h
index 2ed043dd..2ed043dd 100644
--- a/core/lwip/src/include/lwip/snmp.h
+++ b/core/bios/lwip/src/include/lwip/snmp.h
diff --git a/core/lwip/src/include/lwip/snmp_asn1.h b/core/bios/lwip/src/include/lwip/snmp_asn1.h
index 605fa3f1..605fa3f1 100644
--- a/core/lwip/src/include/lwip/snmp_asn1.h
+++ b/core/bios/lwip/src/include/lwip/snmp_asn1.h
diff --git a/core/lwip/src/include/lwip/snmp_msg.h b/core/bios/lwip/src/include/lwip/snmp_msg.h
index 1183e3a9..1183e3a9 100644
--- a/core/lwip/src/include/lwip/snmp_msg.h
+++ b/core/bios/lwip/src/include/lwip/snmp_msg.h
diff --git a/core/lwip/src/include/lwip/snmp_structs.h b/core/bios/lwip/src/include/lwip/snmp_structs.h
index 0d3b46a9..0d3b46a9 100644
--- a/core/lwip/src/include/lwip/snmp_structs.h
+++ b/core/bios/lwip/src/include/lwip/snmp_structs.h
diff --git a/core/lwip/src/include/lwip/sockets.h b/core/bios/lwip/src/include/lwip/sockets.h
index 3c8fed24..3c8fed24 100644
--- a/core/lwip/src/include/lwip/sockets.h
+++ b/core/bios/lwip/src/include/lwip/sockets.h
diff --git a/core/lwip/src/include/lwip/stats.h b/core/bios/lwip/src/include/lwip/stats.h
index 015b7ce7..015b7ce7 100644
--- a/core/lwip/src/include/lwip/stats.h
+++ b/core/bios/lwip/src/include/lwip/stats.h
diff --git a/core/lwip/src/include/lwip/sys.h b/core/bios/lwip/src/include/lwip/sys.h
index 9f62c754..9f62c754 100644
--- a/core/lwip/src/include/lwip/sys.h
+++ b/core/bios/lwip/src/include/lwip/sys.h
diff --git a/core/lwip/src/include/lwip/tcp.h b/core/bios/lwip/src/include/lwip/tcp.h
index 07dcd10e..07dcd10e 100644
--- a/core/lwip/src/include/lwip/tcp.h
+++ b/core/bios/lwip/src/include/lwip/tcp.h
diff --git a/core/lwip/src/include/lwip/tcp_impl.h b/core/bios/lwip/src/include/lwip/tcp_impl.h
index b4feec0d..b4feec0d 100644
--- a/core/lwip/src/include/lwip/tcp_impl.h
+++ b/core/bios/lwip/src/include/lwip/tcp_impl.h
diff --git a/core/lwip/src/include/lwip/tcpip.h b/core/bios/lwip/src/include/lwip/tcpip.h
index 995ba8ad..995ba8ad 100644
--- a/core/lwip/src/include/lwip/tcpip.h
+++ b/core/bios/lwip/src/include/lwip/tcpip.h
diff --git a/core/lwip/src/include/lwip/timers.h b/core/bios/lwip/src/include/lwip/timers.h
index fb92b4b4..fb92b4b4 100644
--- a/core/lwip/src/include/lwip/timers.h
+++ b/core/bios/lwip/src/include/lwip/timers.h
diff --git a/core/lwip/src/include/lwip/udp.h b/core/bios/lwip/src/include/lwip/udp.h
index c98c1b3e..c98c1b3e 100644
--- a/core/lwip/src/include/lwip/udp.h
+++ b/core/bios/lwip/src/include/lwip/udp.h
diff --git a/core/lwip/src/include/lwipopts.h b/core/bios/lwip/src/include/lwipopts.h
index e0d39b89..e0d39b89 100644
--- a/core/lwip/src/include/lwipopts.h
+++ b/core/bios/lwip/src/include/lwipopts.h
diff --git a/core/lwip/src/include/netif/etharp.h b/core/bios/lwip/src/include/netif/etharp.h
index 691575fa..691575fa 100644
--- a/core/lwip/src/include/netif/etharp.h
+++ b/core/bios/lwip/src/include/netif/etharp.h
diff --git a/core/lwip/src/include/netif/ppp_oe.h b/core/bios/lwip/src/include/netif/ppp_oe.h
index e1cdfa51..e1cdfa51 100644
--- a/core/lwip/src/include/netif/ppp_oe.h
+++ b/core/bios/lwip/src/include/netif/ppp_oe.h
diff --git a/core/lwip/src/include/netif/slipif.h b/core/bios/lwip/src/include/netif/slipif.h
index ccd03c8a..ccd03c8a 100644
--- a/core/lwip/src/include/netif/slipif.h
+++ b/core/bios/lwip/src/include/netif/slipif.h
diff --git a/core/lwip/src/netif/FILES b/core/bios/lwip/src/netif/FILES
index 099dbf3e..099dbf3e 100644
--- a/core/lwip/src/netif/FILES
+++ b/core/bios/lwip/src/netif/FILES
diff --git a/core/lwip/src/netif/etharp.c b/core/bios/lwip/src/netif/etharp.c
index b60dadd0..b60dadd0 100644
--- a/core/lwip/src/netif/etharp.c
+++ b/core/bios/lwip/src/netif/etharp.c
diff --git a/core/lwip/src/netif/ethernetif.c b/core/bios/lwip/src/netif/ethernetif.c
index a5b7d990..a5b7d990 100644
--- a/core/lwip/src/netif/ethernetif.c
+++ b/core/bios/lwip/src/netif/ethernetif.c
diff --git a/core/lwip/src/netif/ppp/auth.c b/core/bios/lwip/src/netif/ppp/auth.c
index c3c49d22..c3c49d22 100644
--- a/core/lwip/src/netif/ppp/auth.c
+++ b/core/bios/lwip/src/netif/ppp/auth.c
diff --git a/core/lwip/src/netif/ppp/auth.h b/core/bios/lwip/src/netif/ppp/auth.h
index a8069ec4..a8069ec4 100644
--- a/core/lwip/src/netif/ppp/auth.h
+++ b/core/bios/lwip/src/netif/ppp/auth.h
diff --git a/core/lwip/src/netif/ppp/chap.c b/core/bios/lwip/src/netif/ppp/chap.c
index 3a49ff8a..3a49ff8a 100644
--- a/core/lwip/src/netif/ppp/chap.c
+++ b/core/bios/lwip/src/netif/ppp/chap.c
diff --git a/core/lwip/src/netif/ppp/chap.h b/core/bios/lwip/src/netif/ppp/chap.h
index fedcab8d..fedcab8d 100644
--- a/core/lwip/src/netif/ppp/chap.h
+++ b/core/bios/lwip/src/netif/ppp/chap.h
diff --git a/core/lwip/src/netif/ppp/chpms.c b/core/bios/lwip/src/netif/ppp/chpms.c
index 83acefce..83acefce 100644
--- a/core/lwip/src/netif/ppp/chpms.c
+++ b/core/bios/lwip/src/netif/ppp/chpms.c
diff --git a/core/lwip/src/netif/ppp/chpms.h b/core/bios/lwip/src/netif/ppp/chpms.h
index df070fb3..df070fb3 100644
--- a/core/lwip/src/netif/ppp/chpms.h
+++ b/core/bios/lwip/src/netif/ppp/chpms.h
diff --git a/core/lwip/src/netif/ppp/fsm.c b/core/bios/lwip/src/netif/ppp/fsm.c
index 2e73c5af..2e73c5af 100644
--- a/core/lwip/src/netif/ppp/fsm.c
+++ b/core/bios/lwip/src/netif/ppp/fsm.c
diff --git a/core/lwip/src/netif/ppp/fsm.h b/core/bios/lwip/src/netif/ppp/fsm.h
index 8d41b5f5..8d41b5f5 100644
--- a/core/lwip/src/netif/ppp/fsm.h
+++ b/core/bios/lwip/src/netif/ppp/fsm.h
diff --git a/core/lwip/src/netif/ppp/ipcp.c b/core/bios/lwip/src/netif/ppp/ipcp.c
index 461a600f..461a600f 100644
--- a/core/lwip/src/netif/ppp/ipcp.c
+++ b/core/bios/lwip/src/netif/ppp/ipcp.c
diff --git a/core/lwip/src/netif/ppp/ipcp.h b/core/bios/lwip/src/netif/ppp/ipcp.h
index de03f460..de03f460 100644
--- a/core/lwip/src/netif/ppp/ipcp.h
+++ b/core/bios/lwip/src/netif/ppp/ipcp.h
diff --git a/core/lwip/src/netif/ppp/lcp.c b/core/bios/lwip/src/netif/ppp/lcp.c
index 21c83ac4..21c83ac4 100644
--- a/core/lwip/src/netif/ppp/lcp.c
+++ b/core/bios/lwip/src/netif/ppp/lcp.c
diff --git a/core/lwip/src/netif/ppp/lcp.h b/core/bios/lwip/src/netif/ppp/lcp.h
index b9201eeb..b9201eeb 100644
--- a/core/lwip/src/netif/ppp/lcp.h
+++ b/core/bios/lwip/src/netif/ppp/lcp.h
diff --git a/core/lwip/src/netif/ppp/magic.c b/core/bios/lwip/src/netif/ppp/magic.c
index 39013308..39013308 100644
--- a/core/lwip/src/netif/ppp/magic.c
+++ b/core/bios/lwip/src/netif/ppp/magic.c
diff --git a/core/lwip/src/netif/ppp/magic.h b/core/bios/lwip/src/netif/ppp/magic.h
index eba70d20..eba70d20 100644
--- a/core/lwip/src/netif/ppp/magic.h
+++ b/core/bios/lwip/src/netif/ppp/magic.h
diff --git a/core/lwip/src/netif/ppp/md5.c b/core/bios/lwip/src/netif/ppp/md5.c
index 3cb69e2b..3cb69e2b 100644
--- a/core/lwip/src/netif/ppp/md5.c
+++ b/core/bios/lwip/src/netif/ppp/md5.c
diff --git a/core/lwip/src/netif/ppp/md5.h b/core/bios/lwip/src/netif/ppp/md5.h
index e129533f..e129533f 100644
--- a/core/lwip/src/netif/ppp/md5.h
+++ b/core/bios/lwip/src/netif/ppp/md5.h
diff --git a/core/lwip/src/netif/ppp/pap.c b/core/bios/lwip/src/netif/ppp/pap.c
index ac44e646..ac44e646 100644
--- a/core/lwip/src/netif/ppp/pap.c
+++ b/core/bios/lwip/src/netif/ppp/pap.c
diff --git a/core/lwip/src/netif/ppp/pap.h b/core/bios/lwip/src/netif/ppp/pap.h
index c99a2040..c99a2040 100644
--- a/core/lwip/src/netif/ppp/pap.h
+++ b/core/bios/lwip/src/netif/ppp/pap.h
diff --git a/core/lwip/src/netif/ppp/ppp.c b/core/bios/lwip/src/netif/ppp/ppp.c
index e9b433b0..e9b433b0 100644
--- a/core/lwip/src/netif/ppp/ppp.c
+++ b/core/bios/lwip/src/netif/ppp/ppp.c
diff --git a/core/lwip/src/netif/ppp/ppp.h b/core/bios/lwip/src/netif/ppp/ppp.h
index a72ac957..a72ac957 100644
--- a/core/lwip/src/netif/ppp/ppp.h
+++ b/core/bios/lwip/src/netif/ppp/ppp.h
diff --git a/core/lwip/src/netif/ppp/ppp_oe.c b/core/bios/lwip/src/netif/ppp/ppp_oe.c
index 040a0bc9..040a0bc9 100644
--- a/core/lwip/src/netif/ppp/ppp_oe.c
+++ b/core/bios/lwip/src/netif/ppp/ppp_oe.c
diff --git a/core/lwip/src/netif/ppp/pppdebug.h b/core/bios/lwip/src/netif/ppp/pppdebug.h
index 81349971..81349971 100644
--- a/core/lwip/src/netif/ppp/pppdebug.h
+++ b/core/bios/lwip/src/netif/ppp/pppdebug.h
diff --git a/core/lwip/src/netif/ppp/randm.c b/core/bios/lwip/src/netif/ppp/randm.c
index 2f35caf6..2f35caf6 100644
--- a/core/lwip/src/netif/ppp/randm.c
+++ b/core/bios/lwip/src/netif/ppp/randm.c
diff --git a/core/lwip/src/netif/ppp/randm.h b/core/bios/lwip/src/netif/ppp/randm.h
index a0984b02..a0984b02 100644
--- a/core/lwip/src/netif/ppp/randm.h
+++ b/core/bios/lwip/src/netif/ppp/randm.h
diff --git a/core/lwip/src/netif/ppp/vj.c b/core/bios/lwip/src/netif/ppp/vj.c
index b7f2d54c..b7f2d54c 100644
--- a/core/lwip/src/netif/ppp/vj.c
+++ b/core/bios/lwip/src/netif/ppp/vj.c
diff --git a/core/lwip/src/netif/ppp/vj.h b/core/bios/lwip/src/netif/ppp/vj.h
index fad12136..fad12136 100644
--- a/core/lwip/src/netif/ppp/vj.h
+++ b/core/bios/lwip/src/netif/ppp/vj.h
diff --git a/core/lwip/src/netif/slipif.c b/core/bios/lwip/src/netif/slipif.c
index c19333dd..c19333dd 100644
--- a/core/lwip/src/netif/slipif.c
+++ b/core/bios/lwip/src/netif/slipif.c
diff --git a/core/lwip/src/netif/undiif.c b/core/bios/lwip/src/netif/undiif.c
index d68edef1..42706658 100644
--- a/core/lwip/src/netif/undiif.c
+++ b/core/bios/lwip/src/netif/undiif.c
@@ -76,7 +76,7 @@
#include "netif/ppp_oe.h"
#include "lwip/netifapi.h"
#include "lwip/tcpip.h"
-#include "../../../fs/pxe/pxe.h"
+#include "core_pxe.h"
#include <inttypes.h>
#include <string.h>
diff --git a/core/fs/pxe/tcp.c b/core/bios/lwip/tcp.c
index 0fb6efd0..d32b5207 100644
--- a/core/fs/pxe/tcp.c
+++ b/core/bios/lwip/tcp.c
@@ -16,7 +16,7 @@
* Common operations for TCP-based network protocols
*/
-#include "pxe.h"
+#include "core_pxe.h"
#include "net.h"
const struct pxe_conn_ops tcp_conn_ops = {
diff --git a/core/thread/exit_thread.c b/core/bios/lwip/thread/exit_thread.c
index d9fd83ad..d9fd83ad 100644
--- a/core/thread/exit_thread.c
+++ b/core/bios/lwip/thread/exit_thread.c
diff --git a/core/thread/idle_thread.c b/core/bios/lwip/thread/idle_thread.c
index f709531b..f709531b 100644
--- a/core/thread/idle_thread.c
+++ b/core/bios/lwip/thread/idle_thread.c
diff --git a/core/thread/kill_thread.c b/core/bios/lwip/thread/kill_thread.c
index c22517c6..c22517c6 100644
--- a/core/thread/kill_thread.c
+++ b/core/bios/lwip/thread/kill_thread.c
diff --git a/core/thread/mbox.c b/core/bios/lwip/thread/mbox.c
index d1c640a9..d1c640a9 100644
--- a/core/thread/mbox.c
+++ b/core/bios/lwip/thread/mbox.c
diff --git a/core/thread/root_thread.c b/core/bios/lwip/thread/root_thread.c
index 2bba7c26..2bba7c26 100644
--- a/core/thread/root_thread.c
+++ b/core/bios/lwip/thread/root_thread.c
diff --git a/core/thread/schedule.c b/core/bios/lwip/thread/schedule.c
index 4f0dfe37..9dbc5843 100644
--- a/core/thread/schedule.c
+++ b/core/bios/lwip/thread/schedule.c
@@ -2,11 +2,11 @@
#include <x86/cpu.h>
#include "thread.h"
#include "core.h"
-#include <dprintf.h>
-#ifndef DEBUG_THREAD
-#define dprintf
+#ifndef DEBUG_THREAD /* Thread debugging is extra tricky */
+# undef DEBUG_CORE
#endif
+#include <dprintf.h>
void (*sched_hook_func)(void);
diff --git a/core/thread/sem_asm.S b/core/bios/lwip/thread/sem_asm.S
index ce67471a..ce67471a 100644
--- a/core/thread/sem_asm.S
+++ b/core/bios/lwip/thread/sem_asm.S
diff --git a/core/thread/semaphore.c b/core/bios/lwip/thread/semaphore.c
index b85bc1e3..b85bc1e3 100644
--- a/core/thread/semaphore.c
+++ b/core/bios/lwip/thread/semaphore.c
diff --git a/core/thread/start_thread.c b/core/bios/lwip/thread/start_thread.c
index 2e4320a4..2e4320a4 100644
--- a/core/thread/start_thread.c
+++ b/core/bios/lwip/thread/start_thread.c
diff --git a/core/thread/thread_asm.S b/core/bios/lwip/thread/thread_asm.S
index ec3e0add..ec3e0add 100644
--- a/core/thread/thread_asm.S
+++ b/core/bios/lwip/thread/thread_asm.S
diff --git a/core/thread/timeout.c b/core/bios/lwip/thread/timeout.c
index 409ad6d7..409ad6d7 100644
--- a/core/thread/timeout.c
+++ b/core/bios/lwip/thread/timeout.c
diff --git a/core/lzo/enter.ash b/core/bios/lzo/enter.ash
index c121c573..c121c573 100644
--- a/core/lzo/enter.ash
+++ b/core/bios/lzo/enter.ash
diff --git a/core/lzo/leave.ash b/core/bios/lzo/leave.ash
index 2aa02867..2aa02867 100644
--- a/core/lzo/leave.ash
+++ b/core/bios/lzo/leave.ash
diff --git a/core/lzo/lzo1c_d.ash b/core/bios/lzo/lzo1c_d.ash
index 4560452b..4560452b 100644
--- a/core/lzo/lzo1c_d.ash
+++ b/core/bios/lzo/lzo1c_d.ash
diff --git a/core/lzo/lzo1f_d.ash b/core/bios/lzo/lzo1f_d.ash
index 50248d8b..50248d8b 100644
--- a/core/lzo/lzo1f_d.ash
+++ b/core/bios/lzo/lzo1f_d.ash
diff --git a/core/lzo/lzo1x_d.ash b/core/bios/lzo/lzo1x_d.ash
index a05f15dc..a05f15dc 100644
--- a/core/lzo/lzo1x_d.ash
+++ b/core/bios/lzo/lzo1x_d.ash
diff --git a/core/lzo/lzo1x_f2.S b/core/bios/lzo/lzo1x_f2.S
index 8cc26b8b..8cc26b8b 100644
--- a/core/lzo/lzo1x_f2.S
+++ b/core/bios/lzo/lzo1x_f2.S
diff --git a/core/lzo/lzo_asm.h b/core/bios/lzo/lzo_asm.h
index 1958517d..1958517d 100644
--- a/core/lzo/lzo_asm.h
+++ b/core/bios/lzo/lzo_asm.h
diff --git a/core/macros.inc b/core/bios/macros.inc
index c8fbe8de..c8fbe8de 100644
--- a/core/macros.inc
+++ b/core/bios/macros.inc
diff --git a/core/bios/null_thread.c b/core/bios/null_thread.c
new file mode 100644
index 00000000..51e0441c
--- /dev/null
+++ b/core/bios/null_thread.c
@@ -0,0 +1,18 @@
+/*
+ * Null implementation of threading
+ */
+
+#include "thread.h"
+
+mstime_t __attribute__((weak)) sem_down(struct semaphore *sem, mstime_t ms)
+{
+ (void)sem;
+ (void)ms;
+ return 0;
+}
+
+void __attribute__((weak)) sem_up(struct semaphore *sem)
+{
+ (void)sem;
+}
+
diff --git a/core/plaincon.c b/core/bios/plaincon.c
index 66c259eb..66c259eb 100644
--- a/core/plaincon.c
+++ b/core/bios/plaincon.c
diff --git a/core/pm.inc b/core/bios/pm.inc
index 7b98944f..7b98944f 100644
--- a/core/pm.inc
+++ b/core/bios/pm.inc
diff --git a/core/pmcall.inc b/core/bios/pmcall.inc
index 0a580150..0a580150 100644
--- a/core/pmcall.inc
+++ b/core/bios/pmcall.inc
diff --git a/core/prefix.inc b/core/bios/prefix.inc
index 9c8724b5..9c8724b5 100644
--- a/core/prefix.inc
+++ b/core/bios/prefix.inc
diff --git a/core/pxe.inc b/core/bios/pxe.inc
index 9b46bb67..9b46bb67 100644
--- a/core/pxe.inc
+++ b/core/bios/pxe.inc
diff --git a/core/fs/pxe/bios.c b/core/bios/pxe/bios.c
index ddf9982b..2db7a544 100644
--- a/core/fs/pxe/bios.c
+++ b/core/bios/pxe/bios.c
@@ -1,11 +1,12 @@
#include <syslinux/firmware.h>
#include <syslinux/memscan.h>
#include <core.h>
-#include "pxe.h"
+#include "core_pxe.h"
#include <net.h>
#include <minmax.h>
#include <bios.h>
#include <dprintf.h>
+#include "thread.h"
static uint16_t real_base_mem; /* Amount of DOS memory after freeing */
@@ -458,3 +459,30 @@ void net_parse_dhcp(void)
lfree(bp);
}
+
+/*
+ * the ASM pxenv function wrapper, return 1 if error, or 0
+ *
+ */
+__export int pxe_call(int opcode, void *data)
+{
+ static DECLARE_INIT_SEMAPHORE(pxe_sem, 1);
+ extern void pxenv(void);
+ com32sys_t regs;
+
+ sem_down(&pxe_sem, 0);
+
+#if 0
+ dprintf("pxe_call op %04x data %p\n", opcode, data);
+#endif
+
+ memset(&regs, 0, sizeof regs);
+ regs.ebx.w[0] = opcode;
+ regs.es = SEG(data);
+ regs.edi.w[0] = OFFS(data);
+ call16(pxenv, &regs, &regs);
+
+ sem_up(&pxe_sem);
+
+ return regs.eflags.l & EFLAGS_CF; /* CF SET if fail */
+}
diff --git a/core/pxeboot.c b/core/bios/pxe/pxeboot.c
index d9960d81..94d345bd 100644
--- a/core/pxeboot.c
+++ b/core/bios/pxe/pxeboot.c
@@ -10,7 +10,7 @@
*/
#include <syslinux/video.h>
-#include "pxe.h"
+#include "core_pxe.h"
#include <com32.h>
#define LOCALBOOT_MSG "Booting from local disk..."
diff --git a/core/pxeisr.inc b/core/bios/pxeisr.inc
index 93c73ed5..93c73ed5 100644
--- a/core/pxeisr.inc
+++ b/core/bios/pxeisr.inc
diff --git a/core/pxelinux-c.c b/core/bios/pxelinux-c.c
index ac23d822..ac23d822 100644
--- a/core/pxelinux-c.c
+++ b/core/bios/pxelinux-c.c
diff --git a/core/bios/pxelinux.asm b/core/bios/pxelinux.asm
new file mode 100644
index 00000000..4cfdf1a2
--- /dev/null
+++ b/core/bios/pxelinux.asm
@@ -0,0 +1,2 @@
+%define IS_LPXELINUX 0
+%include "pxelinux.inc"
diff --git a/core/pxelinux.asm b/core/bios/pxelinux.inc
index a2543dfe..be786369 100644
--- a/core/pxelinux.asm
+++ b/core/bios/pxelinux.inc
@@ -203,11 +203,6 @@ ROOT_FS_OPS:
pm_call load_env32
jmp kaboom ; load_env32() shouldn't return. If it does, then kaboom!
-print_hello:
-enter_command:
-auto_boot:
- pm_call hello
-
;
; Save hardwired DHCP options. This is done before the C environment
; is initialized, so it has to be done in assembly.
diff --git a/core/rawcon.c b/core/bios/rawcon.c
index 44030984..44030984 100644
--- a/core/rawcon.c
+++ b/core/bios/rawcon.c
diff --git a/core/regdump.inc b/core/bios/regdump.inc
index bdb5172d..bdb5172d 100644
--- a/core/regdump.inc
+++ b/core/bios/regdump.inc
diff --git a/core/rllpack.c b/core/bios/rllpack.c
index bb9f046c..bb9f046c 100644
--- a/core/rllpack.c
+++ b/core/bios/rllpack.c
diff --git a/core/serirq.c b/core/bios/serirq.c
index 22370b9c..22370b9c 100644
--- a/core/serirq.c
+++ b/core/bios/serirq.c
diff --git a/core/stack.inc b/core/bios/stack.inc
index 838d6bab..838d6bab 100644
--- a/core/stack.inc
+++ b/core/bios/stack.inc
diff --git a/core/strcpy.inc b/core/bios/strcpy.inc
index 9762cbbf..9762cbbf 100644
--- a/core/strcpy.inc
+++ b/core/bios/strcpy.inc
diff --git a/core/i386/syslinux.ld b/core/bios/syslinux.ld
index e8d32dd9..e8d32dd9 100644
--- a/core/i386/syslinux.ld
+++ b/core/bios/syslinux.ld
diff --git a/core/timer.inc b/core/bios/timer.inc
index 80647983..80647983 100644
--- a/core/timer.inc
+++ b/core/bios/timer.inc
diff --git a/core/tracers.inc b/core/bios/tracers.inc
index a51209fa..a51209fa 100644
--- a/core/tracers.inc
+++ b/core/bios/tracers.inc
diff --git a/core/writedec.inc b/core/bios/writedec.inc
index 19e47968..19e47968 100644
--- a/core/writedec.inc
+++ b/core/bios/writedec.inc
diff --git a/core/writehex.inc b/core/bios/writehex.inc
index e2bf86b4..e2bf86b4 100644
--- a/core/writehex.inc
+++ b/core/bios/writehex.inc
diff --git a/core/conio.c b/core/conio.c
index e5e0ca76..e1c14987 100644
--- a/core/conio.c
+++ b/core/conio.c
@@ -29,271 +29,11 @@
#include <x86/cpu.h>
#include <syslinux/firmware.h>
-#include "bios.h"
-#include "graphics.h"
-
-union screen _cursor;
-union screen _screensize;
-
-/*
- * Serial console stuff.
- */
-__export uint16_t SerialPort = 0; /* Serial port base (or 0 for no serial port) */
-__export uint8_t FlowInput = 0; /* Input bits for serial flow */
-__export uint16_t BaudDivisor = 115200/9600; /* Baud rate divisor */
-__export uint8_t FlowIgnore = 0; /* Ignore input unless these bits set */
-__export uint16_t DisplayCon = 0x01; /* Display console enabled */
-__export uint8_t FlowOutput = 0; /* Output to assert for serial flow */
-
-__export uint8_t DisplayMask = 0x07; /* Display modes mask */
-
-uint8_t ScrollAttribute = 0x07; /* Grey on white (normal text color) */
-
-/*
- * loadkeys: Load a LILO-style keymap
- *
- * Returns 0 on success, or -1 on error.
- */
-__export int loadkeys(const char *filename)
-{
- FILE *f;
-
- f = fopen(filename, "r");
- if (!f)
- return -1;
-
- fread(KbdMap, 1, sizeof(KbdMap), f);
-
- fclose(f);
- return 0;
-}
-
-/*
- * write_serial: If serial output is enabled, write character on
- * serial port.
- */
-__export void write_serial(char data)
-{
- if (!SerialPort)
- return;
-
- if (!(DisplayMask & 0x04))
- return;
-
- while (1) {
- char ch;
-
- ch = inb(SerialPort + 5); /* LSR */
-
- /* Wait for space in transmit register */
- if (!(ch & 0x20))
- continue;
-
- /* Wait for input flow control */
- ch = inb(SerialPort + 6);
- ch &= FlowInput;
- if (ch != FlowInput)
- continue;
-
- break;
- }
-
- outb(data, SerialPort); /* Send data */
- io_delay();
-}
-
-void pm_write_serial(com32sys_t *regs)
-{
- write_serial(regs->eax.b[0]);
-}
-
-void serialcfg(uint16_t *iobase, uint16_t *divisor, uint16_t *flowctl)
-{
- uint8_t al, ah;
-
- *iobase = SerialPort;
- *divisor = BaudDivisor;
-
- al = FlowOutput;
- ah = FlowInput;
-
- al |= ah;
- ah = FlowIgnore;
- ah >>= 4;
-
- if (!DisplayCon)
- ah |= 0x80;
-
- *flowctl = al | (ah << 8);
-}
-
-void pm_serialcfg(com32sys_t *regs)
-{
- serialcfg(&regs->eax.w[0], &regs->ecx.w[0], &regs->ebx.w[0]);
-}
-
-/*
- * write_serial_str: write_serial for strings
- */
-__export void write_serial_str(char *data)
-{
- char ch;
-
- while ((ch = *data++))
- write_serial(ch);
-}
-
-/*
- * pollchar: check if we have an input character pending
- *
- * Returns 1 if character pending.
- */
-int bios_pollchar(void)
-{
- com32sys_t ireg, oreg;
- uint8_t data = 0;
-
- memset(&ireg, 0, sizeof(ireg));
-
- ireg.eax.b[1] = 0x11; /* Poll keyboard */
- __intcall(0x16, &ireg, &oreg);
-
- if (!(oreg.eflags.l & EFLAGS_ZF))
- return 1;
-
- if (SerialPort) {
- cli();
-
- /* Already-queued input? */
- if (SerialTail == SerialHead) {
- /* LSR */
- data = inb(SerialPort + 5) & 1;
- if (data) {
- /* MSR */
- data = inb(SerialPort + 6);
-
- /* Required status bits */
- data &= FlowIgnore;
-
- if (data == FlowIgnore)
- data = 1;
- else
- data = 0;
- }
- } else
- data = 1;
- sti();
- }
-
- return data;
-}
-
__export int pollchar(void)
{
return firmware->i_ops->pollchar();
}
-void pm_pollchar(com32sys_t *regs)
-{
- if (pollchar())
- regs->eflags.l &= ~EFLAGS_ZF;
- else
- regs->eflags.l |= EFLAGS_ZF;
-}
-
-char bios_getchar(char *hi)
-{
- com32sys_t ireg, oreg;
- unsigned char data;
-
- memset(&ireg, 0, sizeof(ireg));
- memset(&oreg, 0, sizeof(oreg));
- while (1) {
- __idle();
-
- ireg.eax.b[1] = 0x11; /* Poll keyboard */
- __intcall(0x16, &ireg, &oreg);
-
- if (oreg.eflags.l & EFLAGS_ZF) {
- if (!SerialPort)
- continue;
-
- cli();
- if (SerialTail != SerialHead) {
- /* serial queued */
- sti(); /* We already know we'll consume data */
- data = *SerialTail++;
-
- if (SerialTail > SerialHead + serial_buf_size)
- SerialTail = SerialHead;
- } else {
- /* LSR */
- data = inb(SerialPort + 5) & 1;
- if (!data) {
- sti();
- continue;
- }
- data = inb(SerialPort + 6);
- data &= FlowIgnore;
- if (data != FlowIgnore) {
- sti();
- continue;
- }
-
- data = inb(SerialPort);
- sti();
- break;
- }
- } else {
- /* Keyboard input? */
- ireg.eax.b[1] = 0x10; /* Get keyboard input */
- __intcall(0x16, &ireg, &oreg);
-
- data = oreg.eax.b[0];
- *hi = oreg.eax.b[1];
-
- if (data == 0xE0)
- data = 0;
-
- if (data) {
- /* Convert character sets */
- data = KbdMap[data];
- }
- }
-
- break;
- }
-
- reset_idle(); /* Character received */
- return data;
-}
-
-uint8_t bios_shiftflags(void)
-{
- com32sys_t reg;
- uint8_t ah, al;
-
- memset(&reg, 0, sizeof reg);
- reg.eax.b[1] = 0x12;
- __intcall(0x16, &reg, &reg);
- ah = reg.eax.b[1];
- al = reg.eax.b[0];
-
- /*
- * According to the Interrupt List, "many machines" don't correctly
- * fold the Alt state, presumably because it might be AltGr.
- * Explicitly fold the Alt and Ctrl states; it fits our needs
- * better.
- */
-
- if (ah & 0x0a)
- al |= 0x08;
- if (ah & 0x05)
- al |= 0x04;
-
- return al;
-}
-
__export uint8_t kbd_shiftflags(void)
{
if (firmware->i_ops->shiftflags)
@@ -309,8 +49,3 @@ __export char getchar(char *hi)
{
return firmware->i_ops->getchar(hi);
}
-
-void pm_getchar(com32sys_t *regs)
-{
- regs->eax.b[0] = getchar((char *)&regs->eax.b[1]);
-}
diff --git a/core/elflink/elfutils.h b/core/elflink/elfutils.h
index 3c8e70fc..f641b119 100644
--- a/core/elflink/elfutils.h
+++ b/core/elflink/elfutils.h
@@ -8,20 +8,20 @@
* elf_get_header - Returns a pointer to the ELF header structure.
* @elf_image: pointer to the ELF file image in memory
*/
-static inline Elf32_Ehdr *elf_get_header(void *elf_image)
+static inline Elf_Ehdr *elf_get_header(void *elf_image)
{
- return (Elf32_Ehdr *) elf_image;
+ return (Elf_Ehdr *) elf_image;
}
/**
* elf_get_pht - Returns a pointer to the first entry in the PHT.
* @elf_image: pointer to the ELF file image in memory
*/
-static inline Elf32_Phdr *elf_get_pht(void *elf_image)
+static inline Elf_Phdr *elf_get_pht(void *elf_image)
{
- Elf32_Ehdr *elf_hdr = elf_get_header(elf_image);
+ Elf_Ehdr *elf_hdr = elf_get_header(elf_image);
- return (Elf32_Phdr *) ((Elf32_Off) elf_hdr + elf_hdr->e_phoff);
+ return (Elf_Phdr *) ((Elf_Off) elf_hdr + elf_hdr->e_phoff);
}
//
@@ -30,12 +30,12 @@ static inline Elf32_Phdr *elf_get_pht(void *elf_image)
* @elf_image: pointer to the ELF file image in memory
* @index: the index of the PHT entry to look for
*/
-static inline Elf32_Phdr *elf_get_ph(void *elf_image, int index)
+static inline Elf_Phdr *elf_get_ph(void *elf_image, int index)
{
- Elf32_Phdr *elf_pht = elf_get_pht(elf_image);
- Elf32_Ehdr *elf_hdr = elf_get_header(elf_image);
+ Elf_Phdr *elf_pht = elf_get_pht(elf_image);
+ Elf_Ehdr *elf_hdr = elf_get_header(elf_image);
- return (Elf32_Phdr *) ((Elf32_Off) elf_pht + index * elf_hdr->e_phentsize);
+ return (Elf_Phdr *) ((Elf_Off) elf_pht + index * elf_hdr->e_phentsize);
}
/**
diff --git a/core/fs/ext2/ext2.c b/core/fs/ext2/ext2.c
index 4bc0a535..6ff63642 100644
--- a/core/fs/ext2/ext2.c
+++ b/core/fs/ext2/ext2.c
@@ -29,7 +29,7 @@ static const void *__ext2_get_group_desc(struct fs_info *fs, uint32_t group_num)
{
struct ext2_sb_info *sbi = EXT2_SB(fs);
uint32_t desc_block, desc_index;
- uint8_t *p;
+ const uint8_t *p;
if (group_num >= sbi->s_groups_count) {
printf ("ext2_get_group_desc"
diff --git a/core/fs/ntfs/ntfs.c b/core/fs/ntfs/ntfs.c
index 4c0a09c8..54213668 100644
--- a/core/fs/ntfs/ntfs.c
+++ b/core/fs/ntfs/ntfs.c
@@ -671,8 +671,6 @@ static int index_inode_setup(struct fs_info *fs, unsigned long mft_no,
NTFS_PVT(inode)->type = attr->type;
if (!attr->non_resident) {
- NTFS_PVT(inode)->data.resident.offset =
- (uint32_t)((uint8_t *)attr + attr->data.resident.value_offset);
inode->size = attr->data.resident.value_len;
} else {
attr_len = (uint8_t *)attr + attr->len;
diff --git a/core/fs/ntfs/ntfs.h b/core/fs/ntfs/ntfs.h
index 721a78d7..ec1dc120 100644
--- a/core/fs/ntfs/ntfs.h
+++ b/core/fs/ntfs/ntfs.h
@@ -86,9 +86,6 @@ struct ntfs_inode {
uint32_t type; /* Attribute type of this inode */
uint8_t non_resident;
union { /* Non-resident $DATA attribute */
- struct { /* Used only if non_resident flags isn't set */
- uint32_t offset; /* Data offset */
- } resident;
struct { /* Used only if non_resident is set */
struct runlist *rlist;
} non_resident;
diff --git a/core/fs/pxe/dhcp_option.c b/core/fs/pxe/dhcp_option.c
index 1b8ec9d8..88102cbe 100644
--- a/core/fs/pxe/dhcp_option.c
+++ b/core/fs/pxe/dhcp_option.c
@@ -4,7 +4,7 @@
#include <x86/cpu.h>
#include <lwip/opt.h> /* DNS_MAX_SERVERS */
#include <dprintf.h>
-#include "pxe.h"
+#include "core_pxe.h"
char LocalDomain[256];
@@ -231,13 +231,10 @@ void parse_dhcp(const void *pkt, size_t pkt_len, int pkt_type)
{
const struct bootp_t *dhcp = (const struct bootp_t *)pkt;
int opt_len;
- int min_opt = 0;
IPInfo.ipver = 4; /* This is IPv4 only for now... */
over_load = 0;
- if (pkt_type == 1 || pkt_type == 3)
- min_opt = 43;
if ((pkt_type == 2) && ip_ok(dhcp->yip))
IPInfo.myip = dhcp->yip;
diff --git a/core/fs/pxe/ftp.c b/core/fs/pxe/ftp.c
index 947f2899..6893e540 100644
--- a/core/fs/pxe/ftp.c
+++ b/core/fs/pxe/ftp.c
@@ -23,7 +23,7 @@
#include <lwip/api.h>
#include "core.h"
#include "fs.h"
-#include "pxe.h"
+#include "core_pxe.h"
#include "thread.h"
#include "url.h"
#include "net.h"
diff --git a/core/fs/pxe/ftp_readdir.c b/core/fs/pxe/ftp_readdir.c
index 6b87f77e..04091cf2 100644
--- a/core/fs/pxe/ftp_readdir.c
+++ b/core/fs/pxe/ftp_readdir.c
@@ -18,7 +18,7 @@
#include <stdlib.h>
#include <ctype.h>
#include <dprintf.h>
-#include "pxe.h"
+#include "core_pxe.h"
static int dirtype(char type)
{
diff --git a/core/fs/pxe/gpxeurl.c b/core/fs/pxe/gpxeurl.c
index d030a803..5b8414fe 100644
--- a/core/fs/pxe/gpxeurl.c
+++ b/core/fs/pxe/gpxeurl.c
@@ -1,10 +1,11 @@
-#include "pxe.h"
-#if GPXE
+/*
+ * Dummy gPXE stub
+ */
-void gpxe_open(struct inode *inode, const char *url)
+#include "core_pxe.h"
+
+void __attribute__((weak)) gpxe_open(struct inode *inode, const char *url)
{
(void)inode;
(void)url;
}
-
-#endif /* GPXE */
diff --git a/core/fs/pxe/http.c b/core/fs/pxe/http.c
index f5f49e2b..5b8fce11 100644
--- a/core/fs/pxe/http.c
+++ b/core/fs/pxe/http.c
@@ -1,7 +1,7 @@
#include <syslinux/sysappend.h>
#include <ctype.h>
#include <lwip/api.h>
-#include "pxe.h"
+#include "core_pxe.h"
#include "version.h"
#include "url.h"
#include "net.h"
diff --git a/core/fs/pxe/http_readdir.c b/core/fs/pxe/http_readdir.c
index b6e480e7..88496201 100644
--- a/core/fs/pxe/http_readdir.c
+++ b/core/fs/pxe/http_readdir.c
@@ -15,7 +15,7 @@
#include <stdlib.h>
#include <ctype.h>
#include <dprintf.h>
-#include "pxe.h"
+#include "core_pxe.h"
enum http_readdir_state {
st_start, /* 0 Initial state */
diff --git a/core/fs/pxe/idle.c b/core/fs/pxe/idle.c
index dbc5b9ab..d767009a 100644
--- a/core/fs/pxe/idle.c
+++ b/core/fs/pxe/idle.c
@@ -11,19 +11,23 @@
*
* ----------------------------------------------------------------------- */
+/*
+ * Fallback empty idle routine, marked weak so it can be overridden
+ */
+
#include <stdio.h>
#include <string.h>
#include <core.h>
#include <fs.h>
#include <minmax.h>
#include <x86/cpu.h>
-#include "pxe.h"
+#include "core_pxe.h"
-void pxe_idle_init(void)
+void __attribute__((weak)) pxe_idle_init(void)
{
}
-void pxe_idle_cleanup(void)
+void __attribute__((weak)) pxe_idle_cleanup(void)
{
idle_hook_func = NULL;
}
diff --git a/core/fs/pxe/pxe.c b/core/fs/pxe/pxe.c
index 685fcc8f..a8f38559 100644
--- a/core/fs/pxe/pxe.c
+++ b/core/fs/pxe/pxe.c
@@ -5,7 +5,7 @@
#include <fs.h>
#include <fcntl.h>
#include <x86/cpu.h>
-#include "pxe.h"
+#include "core_pxe.h"
#include "thread.h"
#include "url.h"
#include "tftp.h"
@@ -99,33 +99,6 @@ static int gendotquad(char *dst, uint32_t ip)
}
/*
- * the ASM pxenv function wrapper, return 1 if error, or 0
- *
- */
-__export int pxe_call(int opcode, void *data)
-{
- static DECLARE_INIT_SEMAPHORE(pxe_sem, 1);
- extern void pxenv(void);
- com32sys_t regs;
-
- sem_down(&pxe_sem, 0);
-
-#if 0
- dprintf("pxe_call op %04x data %p\n", opcode, data);
-#endif
-
- memset(&regs, 0, sizeof regs);
- regs.ebx.w[0] = opcode;
- regs.es = SEG(data);
- regs.edi.w[0] = OFFS(data);
- call16(pxenv, &regs, &regs);
-
- sem_up(&pxe_sem);
-
- return regs.eflags.l & EFLAGS_CF; /* CF SET if fail */
-}
-
-/*
* mangle a filename pointed to by _src_ into a buffer pointed
* to by _dst_; ends on encountering any whitespace.
*
diff --git a/core/fs/pxe/tftp.c b/core/fs/pxe/tftp.c
index 594152b9..472988b4 100644
--- a/core/fs/pxe/tftp.c
+++ b/core/fs/pxe/tftp.c
@@ -1,6 +1,6 @@
#include <minmax.h>
#include <net.h>
-#include "pxe.h"
+#include "core_pxe.h"
#include "url.h"
#include "tftp.h"
diff --git a/core/fs/pxe/pxe.h b/core/include/core_pxe.h
index 19664f9b..19664f9b 100644
--- a/core/fs/pxe/pxe.h
+++ b/core/include/core_pxe.h
diff --git a/core/strcasecmp.c b/core/strcasecmp.c
deleted file mode 100644
index 2f7480d4..00000000
--- a/core/strcasecmp.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
- * strcasecmp.c
- */
-
-#include <string.h>
-#include <ctype.h>
-
-int strcasecmp(const char *s1, const char *s2)
-{
- return strncasecmp(s1, s2, -1);
-}
diff --git a/core/hello.c b/core/tests/hello.c
index bed7cb59..bed7cb59 100644
--- a/core/hello.c
+++ b/core/tests/hello.c