Commit Graph

491 Commits

Author SHA1 Message Date
mintsuki 0f70361281 gop: Use ConOut to obtain GOP whenever possible 2022-11-14 08:10:19 +01:00
mintsuki e95df146df Revert "gop: Allow user to select which GOP to use in config. Addresses #233"
This reverts commit d82dc64b93.
2022-11-14 08:10:19 +01:00
mintsuki b10c5617c1 Revert "gop: Fix implicit declaration warning introduced in d82dc64b"
This reverts commit c477414c5c.
2022-11-14 08:10:19 +01:00
Ryan Cohen 937d2c379c readline: Fix command line scrolling and cursor wrap-around
Fixes `cursor_fwd` to wrap the cursor to the first column when it passes
the bottom right corner of the screen.

Fixes `readline` to update the command line's row position when the
cursor wrap-around causes the screen to scroll up.
2022-11-14 08:10:19 +01:00
mintsuki 76a5873369 gop: Fix implicit declaration warning introduced in d82dc64b 2022-11-12 00:54:30 +01:00
mintsuki f78243c375 gop: Allow user to select which GOP to use in config. Addresses #233 2022-11-12 00:54:30 +01:00
mintsuki 9ae0bcefc9 Revert "smp/x86: Free up trampoline memory after use"
This reverts commit ae771dd8a1.
2022-11-02 15:34:53 +01:00
mintsuki 88d99fa34b multiboot2: Support load_addr == -1 2022-10-30 15:02:07 +01:00
mintsuki 2fab5311d8 smp/x86: Free up trampoline memory after use 2022-10-30 15:02:07 +01:00
mintsuki 23081f06d5 pmm: Work around potential memmap data race in EFI init_memmap() 2022-10-17 06:45:45 +02:00
mintsuki f3357648ab pmm: Fix AllocatePages() call to take pages count; remove useless alignment check 2022-10-17 06:45:45 +02:00
mintsuki 7d0ef9ef24 pmm: Avoid throwing away big memory ranges that fail to AllocatePages() indiscriminately 2022-10-17 06:45:45 +02:00
mintsuki bda32f7325 linux: Revert 793d0293 2022-10-14 14:34:15 +02:00
mintsuki 8b1c1ef6e5 disk: Fix wrong parameter passed to ReadBlocks() 2022-10-14 07:45:10 +02:00
mintsuki 5d5f29ffeb misc: Minor cleanup after #216 2022-10-14 05:42:15 +02:00
czapek1337 2a4cbcecc0 uri: Add checksum validation 2022-10-14 05:42:15 +02:00
czapek1337 5a6cc57773 print: Specifier for printing URIs 2022-10-14 05:42:15 +02:00
mintsuki 9bf0d263ee gop: Do not zero default_res out erroneously 2022-10-14 05:42:15 +02:00
mintsuki 09941f905b limine: Add support for framebuffer modes listing 2022-10-14 05:42:15 +02:00
mintsuki 5e29b6574c file: Reimplement a1bcf3c0 without use-after-free bug 2022-10-14 05:42:15 +02:00
mintsuki bdce16444c misc: Update references to hardcoded directories 2022-10-14 05:42:15 +02:00
mintsuki 1eefb6b6a8 disk: UEFI: Add BLOCK_IO fallback for volume_from_efi_handle() 2022-10-14 05:42:15 +02:00
mintsuki ed238b7ccf disk: On UEFI, improve optical vs non-optical detection 2022-10-14 05:42:15 +02:00
mintsuki 0aa3bc05e2 elf: Add overlapping PHDR detection 2022-10-11 06:06:57 +02:00
mintsuki 9d1d910d9c disk: Only use BLOCK_IO as fallback to DISK_IO when determining optical 2022-10-09 11:09:27 +02:00
mintsuki 2e05e4ca40 disk: On BIOS, change how optical is determined 2022-10-09 11:09:27 +02:00
mintsuki 0744033703 limine: Fix bug which triggered on no-NX where wrong register was used for rd/wrmsr 2022-10-09 11:09:27 +02:00
mintsuki 17be311aeb menu: Add arrows to indicate overflow for many menu entries 2022-10-07 10:16:21 +02:00
mintsuki 42cc1d8e20 misc: Dynamically allocate EFI memmap copy 2022-10-07 10:16:21 +02:00
mintsuki 15737894cb menu: Properly handly high number of entries 2022-10-07 10:16:21 +02:00
mintsuki ea412cfae7 misc: Increase EFI_COPY_MAX_ENTRIES to 2048 2022-10-07 10:16:21 +02:00
mintsuki 4860f95539 limine/smp: Fix stack offset accidentally added twice 2022-10-06 19:20:06 +02:00
mintsuki 6733f194df menu: Add missing valid keys 2022-10-06 06:38:35 +02:00
mintsuki ff145eb511 term: Misc improvements for SERIAL=yes on EFI 2022-10-06 06:38:35 +02:00
mintsuki 33dac9b38a term: Unbreak textmode + serial combo 2022-10-06 06:38:35 +02:00
mintsuki 5bbda71da2 gterm: Prevent memory leak gterm_init() failure 2022-10-06 06:38:35 +02:00
mintsuki aca99ad790 limine: Fix NULL term dereference bug if gterm_init fails 2022-10-06 06:38:35 +02:00
mintsuki a76691a930 misc: Add limine subdir to stage3 and config search paths. Closes #225 2022-10-06 06:34:42 +02:00
czapek1337 6202148460 efi: Fallback to volume scan instead of panicking 2022-10-06 06:34:42 +02:00
czapek1337 6a8e4eb49a disk: Use BLOCK_IO instead of DISK_IO 2022-10-06 06:34:42 +02:00
czapek1337 e445555bab readline: Fallback to SystemTable->ConIn 2022-10-06 06:34:42 +02:00
mintsuki 9722827002 term: Better ensure term is not accessed when NULL 2022-10-05 15:05:17 +02:00
mintsuki 10df010029 limine: Do not panic if failing to set up terminal or framebuffer 2022-10-05 15:05:17 +02:00
mintsuki 194e60a3ba menu: Use fallback terminal instead of panicking on gterm_init() fail 2022-10-05 15:05:17 +02:00
mintsuki fc2fe1a3d2 limine: Fix bug where NULL term was accessed. Fixes #227 2022-10-05 15:05:17 +02:00
mintsuki d65d180c0d limine: Reimplement proper callback functionality 2022-10-04 22:22:31 +02:00
mintsuki dddcf34a8c term: Make term_notready() static 2022-10-04 22:22:31 +02:00
mintsuki 6f1e157cec term: Gate BIOS specific code behind ifdefs 2022-10-04 22:22:31 +02:00
mintsuki 7065967be3 term: Reimplement context control 2022-10-04 22:22:31 +02:00
mintsuki f5cdb5b900 term: Misc fixes and improvements 2022-10-04 22:22:31 +02:00
mintsuki 223ebc1932 term: Misc fixes and improvements 2022-10-04 22:22:31 +02:00
mintsuki 1c06055e6d term: Misc fixes and improvements 2022-10-04 22:22:31 +02:00
mintsuki 3cb47a9dd1 term: Add builtin font 2022-10-04 22:22:31 +02:00
mintsuki 68f9bdcdca term: Misc minor bug fixes 2022-10-04 22:22:31 +02:00
mintsuki c30dffd147 term: Tidy up VGA textmode wrapper code 2022-10-04 22:22:31 +02:00
mintsuki d442805bc0 term: Tidy up gterm wrapper code 2022-10-04 22:22:31 +02:00
mintsuki ad8151a6a6 term: Move to use external, portable terminal 2022-10-04 22:22:31 +02:00
mintsuki fc6e44c82c pmm: Misc bug fixes in pmm 2022-09-28 02:10:08 +02:00
mintsuki b42559b27a term: Misc bug fixes in fallback backends 2022-09-28 02:10:08 +02:00
mintsuki 14ef93ab24 term: Do not reset mode on UEFI fallback init 2022-09-27 06:57:10 +02:00
mintsuki e124fe4e7a multiboot: Fix warnings when building BIOS port 2022-09-27 06:57:10 +02:00
mintsuki a0810f9e13 multiboot: Allow for headless boots 2022-09-27 06:57:10 +02:00
mintsuki 4b4f3c9d68 pmm: Obtain raw memmap from untouched_memmap rather than EFI memmap. Addresses #222 and https://forum.puppylinux.com/viewtopic.php?t=6881 2022-09-27 06:57:10 +02:00
mintsuki 165b4d8f7a pmm: Keep first page on sanitiser call in get_raw_memmap() 2022-09-27 06:57:10 +02:00
mintsuki 9203b9cea4 pmm: Backport some other stuff reverted in 4a4409e1 2022-09-27 06:57:10 +02:00
mintsuki abcbff6ec1 pmm: Backport fa6f6077 and 74a3a1c6 2022-09-27 06:57:10 +02:00
mintsuki c381963592 pmm: Undo most of what was done between 85603ec8 and 74a3a1c6 2022-09-24 04:35:52 +02:00
mintsuki 4662a4d190 panic: Fix build on non-BIOS targets 2022-09-24 04:35:52 +02:00
mintsuki 4d7f1d5d1c term: Move more of it to stage 3 2022-09-24 04:35:52 +02:00
mintsuki 6b9ba912c6 Revert "linux/efi: Perform efi_memmap_size=0 workaround for 32 on 64 as well"
This reverts commit b9f41799b4.
2022-09-24 04:35:52 +02:00
mintsuki 23a63ef476 linux/efi: Perform efi_memmap_size=0 workaround for 32 on 64 as well 2022-09-22 18:18:06 +02:00
mintsuki c2ed0bcbd1 config: On UEFI, scan the volume containing the EFI executable first. Addresses #219 2022-09-22 18:18:06 +02:00
mintsuki 93ebf613e9 menu: Fix regression when pressing a key during quiet timeout wait. Addresses in part #220 2022-09-20 23:57:29 +02:00
mintsuki 24e4e61394 build: Fix issue introduced in 87e09dba 2022-09-20 10:10:00 +02:00
mintsuki 96ceab3c72 misc: Fix bugs introduced in 3181293a 2022-09-20 10:10:00 +02:00
mintsuki a37391ce6d disk/efi: Improve firmware error handling 2022-09-20 10:10:00 +02:00
mintsuki ba1dfc1bbc build: Plug back limine_stage2only.elf into the BIOS build system 2022-09-20 10:10:00 +02:00
mintsuki f4b1996701 menu: Avoid reinitialising fallback terminal on first runs 2022-09-18 22:34:53 +02:00
mintsuki 62fa8a90af smp: Fix indentation 2022-09-18 22:34:53 +02:00
mintsuki ff33b6fbb6 efi: Limit amount of tries to get boot volume from handle 2022-09-18 22:34:53 +02:00
mintsuki b09b816ee2 misc: Fix up some no_unwind globals 2022-09-18 22:34:53 +02:00
mintsuki 710757420b misc: Misc stage 2 related improvements 2022-09-18 22:34:53 +02:00
mintsuki 3181293a04 misc: Improve printing effectively on panics and errors 2022-09-18 22:34:53 +02:00
mintsuki 8773c36ab6 multiboot2: Fix broken EFI memmap length calculation 2022-09-16 11:50:47 +02:00
mintsuki 98c9b4ea2d efi: Ensure panics are (hopefully) always visible 2022-09-16 11:50:47 +02:00
mintsuki 14181a9eba efi/disk: Use blake2b to calculate unique sector hash 2022-09-16 11:50:47 +02:00
czapek1337 f369a7e04f crypt: Implement blake2b hash function 2022-09-16 11:50:47 +02:00
mintsuki 1ac9fa6ae1 smp: Fix aarch64 issue introduced in 0f04f686 2022-09-15 03:17:49 +02:00
mintsuki 5b5f768360 smp: Remove hacks needed for stivale 2022-09-15 03:17:49 +02:00
mintsuki 08b004600a build: Fix stage2 map 2022-09-15 03:17:49 +02:00
Andy-Python-Programmer d56ff6f7cb DTB: ensure the `dtb_ptr` is an HHDM address
* Ensure that the `dtb_ptr` is an HHDM address
* If DTB is not found, do not generate the response

