Commit Graph

2771 Commits

Author SHA1 Message Date
R Aadarsh eaf50894aa * Do not use KernelMapper for ACPI SDT mapping
* Clarify doc comment
2026-07-18 17:25:02 +05:30
Wildan M 4251102f0b Partially solve missing wakeups after separate timers 2026-07-17 20:02:37 -06:00
Luiz Fernando Becher de Araujo eb51898177 AArch64: Map diagnostic UART and root GIC MMIO
Device memory registration currently stops when /soc or its ranges
property is absent and only considers direct /soc children. Some
devicetrees place the interrupt controller at the root and the
selected UART below nested buses.

Register the exact translated range of the diagnostic UART and the
register ranges of root interrupt controllers. Use the hierarchical
translator when initializing GICv2 and GICv3 registers.

This keeps the translation change limited to the selected console
and interrupt controllers while preserving the existing behavior for
other devices.

Signed-off-by: Luiz Fernando Becher de Araujo <luiz.becher.araujo@gmail.com>
2026-07-17 20:00:40 -06:00
Luiz Fernando Becher de Araujo 20800bd2c7 DTB: Translate MMIO addresses through nested buses
The existing MMIO helper only translates addresses through the /soc
ranges property. This does not handle devices below nested buses,
such as the UART in the devicetree used by the Meson boards.

Add an address translator that walks each ancestor bus and applies
its ranges property until reaching the CPU address space. Treat
empty ranges as an identity mapping and reject regions that cross a
range boundary.

Keep the existing helper’s behavior unchanged for other devices to
limit the scope of the behavioral change.

Add tests for nested buses, empty ranges, exact range boundaries,
and regions crossing a boundary.

Signed-off-by: Luiz Fernando Becher de Araujo <luiz.becher.araujo@gmail.com>
2026-07-17 20:00:40 -06:00
Wildan M cd369993d9 Fix EOF using EVENT_TIMEOUT_ID 2026-07-17 19:56:28 -06:00
Ibuki Omatsu 37ffa2e29e refactor: Allow refreshing filetable data using dup2 to fix O_CLOEXEC 2026-07-17 19:49:20 -06:00
Wildan M e100dd5a71 Fix RISCV init memory 2026-07-16 16:04:31 +07:00
Akshit Gaur f5fe18b23c Finish the work on separating timers 2026-07-16 07:48:54 -06:00
Wildan M ee4a5602a6 Implement make install and test targets 2026-07-16 01:27:47 +07:00
R Aadarsh a5ae1ff3b0 Use Mutex for round robin index allocation 2026-07-12 12:56:51 +05:30
R Aadarsh 00cfa2d225 Add support for querying dom-node map 2026-07-11 08:33:17 +05:30
MJ Pooladkhay 985bc2623f Fix a race in get_round_robin_index. 2026-07-10 18:13:36 -06:00
R Aadarsh bb06db93ce Add support for querying numa info from userspace 2026-07-10 15:46:02 +05:30
R Aadarsh fbfe439451 Fix riscv and x86 compilation failure 2026-07-09 19:26:01 +05:30
R Aadarsh bfbbec47a9 Create seperate free lists for each NUMA memory regions 2026-07-08 21:33:02 +05:30
R Aadarsh 621a0f4be9 * Split free areas at NUMA memory boundaries
* Fix incorrect name usage in ACPI ARM parsing code
2026-07-08 21:32:37 +05:30
Akshit Gaur 38642377f3 Separate timers 2026-07-07 06:43:41 -06:00
4lDO2 c83b38eb70 Remove obsolete TODO, run rustfmt. 2026-07-06 19:30:05 +02:00
R Aadarsh 4d5d36d44e Extract code that is common to both x86 and ARM to srat::init 2026-07-05 20:16:00 +05:30
R Aadarsh 35340a80c4 * Add ACPI-NUMA parsing code for ARM
* Fix bug in the x86 code that caused incorrect cpu-node mapping

* Remove the usage of page mappers. Instead use the already existing
  linear mapping
