cosmopolitan/ape
tkchia 0da47c51de
[metal] Allow programs larger than 440 KiB to run in bare metal mode (#685)
* [metal] Copy program pages to extended memory at startup
* [metal] Reclaim base memory pages for later app use
* [metal] Load program pages beyond 1st 440 KiB to extended memory

o//examples/hellolua.com now runs correctly under QEMU (in
legacy BIOS mode).

* [metal] Place GDT in read/write segment

The CPU absolutely needs to alter the GDT when loading the
task register (via ltr).  To account for this, I move the
GDT into a read/write data section.  There is still a "rump"
read-only GDT in the text section that is used by the real
mode bootloader.

We also delay the loading of the task register (ltr) until
after the IDT and TSS are finally set up.

* [metal] Get examples/vga2.c serial output working for UEFI boot
* [metal] Get examples/vga2.c VGA output working for UEFI boot
* [metal] Allow munmap() to reclaim dynamically allocated pages
* Place TLS sections right after .text, not after embedded zip file

Co-authored-by: tkchia <tkchia-cosmo@gmx.com>
2022-12-17 17:51:20 -08:00
..
public Improve open source compatibility 2022-09-08 03:19:35 -07:00
ape.lds [metal] Allow programs larger than 440 KiB to run in bare metal mode (#685) 2022-12-17 17:51:20 -08:00
ape.mk Fix missing Makefile dependency 2022-11-06 01:01:34 -07:00
ape.S [metal] Allow programs larger than 440 KiB to run in bare metal mode (#685) 2022-12-17 17:51:20 -08:00
apeinstall.sh Introduce new jartsr=' ape prefix 2022-11-10 21:18:32 -08:00
apeuninstall.sh Introduce new jartsr=' ape prefix 2022-11-10 21:18:32 -08:00
config.h Improve memory safety 2021-10-13 17:27:13 -07:00
idata.internal.h Change support vector to Windows 8+ 2022-09-15 03:55:05 -07:00
loader-elf.S Rename LINUX to _HOSTLINUX etc. to reduce clashes (#655) 2022-10-10 20:31:25 -07:00
loader-macho.lds Write tests for new APE loader and fix bugs 2022-05-22 05:45:38 -07:00
loader-macho.S Rename LINUX to _HOSTLINUX etc. to reduce clashes (#655) 2022-10-10 20:31:25 -07:00
loader.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
loader.h Make some minor touchups for nightlies 2022-09-09 19:12:40 -07:00
loader.lds Add .PLEDGE/.CPU/.MEMORY/etc. to Landlock Make 1.2 2022-08-14 20:16:44 -07:00
macros.internal.h [metal] Fix bug: do not initialize IDT & TSS if unneeded (#654) 2022-10-10 20:54:46 -07:00
mz.ansi Initial import 2020-06-15 07:18:57 -07:00
notice.inc Initial import 2020-06-15 07:18:57 -07:00
relocations.h Optimize memory layout 2022-09-12 04:26:52 -07:00
sections.internal.h Work towards zipos / open(argv[0]) on metal (#667) 2022-11-06 00:29:47 -07:00