Compare commits
8
Commits
64bit
..
fde535d7c7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fde535d7c7 | ||
|
|
1633a1e76c | ||
|
|
b20b88abfd | ||
|
|
80f30d8e69 | ||
|
|
587177f6bb | ||
|
|
badcf8df5e | ||
|
|
76eaf6c698 | ||
|
|
2fb50a5366 |
No files matched your search
+1
-4
@@ -1,8 +1,6 @@
|
||||
/lib/*.ppu
|
||||
/lib/*.a
|
||||
/lib/*.o
|
||||
/lib/x86_64/
|
||||
/bin/x86_64/
|
||||
/release/*.svg
|
||||
/release/*.iso
|
||||
/bin/*.bin
|
||||
@@ -17,9 +15,8 @@ localenv.json
|
||||
dockerout.txt
|
||||
AGENTS.md
|
||||
lessons_learnt.md
|
||||
/plan.md
|
||||
*.log
|
||||
wasuro
|
||||
src/core/core.version.pas
|
||||
site/*
|
||||
!site/.gitkeep
|
||||
!site/.gitkeep
|
||||
+3
-3
@@ -6,7 +6,7 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN dpkg --add-architecture i386
|
||||
RUN apt-get update && apt-get install -y \
|
||||
curl dos2unix wget git make nasm binutils xorriso grub-pc-bin gcc gcc-multilib \
|
||||
python3 python3-pip python3-pil fp-compiler && \
|
||||
python3 python3-pip python3-pil && \
|
||||
apt-get clean my room
|
||||
|
||||
RUN pip3 install --no-cache-dir --break-system-packages "mkdocs>=1.6,<2" mkdocs-material
|
||||
@@ -20,6 +20,6 @@ RUN curl -sL https://sourceforge.net/projects/freepascal/files/Linux/$FPC_VERSIO
|
||||
ADD https://raw.githubusercontent.com/fsaintjacques/semver-tool/master/src/semver /usr/bin/semver
|
||||
RUN chmod +x /usr/bin/semver
|
||||
WORKDIR /code
|
||||
# Sources are mounted at runtime; the CMD below normalizes build scripts.
|
||||
RUN find . -type f -print0 | xargs -0 dos2unix
|
||||
ENTRYPOINT ["/bin/bash", "-c"]
|
||||
CMD ["find toolchain -name '*.sh' -exec dos2unix {} + 2>/dev/null; find toolchain -name '*.sh' -exec chmod +x {} +; bash toolchain/compile.sh"]
|
||||
CMD ["find toolchain -name '*.sh' -exec dos2unix {} + 2>/dev/null; find toolchain -name '*.sh' -exec chmod +x {} +; bash toolchain/compile.sh"]
|
||||
+10
-10
@@ -22,12 +22,12 @@ type
|
||||
THeapPageHeader = memory.heap.THeapPageHeader;
|
||||
|
||||
procedure init;
|
||||
function kalloc(size : SizeUInt) : void;
|
||||
function klalloc(size : SizeUInt) : void;
|
||||
procedure klfree(address : PtrUInt);
|
||||
function kpalloc(address : PtrUInt) : void;
|
||||
function kalloc(size : uint32) : void;
|
||||
function klalloc(size : uint32) : void;
|
||||
procedure klfree(address : uint32);
|
||||
function kpalloc(address : uint32) : void;
|
||||
procedure kfree(area : void);
|
||||
function lmm_total_free : SizeUInt;
|
||||
function lmm_total_free : uint32;
|
||||
function lmm_page_count : uint32;
|
||||
|
||||
implementation
|
||||
@@ -37,22 +37,22 @@ begin
|
||||
memory.heap.init;
|
||||
end;
|
||||
|
||||
function kalloc(size : SizeUInt) : void; inline;
|
||||
function kalloc(size : uint32) : void; inline;
|
||||
begin
|
||||
kalloc := memory.heap.kalloc(size);
|
||||
end;
|
||||
|
||||
function klalloc(size : SizeUInt) : void; inline;
|
||||
function klalloc(size : uint32) : void; inline;
|
||||
begin
|
||||
klalloc := memory.heap.klalloc(size);
|
||||
end;
|
||||
|
||||
procedure klfree(address : PtrUInt); inline;
|
||||
procedure klfree(address : uint32); inline;
|
||||
begin
|
||||
memory.heap.klfree(address);
|
||||
end;
|
||||
|
||||
function kpalloc(address : PtrUInt) : void; inline;
|
||||
function kpalloc(address : uint32) : void; inline;
|
||||
begin
|
||||
kpalloc := memory.heap.kpalloc(address);
|
||||
end;
|
||||
@@ -62,7 +62,7 @@ begin
|
||||
memory.heap.kfree(area);
|
||||
end;
|
||||
|
||||
function lmm_total_free : SizeUInt; inline;
|
||||
function lmm_total_free : uint32; inline;
|
||||
begin
|
||||
lmm_total_free := memory.heap.lmm_total_free;
|
||||
end;
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -205,7 +205,7 @@ Key constants:
|
||||
- `DATA_OFFSET = $10000` — data area starts at 64 KB into each page
|
||||
- `LARGE_ALLOC_MAGIC = $FFFFFFFE` — sentinel for klalloc'd multi-page allocations
|
||||
|
||||
Interrupt safety: `pushfd; cli; pop saved_flags` (stack-balanced) + `arch.platform.cpu.unlock(saved_flags)`
|
||||
Interrupt safety: `pushfd; cli; pop saved_flags` (stack-balanced) + `restore_if(saved_flags)`
|
||||
inline procedure that only restores IF via `sti`, avoiding dangerous EFLAGS restoration
|
||||
(IOPL, NT, VM, AC bits that caused Bad-TSS on IRET).
|
||||
|
||||
@@ -256,7 +256,7 @@ list, fixes Search_Page, calls `free_page_at_address`). Skips Root_Page.
|
||||
|
||||
| Bug | Root Cause | Fix |
|
||||
|-----|-----------|-----|
|
||||
| Bad TSS exception during network processing | `pushfd`/`popfd` across separate asm blocks: FPC doesn't track ESP changes in asm, causing EFLAGS corruption (NT=1, IOPL wrong) → Bad TSS on IRET | Stack-balanced `pushfd; cli; pop local_var` + `arch.platform.cpu.unlock()` that only does `sti` if IF was set |
|
||||
| Bad TSS exception during network processing | `pushfd`/`popfd` across separate asm blocks: FPC doesn't track ESP changes in asm, causing EFLAGS corruption (NT=1, IOPL wrong) → Bad TSS on IRET | Stack-balanced `pushfd; cli; pop local_var` + `restore_if()` that only does `sti` if IF was set |
|
||||
| GPF from SSE MOVAPS in doublebuffer flush | `SIZE_PREFIX=4`→8 gave 8-byte alignment; `MOVAPS` needs 16-byte. `klalloc` returned `page+8` (not 16-aligned) | `SIZE_PREFIX=16` (4B size + 12B pad), klalloc header expanded to 16 bytes |
|
||||
| Pages never freed (historic) | `free_page` extracted wrong block index from PDE Address field | Fixed extraction to `Address SHR 10` — page freeing works for the first time |
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -17,10 +17,6 @@ Central initialization manager for all baked-in terminal programs and kernel-lev
|
||||
- `core.version`, `arch.x86.cpu`
|
||||
- `app.diskcmd`, `driver.bus.usb.core`, `app.diskutil`, `app.notepad`, `app.partcmd`, `app.volcmd`
|
||||
|
||||
## Boot Registration
|
||||
|
||||
Registered with `boot.mgr` as `app.mgr` at the `late` barrier.
|
||||
|
||||
## Functions and Procedures
|
||||
|
||||
### init
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
# app.wasm
|
||||
|
||||
WebAssembly VM backend initialiser.
|
||||
|
||||
## Overview
|
||||
|
||||
This unit initialises the Wasuro WebAssembly virtual machine backend. It wires up the VM's character output to the syslog interface and calls the main `wasm_init` entry point.
|
||||
|
||||
## Boot Registration
|
||||
|
||||
Registered with `boot.mgr` as `app.wasm` at the `final` barrier.
|
||||
|
||||
## Dependencies
|
||||
|
||||
- `boot.mgr`
|
||||
- `io.syslog`
|
||||
- `wasm.vm.io`
|
||||
- `wasm`
|
||||
|
||||
## Procedures
|
||||
|
||||
### init
|
||||
|
||||
```pascal
|
||||
procedure init;
|
||||
```
|
||||
|
||||
Sets the WASM VM's write-character callback to `io.syslog.logchar` and calls `wasm.wasm_init` to initialise the VM runtime.
|
||||
@@ -13,10 +13,6 @@ This unit probes the processor using the CPUID instruction to discover the vendo
|
||||
- `driver.timer.rtc`
|
||||
- `io.stdio`
|
||||
|
||||
## Boot Registration
|
||||
|
||||
Registered with `boot.mgr` as `arch.x86.cpu` at the `early` barrier.
|
||||
|
||||
## Types
|
||||
|
||||
### TCapabilities_Old / PCapabilities_Old
|
||||
|
||||
@@ -10,10 +10,6 @@ This unit defines the GDT data structures and provides procedures to set individ
|
||||
|
||||
- `io.syslog`
|
||||
|
||||
## Boot Registration
|
||||
|
||||
Registered with `boot.mgr` as `arch.x86.gdt` at the `early` barrier.
|
||||
|
||||
## Types
|
||||
|
||||
### TGDT_Entry / PGDT_Entry
|
||||
|
||||
@@ -12,10 +12,6 @@ This unit defines the 256-entry IDT used by the x86 interrupt system. It provide
|
||||
- `arch.x86.util`
|
||||
- `io.syslog`
|
||||
|
||||
## Boot Registration
|
||||
|
||||
Registered with `boot.mgr` as `arch.x86.idt`, depending on `arch.x86.gdt`.
|
||||
|
||||
## Constants
|
||||
|
||||
### ISR_RING_0
|
||||
|
||||
@@ -12,10 +12,6 @@ This unit reinitialises and remaps the two 8259A Programmable Interrupt Controll
|
||||
- `arch.x86.util`
|
||||
- `io.syslog`
|
||||
|
||||
## Boot Registration
|
||||
|
||||
Registered with `boot.mgr` as `arch.x86.irq`, depending on `arch.x86.idt`.
|
||||
|
||||
## Functions and Procedures
|
||||
|
||||
### init
|
||||
|
||||
@@ -6,10 +6,6 @@ ISR driver initialisation stub.
|
||||
|
||||
This is a minimal stub unit that satisfies compile-time dependencies on an ISR initialisation entry point. The `init` procedure body is empty; actual ISR handler registration and IDT gate setup are performed by `arch.x86.isr.mgr` and the individual handler units in the `isr/` and `fault/` subdirectories.
|
||||
|
||||
## Boot Registration
|
||||
|
||||
Registered with `boot.mgr` as `asuro.x86.isr`, depending on glob `driver.storage.*.mgr` (waits for all matching entries).
|
||||
|
||||
## Functions and Procedures
|
||||
|
||||
### init
|
||||
|
||||
@@ -12,10 +12,6 @@ This unit acts as the glue layer between the x86 interrupt subsystem and the arc
|
||||
- `arch.x86.util` (implementation)
|
||||
- `arch.x86.isr.types` (implementation)
|
||||
|
||||
## Boot Registration
|
||||
|
||||
Registered with `boot.mgr` as `arch.x86.panic`, depending on glob `driver.video*` (waits for all matching entries).
|
||||
|
||||
## Functions and Procedures
|
||||
|
||||
### init
|
||||
|
||||
@@ -22,10 +22,6 @@ A minimal TSS is installed in GDT gate 5 so the CPU can locate the ring-0 stack
|
||||
- `arch.x86.idt`
|
||||
- `arch.x86.isr.types`
|
||||
|
||||
## Boot Registration
|
||||
|
||||
Registered with `boot.mgr` as `arch.x86.v86` at the `early` barrier.
|
||||
|
||||
## Constants
|
||||
|
||||
| Constant | Value | Description |
|
||||
|
||||
@@ -28,10 +28,6 @@ This unit is the single entry point for registering all x86 CPU exception handle
|
||||
- `arch.x86.fault.snpe`
|
||||
- `arch.x86.fault.uie`
|
||||
|
||||
## Boot Registration
|
||||
|
||||
Registered with `boot.mgr` as `arch.x86.fault`, depending on `arch.x86.isr.mgr`.
|
||||
|
||||
## Functions and Procedures
|
||||
|
||||
### init
|
||||
|
||||
@@ -18,10 +18,6 @@ Each ISR stub is declared with the Free Pascal `interrupt` directive, which caus
|
||||
- `io.syslog` (implementation)
|
||||
- `arch.x86.isr.ioapic` (implementation)
|
||||
|
||||
## Boot Registration
|
||||
|
||||
Registered with `boot.mgr` as `arch.x86.isr.mgr`, depending on `arch.x86.irq`.
|
||||
|
||||
## Constants
|
||||
|
||||
`MAX_HOOKS` is imported from `arch.x86.isr.types` and defines the maximum number of callbacks per vector.
|
||||
|
||||
@@ -16,10 +16,6 @@ During initialisation, the Multiboot memory map is walked to populate `PhysPrese
|
||||
- `core.util`
|
||||
- `arch.x86.util`
|
||||
|
||||
## Boot Registration
|
||||
|
||||
Registered with `boot.mgr` as `arch.x86.memory.physical`, depending on `arch.x86.idt`.
|
||||
|
||||
## Constants
|
||||
|
||||
| Constant | Value | Description |
|
||||
|
||||
@@ -17,10 +17,6 @@ During `init`, the current page directory loaded by the bootloader is adopted as
|
||||
- `debug.tracer`
|
||||
- `memory.heap` (implementation)
|
||||
|
||||
## Boot Registration
|
||||
|
||||
Registered with `boot.mgr` as `arch.x86.memory.virtual`, depending on `arch.x86.memory.physical`.
|
||||
|
||||
## Types
|
||||
|
||||
### TPageDirEntry / PPageDirEntry
|
||||
|
||||
Loaded 20 of 263 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user