Compare commits

...

3 Commits

Author SHA1 Message Date
2c02da7eaf
build: add Clean, Build & Run tasks for vscode
Some checks failed
Build OS / Build Cross-Compiler & Toolchain (push) Has been cancelled
Build OS / Analyze (c-cpp) (push) Has been cancelled
Build OS / Build OS (push) Has been cancelled
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
2025-03-06 15:19:21 +00:00
8ef7a25728
ci: separate github pages deploy workflow
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
2025-03-06 13:46:52 +00:00
b4cc1d9e66
fix(kernel): crash on ACPI shutdown/reboot
The deletion of DriverManager invalidates "DriverManager->GlobalKeyboardInputReports" which results in a crash if other processes are waiting for keyboard input.

Signed-off-by: EnderIce2 <enderice2@protonmail.com>
2025-03-06 13:38:42 +00:00
5 changed files with 110 additions and 34 deletions

View File

@ -7,31 +7,6 @@ on:
branches: [ master ]
jobs:
deploydoc:
name: Deploy Documentation to GitHub Pages
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Doxygen
run: |
sudo apt update
sudo apt --no-install-recommends -y install doxygen make
- name: Generate Documentation
run: make doxygen
- name: Copy GitHub Pages Website
run: cp -r tools/website/* doxygen-doc/
- name: Deploy documentation
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: doxygen-doc
buildcompiler:
name: Build Cross-Compiler & Toolchain
runs-on: ubuntu-latest

33
.github/workflows/website.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Deploy Website
on:
push:
branches: [ master ]
paths:
- tools/website/**
- Kernel/include/interface/**
- Doxyfile
jobs:
deploydoc:
name: Deploy Website to GitHub Pages
runs-on: ubuntu-latest
steps:
- name: Checkout code 🛎️
uses: actions/checkout@v4
- name: Install Doxygen 📦
run: |
sudo apt update
sudo apt --no-install-recommends -y install doxygen make
- name: Generate Documentation 📚
run: make doxygen
- name: Copy GitHub Pages Website 📁
run: cp -r tools/website/* doxygen-doc/
- name: Deploy documentation 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: doxygen-doc

72
.vscode/tasks.json vendored
View File

@ -1,6 +1,78 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Clean",
"type": "shell",
"command": "make clean",
"isBackground": false,
"group": {
"kind": "build",
"isDefault": false
},
"presentation": {
"reveal": "never",
"panel": "shared"
},
"options": {
"cwd": "${workspaceFolder}/../",
"shell": {
"executable": "bash",
"args": [
"-c"
]
}
}
},
{
"label": "Build",
"type": "shell",
"command": "make build",
"isBackground": false,
"group": {
"kind": "build",
"isDefault": false
},
"presentation": {
"reveal": "always",
"panel": "shared"
},
"options": {
"cwd": "${workspaceFolder}/../",
"shell": {
"executable": "bash",
"args": [
"-c"
]
}
}
},
{
"label": "Run",
"type": "shell",
"command": "make qemu",
"isBackground": false,
"dependsOn": [
"Build"
],
"group": {
"kind": "test",
"isDefault": true
},
"presentation": {
"reveal": "always",
"panel": "shared"
},
"options": {
"cwd": "${workspaceFolder}/../",
"shell": {
"executable": "bash",
"args": [
"-c"
]
}
}
},
{
"label": "Build Bootloader",
"type": "shell",

View File

@ -187,6 +187,8 @@ namespace Driver
void FreeMemory(dev_t DriverID, void *Pointer, size_t Pages);
Manager();
private:
~Manager();
};

View File

@ -344,16 +344,10 @@ EXTERNC __no_stack_protector NIF void Entry(BootInfo *Info)
uintptr_t KernelStack = (uintptr_t)KernelStackAddress + STACK_SIZE - 0x10;
debug("Kernel stack: %#lx-%#lx", KernelStackAddress, KernelStack);
#if defined(__amd64__)
asmv("mov %0, %%rsp"
:
: "r"(KernelStack)
: "memory");
asmv("mov %0, %%rsp" : : "r"(KernelStack) : "memory");
asmv("mov $0, %rbp");
#elif defined(__i386__)
asmv("mov %0, %%esp"
:
: "r"(KernelStack)
: "memory");
asmv("mov %0, %%esp" : : "r"(KernelStack) : "memory");
asmv("mov $0, %ebp");
#else
#warning "Kernel stack is not set!"
@ -391,7 +385,7 @@ EXTERNC __no_stack_protector void BeforeShutdown(bool Reboot)
KPrint("Unloading all drivers");
if (DriverManager)
delete DriverManager, DriverManager = nullptr;
DriverManager->UnloadAllDrivers();
KPrint("Stopping scheduling");
if (TaskManager && !TaskManager->IsPanic())