Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ed5674868 | ||
|
|
e57758c1db | ||
|
|
5a3eac0eff | ||
|
|
4813b2f664 | ||
|
|
055cb5af6f | ||
|
|
d1ad6042c1 |
2
.github/workflows/qa.yml
vendored
2
.github/workflows/qa.yml
vendored
@@ -9,4 +9,4 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
# Executes "typos ."
|
||||
- uses: crate-ci/typos@v1.29.4
|
||||
- uses: crate-ci/typos@v1.29.7
|
||||
|
||||
@@ -113,10 +113,12 @@ Editor control options:
|
||||
*Locally assignable (non protocol specific) options* are:
|
||||
|
||||
* `comment` - An optional comment string that will be displayed by the bootloader on the menu when an entry is selected.
|
||||
* `protocol` - The boot protocol that will be used to boot the kernel/executable. Valid protocols are: `linux`, `limine`, `multiboot` (or `multiboot1`), `multiboot2`, `efi_chainload`, `bios_chainload`, and `chainload_next`.
|
||||
* `protocol` - The boot protocol that will be used to boot the kernel/executable. Valid protocols are: `linux`, `limine`, `multiboot` (or `multiboot1`), `multiboot2`, `efi`, `bios`, and `chainload_next`.
|
||||
* `cmdline` - The command line string to be passed to the kernel/executable. Can be omitted.
|
||||
* `kernel_cmdline` - Alias of `cmdline`.
|
||||
|
||||
Note: `uefi` and `efi_chainload` are aliases of the `efi` protocol option. `bios_chainload` is an alias of the `bios` protocol option.
|
||||
|
||||
*Locally assignable (protocol specific) options* are:
|
||||
|
||||
* Linux protocol:
|
||||
|
||||
@@ -103,7 +103,7 @@ if ! test -f version; then
|
||||
clone_repo_commit \
|
||||
https://github.com/mintsuki/flanterm.git \
|
||||
common/flanterm \
|
||||
6f4e92ed8f7202bda3a53e28fd527f2f997bbb5c
|
||||
201100c968ad6db4f38632f9b6c3544854897788
|
||||
|
||||
download_by_hash \
|
||||
https://github.com/nothings/stb/raw/5c205738c191bcb0abc65c4febfa9bd25ff35234/stb_image.h \
|
||||
|
||||
@@ -1212,9 +1212,12 @@ noreturn void boot(char *config) {
|
||||
} else if (!strcmp(proto, "chainload_next")) {
|
||||
chainload_next(config, cmdline);
|
||||
#if defined (BIOS)
|
||||
} else if (!strcmp(proto, "bios_chainload")) {
|
||||
} else if (!strcmp(proto, "bios_chainload")
|
||||
|| !strcmp(proto, "bios")) {
|
||||
#elif defined (UEFI)
|
||||
} else if (!strcmp(proto, "efi_chainload")) {
|
||||
} else if (!strcmp(proto, "efi_chainload")
|
||||
|| !strcmp(proto, "efi")
|
||||
|| !strcmp(proto, "uefi")) {
|
||||
#endif
|
||||
chainload(config, cmdline);
|
||||
}
|
||||
|
||||
@@ -204,7 +204,8 @@ noreturn void chainload(char *config, char *cmdline) {
|
||||
char *image_path = config_get_value(config, 0, "PATH");
|
||||
if (image_path == NULL) {
|
||||
image_path = config_get_value(config, 0, "IMAGE_PATH");
|
||||
} else {
|
||||
}
|
||||
if (image_path == NULL) {
|
||||
panic(true, "chainload: Image path not specified");
|
||||
}
|
||||
|
||||
|
||||
@@ -148,14 +148,36 @@ parking64:
|
||||
mov eax, 1
|
||||
xchg dword [rbx + (passed_info.booted_flag - smp_trampoline_start)], eax
|
||||
|
||||
xor eax, eax
|
||||
; Check for MONITOR/MWAIT support
|
||||
mov eax, 1
|
||||
xor ecx, ecx
|
||||
cpuid
|
||||
test ecx, (1 << 3)
|
||||
jnz .monitor_spin
|
||||
|
||||
.loop:
|
||||
lock xadd qword [rdi + 16], rax
|
||||
mov rax, qword [rdi + 16]
|
||||
test rax, rax
|
||||
jnz .out
|
||||
pause
|
||||
jmp .loop
|
||||
|
||||
.monitor_spin:
|
||||
mov rax, qword [rdi + 16]
|
||||
test rax, rax
|
||||
jnz .out
|
||||
lea rax, qword [rdi + 16]
|
||||
xor ecx, ecx
|
||||
xor edx, edx
|
||||
monitor
|
||||
mov rax, qword [rdi + 16]
|
||||
test rax, rax
|
||||
jnz .out
|
||||
xor eax, eax
|
||||
xor ecx, ecx
|
||||
mwait
|
||||
jmp .monitor_spin
|
||||
|
||||
.out:
|
||||
; Clear TLB
|
||||
mov rbx, cr3
|
||||
|
||||
Reference in New Issue
Block a user