Signed-off-by: Andy-Python-Programmer <andypythonappdeveloper@gmail.com>
2022-09-12 12:09:16 +02:00
mintsuki fe647a067f elf: Fix issue where KASLR was applied to non reloc executables 2022-09-12 12:09:16 +02:00
mintsuki 831af39ed4 Revert "Revert "elf: General refactor""
This reverts commit 4c8516c6a6.
2022-09-12 12:09:16 +02:00
mintsuki 4c8516c6a6 Revert "elf: General refactor"
This reverts commit 3452e492bb.
2022-09-11 17:47:49 +02:00
mintsuki 3452e492bb elf: General refactor 2022-09-11 10:05:45 +02:00
mintsuki 5566278736 textmode: Load notready() *before* setting term_{cols,rows} 2022-09-05 03:14:16 +02:00
mintsuki 86ebf0b453 term: Initial support for 256-color palette 2022-09-05 00:49:33 +02:00
mintsuki 67498a6967 term: Initial support for RGB 2022-09-04 06:39:13 +02:00
mintsuki b2a390c4d5 misc: Update wallpaper 2022-09-04 03:57:32 +02:00
mintsuki 07c446f293 build: Updates for new limine-efi 2022-09-02 11:01:13 +02:00
mintsuki 5e06a79fdc limine: Do not set NX bit in page tables if NX not available 2022-09-02 03:41:25 +02:00
mintsuki d3385da3e3 limine: Make NX feature not mandatory 2022-09-02 03:31:22 +02:00
mintsuki c44f514738 misc: Rename UEFI and BIOS define macros 2022-09-02 02:29:12 +02:00
mintsuki 27711e3c27 fs: Add case insensitive fopen() for config and system files 2022-09-02 01:12:13 +02:00
mintsuki 4702e912be gensyms: Do not escape # in substitution string 2022-09-01 12:20:47 +02:00
mintsuki fb372e6db7 pmm: Make code to reserve page 0 uniform between BIOS and UEFI 2022-09-01 04:58:18 +02:00
mintsuki 9b3570f043 bios/disk: Fix always-true comparison warning 2022-09-01 04:42:49 +02:00
mintsuki 1b630659d9 bios/disk: Add manual sector size detection code 2022-09-01 04:22:30 +02:00
mintsuki c34db50cfd build: Small formatting fix 2022-08-31 00:40:59 +02:00
mintsuki 21fa4a9616 build: Update for new cross-detect 2022-08-29 21:52:59 +02:00
mintsuki 44df23c81a build: Update linker and compiler flags 2022-08-28 23:24:47 +02:00
mintsuki c528068ac7 misc: Fix improper panic() calls 2022-08-28 20:16:27 +02:00
mintsuki 6631b595f2 build: Pretty up find calls 2022-08-27 05:09:42 +02:00
mintsuki 07080dcbc2 misc: blib.h -> misc.h 2022-08-26 23:44:47 +02:00
mintsuki 65671d73c7 misc: Update several macros 2022-08-26 23:30:00 +02:00
mintsuki 16c5e98120 misc: Update ALIGN macros 2022-08-26 21:34:40 +02:00
mintsuki a91abf2c2a build: Handle -no-pie bug with cross-detect 2022-08-26 10:23:35 +02:00
mintsuki fde0447802 fs: Drop NTFS support 2022-08-26 00:20:27 +02:00
mintsuki 5f7cb5c83f build: Properly set target arch on objcopy to ELF 2022-08-25 22:07:50 +02:00
mintsuki 94eb0e2ae2 entry/uefi: Only perform 4GiB check if on x86_64 2022-08-25 21:53:48 +02:00
mintsuki ed0c32f20a entry/uefi: Abort if loaded above 4GiB. Fix #206 2022-08-25 21:50:37 +02:00
mintsuki a89b843673 Revert "bios: Get rid of self-modifying interrupt call code"
This reverts commit 5e0f85727a.
2022-08-25 20:13:42 +02:00
Kacper Słomiński 489450d602 common: fix alignment of variable in AArch64 menu thunk
Fixes a problem that sometimes occured due to a specific relocation
being used for the misaligned variable.
2022-08-24 21:15:37 +02:00
mintsuki 04a6389fd8 build: Improvements and updates for new limine-efi 2022-08-23 01:41:18 +02:00
mintsuki 2460b33f9c build: Misc build system improvements 2022-08-23 00:21:09 +02:00
mintsuki a17edef7bc ext: Fix next_cwd_len calculation 2022-08-21 07:15:48 +02:00
mintsuki 45f65b6b40 ext: Fix abs-path related bug with symlink handling 2022-08-21 01:10:58 +02:00
mintsuki fe637af458 ext: Properly follow relative symlinks 2022-08-21 00:50:12 +02:00
Kacper Słomiński e1f6ac8860
Initial AArch64 port (#205)
* Initial aarch64 port

* Enable chainload on aarch64

No changes necessary since it's all UEFI anyway.

* Add specification for Limine protocol for aarch64

* PROTOCOL: Specify state of information in DT /chosen node

* common: Add spinup code for aarch64

* common: Port elf and term to aarch64

* common: Port vmm to aarch64

Also prepare to drop VMM_FLAG_PRESENT on x86.

* protos: Port limine boot protocol to aarch64

Also drop VMM_FLAG_PRESENT since we never unmap pages anyway.

* test: Add DTB request

* PROTOCOL: Port SMP request to aarch64

* cpu: Add cache maintenance functions for aarch64

* protos/limine, sys: Port SMP to aarch64

Also move common asm macros into a header file.

* test: Start up APs

* vmm: Unify get_next_level and implement large page splitting

* protos/limine: Map framebuffer using correct caching mode on AArch64

* CI: Fix GCC build for aarch64

* entry, menu: Replace uses of naked attribute with separate asm file

GCC does not understand the naked attribute on aarch64, and didn't
understand it for x86 in older versions.
2022-08-18 17:32:54 +02:00
mintsuki 664a872dda editor: Add TERM_CONFIG_OVERRIDE to syntax highlighting 2022-08-15 18:40:52 +02:00
mintsuki 5f1680acc1 build: Misc improvements to makefiles 2022-08-15 17:41:04 +02:00
mintsuki 1e9ac0ac01 build: Update makefiles to not use INTERNAL variables 2022-08-15 16:37:31 +02:00
mintsuki 17e23dd7f6 build: Discard .eh_frame section in linker scripts to fix potential GNU toolchain miscompilation 2022-08-15 16:22:56 +02:00
mintsuki fb2a6e1f29 limine: Remove stray external symbol declaration 2022-08-14 15:31:53 +02:00
mintsuki 997c787c16 term/limine: Allow overriding terminal config in entry 2022-08-14 15:09:57 +02:00
mintsuki 11b56c39f0 config: Only make keys global if before first entry 2022-08-14 14:45:20 +02:00
mintsuki 73f958e92e Revert "Revert "gensyms: Use as instead of nasm""
This reverts commit b3ca8ae9a2.
2022-08-13 20:32:06 +02:00
mintsuki 7ade45b230 misc: struct e820_entry_t -> struct memmap_entry 2022-08-13 19:54:49 +02:00
mintsuki 71fd2d2516 pmm: Properly handle memory map entries that cross 4GiB on UEFI 2022-08-13 17:52:01 +02:00
Dmytro Bagrii b205ff9bd8 misc: Fix GRAPHICS config option recognition 2022-08-13 04:30:58 +03:00
mintsuki 93f8d011ff multiboot2: Fix bug where old ACPI tag would not get passed if RSDP rev == 0 2022-08-12 23:33:28 +02:00
mintsuki 74a3a1c6b6 pmm: General tyding up of pmm code (2) 2022-08-11 20:20:16 +02:00
mintsuki fa6f607769 pmm: General tyding up of pmm code 2022-08-11 09:41:07 +02:00
mintsuki 7a9a04d72f build: Always place -fno-pie before -fno-pic 2022-08-09 15:22:15 +02:00
mintsuki 4422ebd61c build: Get proper mkdir -p from autoconf 2022-08-08 22:00:25 +02:00
mintsuki e3c4fbea25 config: Remove stray include 2022-08-06 20:21:56 +02:00
mintsuki 793d029370 linux: Only make framebuffer EFI and 64-bit if above 4GiB 2022-08-06 19:47:46 +02:00
mintsuki 367bf3e5e9 linux: Find compromise for 32-bit EFI boot 2022-08-04 14:16:42 +02:00
mintsuki 4b55b45382 pmm: Fix a handful of GCC warnings 2022-08-04 13:04:55 +02:00
mintsuki 0ef0c3adc5 linux, pmm: Get a boot with 32-bit UEFI. Addresses #185 2022-08-04 12:56:46 +02:00