Commit graph

11 commits

Author SHA1 Message Date
tkchia
b21842ed7a
[metal] Fix video mode filtering & frame buffer ref-counting (#889)
Co-authored-by: tkchia <tkchia-cosmo@gmx.com>
2023-09-06 03:41:07 -07:00
tkchia
e47c0cc929
[metal] Clean up code for getting pointer to struct mman (#828)
Co-authored-by: tkchia <tkchia-cosmo@gmx.com>
2023-06-11 10:32:39 -07:00
Justine Tunney
2aa044cb0c
Interalize msr.h 2023-03-05 16:12:11 -08:00
tkchia
ae365928c5
[metal] Minor corrections to constants for paging structures (#751) 2023-02-24 11:49:08 -08:00
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
tkchia
cb9a0466f1
Work towards zipos / open(argv[0]) on metal (#667) 2022-11-06 00:29:47 -07:00
tkchia
ecb2ef7c39
Start exploring graphical video modes for VGA console (#637) 2022-10-02 01:50:16 -07:00
tkchia
bc8532688b
Enable CPU exception handling w/ IDT & TSS (#640) 2022-09-29 14:43:08 -07:00
Justine Tunney
578cb21591 Add syscalls to Blinkenlights and fix bugs 2022-05-13 13:31:21 -07:00
Justine Tunney
40291c9db3 Improve signal handling and math
- Polyfill ucontext_t on FreeBSD/OpenBSD/NetBSD
- Add tests confirming signals can edit CPU state
- Work towards supporting ZIP filesystem on bare metal
- Add more tinymath unit tests for POSIX conformance
- Add X87 and SSE status flags to crash report
- Fix some bugs in blinkenlights
- Fix llvm build breakage
2021-02-25 18:33:33 -08:00
Justine Tunney
edd9297eba Support malloc() on bare metal
Your Actually Portable Executables now contains a simple virtual memory
that works similarly to the Linux Kernel in the sense that it maps your
physical memory to negative addresses. This is needed to support mmap()
and malloc(). This functionality has zero code size impact. For example
the MODE=tiny LIFE.COM executable is still only 12KB in size.

The APE bootloader code has also been simplified to improve readibility
and further elevate the elegance by which we're able to support so many
platforms thereby enhancing verifiability so that we may engender trust
in this bootloading process.
2021-02-24 00:53:24 -08:00
Renamed from ape/lib/pc.h (Browse further)