2026-07-05 15:01:48 +05:30
R Aadarsh cb88ed59a2 Parse ACPI tables for NUMA information without allocating from the heap 2026-07-03 20:19:46 +05:30
Wildan M 372cd19b6f Remove irq from handles on close 2026-07-02 08:41:11 +07:00
R Aadarsh aa7e7d2f44 Fix the bug in RxsdtIter that caused u32 pointers to be used regardless of ACPI table kind 2026-07-01 10:36:07 -06:00
R Aadarsh a03c545f3c Fix build failure for ARM 2026-07-01 10:36:07 -06:00
R Aadarsh a2a3df33c6 Split acpi::init to perform two stage initialisation 2026-07-01 10:36:07 -06:00
Ibuki Omatsu 6c3d5d28c6 refactor: Move fd allocation logic into userspace 2026-07-01 08:02:47 -06:00
R Aadarsh 8171dc616b Fix panic due to using uninitialised NUMA_NODES 2026-06-21 14:30:07 +05:30
R Aadarsh 2ad76496c4 * Store addresses as pointers
* Remove lots of unsafe code by initialising in the closure passed to
  `call_once`

* Remove `NUMBER_OF_DOMAINS` as size can always be inferred from the
  hashmap's len
2026-06-21 14:03:49 +05:30
R Aadarsh 4106dcbbfa Gate behind a feature flag 2026-06-21 14:03:49 +05:30
R Aadarsh 969c905d8e Account for the case when distance information is not available 2026-06-21 14:03:49 +05:30
R Aadarsh 9ecc75029c * Correctly put cpus and memories for adoption
* Test on x86_64 (works)
2026-06-21 14:03:49 +05:30
R Aadarsh 16c59588b0 * Fix endianness
* Remove ITS affinity and numa
2026-06-21 14:03:49 +05:30
R Aadarsh ee2a61088e * Parse SLIT for distance information
* Order by distance, reorganise domains into nodes
2026-06-21 14:03:49 +05:30
R Aadarsh 63d1171ffb Initial commit 2026-06-21 14:03:49 +05:30
Wildan M 002fff546d Clear cloexec flag on Dup2 2026-06-20 06:35:01 +07:00
Wildan M ed31b800c4 Revert "Use weak context for Proc" 2026-06-19 17:36:41 +07:00
Wildan M 622a4fb3cd Solve context leak when switching 2026-06-19 17:33:46 +07:00
Wildan M 101f090ef9 Fmt 2026-06-19 16:50:14 +07:00
Akshit Gaur b93260ed2d Migrating run_queue to BTreeMap 2026-06-18 10:39:33 +05:30
4lDO2 56947e1a0f Revert drop of kstack in exit_this_context. 2026-06-04 13:37:57 +02:00
4lDO2 bd6d9acd3c Compile on other arches. 2026-06-03 19:06:12 +02:00
4lDO2 c27568e1fe profiling: allow walking across syscall boundaries 2026-06-03 19:01:35 +02:00
4lDO2 42613ddc06 WIP: simultaneous NMI-based user+kernel profiling. 2026-06-03 19:01:35 +02:00
R Aadarsh f8bc19747a Make necessary changes to the kernel in order for relibc to support posix_spawn and posix_spawnp
* `syscall::sendfd`, now, when called with a `ContextHandle::FileTable` adds the fd to the filetable removing it from the calling process's filetable

* Files can now be added to, removed from another process, and can be duplicated using `ProcScheme::kcall`

* Files of another process with the flag O_CLOEXEC can now be closed by using `kcall`
2026-06-03 15:29:02 +05:30
4lDO2 8011f3f648 Simplify acpi scheme. 2026-06-02 16:23:08 +02:00
4lDO2 6fc2d32497 Remove redundant methods from KernelScheme. 2026-06-02 11:24:37 +02:00
4lDO2 da3d235af5 remove syscall debug for removed syscalls 2026-06-02 11:24:37 +02:00
4lDO2 3e210ff169 Remove 5 obsolete syscalls. 2026-06-02 11:24:37 +02:00
Wildan M 8701e8165b Fix compilation for aarch64 after rust update 2026-05-31 06:55:02 +07:00
4lDO2 cee451af38 Use ArrayVec for kcall fd nums, 8% better perf! 2026-05-31 20:24:57 +02:00