Compare commits
17
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd3bb1e016 | ||
|
|
7ed8012c7e | ||
|
|
e7f7325c54 | ||
|
|
516be28057 | ||
|
|
2d190c221a | ||
|
|
dd56ffbcb4 | ||
|
|
ee7dcd107b | ||
|
|
671c144ad5 | ||
|
|
8755f108f2 | ||
|
|
17ee64ba02 | ||
|
|
6383b35945 | ||
|
|
b9e6c53be2 | ||
|
|
abac1ce4a3 | ||
|
|
5628c1ddbf | ||
|
|
140d3d6d68 | ||
|
|
1ff6e7549d | ||
|
|
63f6c5ecc1 |
No files matched your search
@@ -17,6 +17,7 @@ steps:
|
|||||||
|
|
||||||
- name: compile
|
- name: compile
|
||||||
image: t3hn3rd/asuro-build:latest
|
image: t3hn3rd/asuro-build:latest
|
||||||
|
pull: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-image
|
- build-image
|
||||||
commands:
|
commands:
|
||||||
|
|||||||
@@ -20,3 +20,7 @@ wasuro
|
|||||||
src/core/core.version.pas
|
src/core/core.version.pas
|
||||||
site/*
|
site/*
|
||||||
!site/.gitkeep
|
!site/.gitkeep
|
||||||
|
/src/boot/dangling_units.inc
|
||||||
|
/lib/dangling/
|
||||||
|
.moderne
|
||||||
|
CLAUDE.md
|
||||||
+4
-4
@@ -1,4 +1,5 @@
|
|||||||
FROM ubuntu:latest
|
ARG RECIPES_IMAGE=t3hn3rd/moderne-asuro-recipes:0.1.1@sha256:eaf54188053511dad9c620a8fb98b0f50c41770cd49a0b3d71a0538386522011
|
||||||
|
FROM ${RECIPES_IMAGE}
|
||||||
|
|
||||||
VOLUME ["/code"]
|
VOLUME ["/code"]
|
||||||
|
|
||||||
@@ -6,8 +7,8 @@ ENV DEBIAN_FRONTEND=noninteractive
|
|||||||
RUN dpkg --add-architecture i386
|
RUN dpkg --add-architecture i386
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
curl dos2unix wget git make nasm binutils xorriso grub-pc-bin gcc gcc-multilib \
|
curl dos2unix wget git make nasm binutils xorriso grub-pc-bin gcc gcc-multilib \
|
||||||
python3 python3-pip && \
|
python3 python3-pip python3-pil && \
|
||||||
apt-get clean my room
|
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
RUN pip3 install --no-cache-dir --break-system-packages "mkdocs>=1.6,<2" mkdocs-material
|
RUN pip3 install --no-cache-dir --break-system-packages "mkdocs>=1.6,<2" mkdocs-material
|
||||||
|
|
||||||
@@ -20,6 +21,5 @@ 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
|
ADD https://raw.githubusercontent.com/fsaintjacques/semver-tool/master/src/semver /usr/bin/semver
|
||||||
RUN chmod +x /usr/bin/semver
|
RUN chmod +x /usr/bin/semver
|
||||||
WORKDIR /code
|
WORKDIR /code
|
||||||
RUN find . -type f -print0 | xargs -0 dos2unix
|
|
||||||
ENTRYPOINT ["/bin/bash", "-c"]
|
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"]
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
**/.git
|
||||||
|
**/.gradle
|
||||||
|
**/build
|
||||||
|
**/.moderne
|
||||||
|
wasuro
|
||||||
|
site
|
||||||
|
lib
|
||||||
|
release
|
||||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -17,6 +17,10 @@ Central initialization manager for all baked-in terminal programs and kernel-lev
|
|||||||
- `core.version`, `arch.x86.cpu`
|
- `core.version`, `arch.x86.cpu`
|
||||||
- `app.diskcmd`, `driver.bus.usb.core`, `app.diskutil`, `app.notepad`, `app.partcmd`, `app.volcmd`
|
- `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
|
## Functions and Procedures
|
||||||
|
|
||||||
### init
|
### init
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# 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,6 +13,10 @@ This unit probes the processor using the CPUID instruction to discover the vendo
|
|||||||
- `driver.timer.rtc`
|
- `driver.timer.rtc`
|
||||||
- `io.stdio`
|
- `io.stdio`
|
||||||
|
|
||||||
|
## Boot Registration
|
||||||
|
|
||||||
|
Registered with `boot.mgr` as `arch.x86.cpu` at the `early` barrier.
|
||||||
|
|
||||||
## Types
|
## Types
|
||||||
|
|
||||||
### TCapabilities_Old / PCapabilities_Old
|
### TCapabilities_Old / PCapabilities_Old
|
||||||
|
|||||||
@@ -10,6 +10,10 @@ This unit defines the GDT data structures and provides procedures to set individ
|
|||||||
|
|
||||||
- `io.syslog`
|
- `io.syslog`
|
||||||
|
|
||||||
|
## Boot Registration
|
||||||
|
|
||||||
|
Registered with `boot.mgr` as `arch.x86.gdt` at the `early` barrier.
|
||||||
|
|
||||||
## Types
|
## Types
|
||||||
|
|
||||||
### TGDT_Entry / PGDT_Entry
|
### TGDT_Entry / PGDT_Entry
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ This unit defines the 256-entry IDT used by the x86 interrupt system. It provide
|
|||||||
- `arch.x86.util`
|
- `arch.x86.util`
|
||||||
- `io.syslog`
|
- `io.syslog`
|
||||||
|
|
||||||
|
## Boot Registration
|
||||||
|
|
||||||
|
Registered with `boot.mgr` as `arch.x86.idt`, depending on `arch.x86.gdt`.
|
||||||
|
|
||||||
## Constants
|
## Constants
|
||||||
|
|
||||||
### ISR_RING_0
|
### ISR_RING_0
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ This unit reinitialises and remaps the two 8259A Programmable Interrupt Controll
|
|||||||
- `arch.x86.util`
|
- `arch.x86.util`
|
||||||
- `io.syslog`
|
- `io.syslog`
|
||||||
|
|
||||||
|
## Boot Registration
|
||||||
|
|
||||||
|
Registered with `boot.mgr` as `arch.x86.irq`, depending on `arch.x86.idt`.
|
||||||
|
|
||||||
## Functions and Procedures
|
## Functions and Procedures
|
||||||
|
|
||||||
### init
|
### init
|
||||||
|
|||||||
@@ -6,6 +6,10 @@ 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.
|
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
|
## Functions and Procedures
|
||||||
|
|
||||||
### init
|
### init
|
||||||
|
|||||||
@@ -12,6 +12,10 @@ This unit acts as the glue layer between the x86 interrupt subsystem and the arc
|
|||||||
- `arch.x86.util` (implementation)
|
- `arch.x86.util` (implementation)
|
||||||
- `arch.x86.isr.types` (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
|
## Functions and Procedures
|
||||||
|
|
||||||
### init
|
### init
|
||||||
|
|||||||
@@ -22,6 +22,10 @@ A minimal TSS is installed in GDT gate 5 so the CPU can locate the ring-0 stack
|
|||||||
- `arch.x86.idt`
|
- `arch.x86.idt`
|
||||||
- `arch.x86.isr.types`
|
- `arch.x86.isr.types`
|
||||||
|
|
||||||
|
## Boot Registration
|
||||||
|
|
||||||
|
Registered with `boot.mgr` as `arch.x86.v86` at the `early` barrier.
|
||||||
|
|
||||||
## Constants
|
## Constants
|
||||||
|
|
||||||
| Constant | Value | Description |
|
| Constant | Value | Description |
|
||||||
|
|||||||
@@ -28,6 +28,10 @@ This unit is the single entry point for registering all x86 CPU exception handle
|
|||||||
- `arch.x86.fault.snpe`
|
- `arch.x86.fault.snpe`
|
||||||
- `arch.x86.fault.uie`
|
- `arch.x86.fault.uie`
|
||||||
|
|
||||||
|
## Boot Registration
|
||||||
|
|
||||||
|
Registered with `boot.mgr` as `arch.x86.fault`, depending on `arch.x86.isr.mgr`.
|
||||||
|
|
||||||
## Functions and Procedures
|
## Functions and Procedures
|
||||||
|
|
||||||
### init
|
### init
|
||||||
|
|||||||
@@ -18,6 +18,10 @@ Each ISR stub is declared with the Free Pascal `interrupt` directive, which caus
|
|||||||
- `io.syslog` (implementation)
|
- `io.syslog` (implementation)
|
||||||
- `arch.x86.isr.ioapic` (implementation)
|
- `arch.x86.isr.ioapic` (implementation)
|
||||||
|
|
||||||
|
## Boot Registration
|
||||||
|
|
||||||
|
Registered with `boot.mgr` as `arch.x86.isr.mgr`, depending on `arch.x86.irq`.
|
||||||
|
|
||||||
## Constants
|
## Constants
|
||||||
|
|
||||||
`MAX_HOOKS` is imported from `arch.x86.isr.types` and defines the maximum number of callbacks per vector.
|
`MAX_HOOKS` is imported from `arch.x86.isr.types` and defines the maximum number of callbacks per vector.
|
||||||
|
|||||||
@@ -16,6 +16,10 @@ During initialisation, the Multiboot memory map is walked to populate `PhysPrese
|
|||||||
- `core.util`
|
- `core.util`
|
||||||
- `arch.x86.util`
|
- `arch.x86.util`
|
||||||
|
|
||||||
|
## Boot Registration
|
||||||
|
|
||||||
|
Registered with `boot.mgr` as `arch.x86.memory.physical`, depending on `arch.x86.idt`.
|
||||||
|
|
||||||
## Constants
|
## Constants
|
||||||
|
|
||||||
| Constant | Value | Description |
|
| Constant | Value | Description |
|
||||||
|
|||||||
@@ -17,6 +17,10 @@ During `init`, the current page directory loaded by the bootloader is adopted as
|
|||||||
- `debug.tracer`
|
- `debug.tracer`
|
||||||
- `memory.heap` (implementation)
|
- `memory.heap` (implementation)
|
||||||
|
|
||||||
|
## Boot Registration
|
||||||
|
|
||||||
|
Registered with `boot.mgr` as `arch.x86.memory.virtual`, depending on `arch.x86.memory.physical`.
|
||||||
|
|
||||||
## Types
|
## Types
|
||||||
|
|
||||||
### TPageDirEntry / PPageDirEntry
|
### TPageDirEntry / PPageDirEntry
|
||||||
|
|||||||
@@ -93,8 +93,44 @@ A bitpacked array of 8 Booleans.
|
|||||||
| FileRec | Internal file descriptor record |
|
| FileRec | Internal file descriptor record |
|
||||||
| TextRec | Internal text file record with buffer |
|
| TextRec | Internal text file record with buffer |
|
||||||
|
|
||||||
|
### INITFINAL Table Types
|
||||||
|
|
||||||
|
#### TInitFinalRec
|
||||||
|
|
||||||
|
```pascal
|
||||||
|
TInitFinalRec = packed record
|
||||||
|
InitProc : CodePointer;
|
||||||
|
FinalProc: CodePointer;
|
||||||
|
end;
|
||||||
|
```
|
||||||
|
|
||||||
|
A single entry in the compiler-generated INITFINAL table. `InitProc` points to the unit's `initialization` section code (or nil if the unit has no initialization section). `FinalProc` points to the `finalization` section code (or nil).
|
||||||
|
|
||||||
|
#### TInitFinalTable / PInitFinalTable
|
||||||
|
|
||||||
|
```pascal
|
||||||
|
TInitFinalTable = packed record
|
||||||
|
TableCount : longint;
|
||||||
|
Procs : array[1..1] of TInitFinalRec;
|
||||||
|
end;
|
||||||
|
```
|
||||||
|
|
||||||
|
The top-level INITFINAL table structure. `TableCount` is the number of entries. `Procs` is declared as a single-element array but the compiler generates `TableCount` entries (accessed via 1-based indexing up to `TableCount`).
|
||||||
|
|
||||||
|
#### TProcedure
|
||||||
|
|
||||||
|
`TProcedure = procedure` — Procedure type used to cast `CodePointer` values from the INITFINAL table before calling them.
|
||||||
|
|
||||||
## Variables
|
## Variables
|
||||||
|
|
||||||
|
### InitFinalTable
|
||||||
|
|
||||||
|
```pascal
|
||||||
|
var InitFinalTable : TInitFinalTable; external name 'INITFINAL';
|
||||||
|
```
|
||||||
|
|
||||||
|
The compiler-generated INITFINAL table. Contains one `TInitFinalRec` for every unit in the program that has an `initialization` or `finalization` section. Referenced by `fpc_initializeunits` to walk and call each unit's initialization code before `kmain` runs.
|
||||||
|
|
||||||
### AK_START / AK_END
|
### AK_START / AK_END
|
||||||
|
|
||||||
```pascal
|
```pascal
|
||||||
@@ -152,7 +188,7 @@ All `compilerproc` stubs are mapped to their standard `FPC_*` aliases:
|
|||||||
|
|
||||||
| Procedure | Alias | Description |
|
| Procedure | Alias | Description |
|
||||||
|-----------|-------|-------------|
|
|-----------|-------|-------------|
|
||||||
| fpc_initializeunits | FPC_INITIALIZEUNITS | No-op; boot sequence handles unit init |
|
| fpc_initializeunits | FPC_INITIALIZEUNITS | Walks the INITFINAL table and calls each unit's initialization procedure |
|
||||||
| fpc_do_exit | FPC_DO_EXIT | CLI + HLT |
|
| fpc_do_exit | FPC_DO_EXIT | CLI + HLT |
|
||||||
| fpc_handleerror | FPC_HANDLEERROR | Sets ErrorCode, CLI + HLT |
|
| fpc_handleerror | FPC_HANDLEERROR | Sets ErrorCode, CLI + HLT |
|
||||||
| fpc_rangeerror | FPC_RANGEERROR | HandleErrorInternal(201) |
|
| fpc_rangeerror | FPC_RANGEERROR | HandleErrorInternal(201) |
|
||||||
|
|||||||
Loaded 20 of 166 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user