Commit Graph

445 Commits

Author SHA1 Message Date
vasilito 8e4643c9de syscall: add SYS_SYNC and SYS_SYNCFS numbers 2026-07-09 11:25:04 +03:00
vasilito 9fad5e653c syscall: add FullContextRegs arch types for /proc/{pid}/ctx 2026-07-08 17:57:54 +03:00
vasilito c59951c038 Add missing syscall numbers and wrapper 2026-07-08 00:58:27 +03:00
vasilito 9c02d60a4c syscall: merge upstream 0.9.0 — reservation API + legacy ABI preserved 2026-07-08 00:48:48 +03:00
vasilito 8bd6db34b6 Merge remote-tracking branch 'upstream/master' into syscall-0.3.0 2026-07-08 00:36:51 +03:00
vasilito 7e9cffd20a 0.3.0: restore legacy openat_with_filter / unlinkat_with_filter wrappers 2026-07-06 20:58:49 +03:00
vasilito 2c06be31a7 0.3.0: restore legacy syscall wrappers and constants (openat/dup/sendfd/close) 2026-07-06 19:20:45 +03:00
vasilito 488ed0c597 0.3.0: preserve legacy SYS_OPENAT_WITH_FILTER and SYS_UNLINKAT_WITH_FILTER constants 2026-07-06 19:01:56 +03:00
vasilito bf54ba8436 0.3.0: preserve legacy SYS_SENDFD constant for kernel/userspace ABI 2026-07-06 19:00:05 +03:00
vasilito 812d74e0cf 0.3.0: add SYS_OPENAT and SYS_DUP aliases for upstream 0.9.0 renamed constants 2026-07-06 18:56:10 +03:00
vasilito e5450de63a 0.3.0: add O_CLOEXEC and F_DUPFD_CLOEXEC constants for libredox ABI compatibility 2026-07-06 18:52:08 +03:00
vasilito 38ae8df3d4 0.3.0: bump version to 0.9.0+rb0.3.0 and add Red Bear author attribution 2026-07-06 18:40:09 +03:00
vasilito 0de981031c syscall: add AcpiVerb::SetS3WakingVector and AcpiVerb::EnterS3 (Phase II.X.W)
Phase II.X.W: extend the AcpiVerb enum with two new variants
for the S3 round-trip:

* AcpiVerb::SetS3WakingVector (= 5): acpid writes the
  kernel's S3 resume trampoline address to FACS.
  Mirrors Linux 7.1's acpi_set_firmware_waking_vector.
  The 8-byte write payload is the address in
  little-endian. A zero payload is a sentinel for 'use the
  kernel's default trampoline address' (s3_trampoline
  symbol).
* AcpiVerb::EnterS3 (= 6): acpid requests the kernel to
  enter S3. The kernel's stop::enter_s3() reads the
  SLP_TYP value from S3_SLP_TYP and does the PM1 register
  write. The actual S3 entry happens via acpid writing
  to /scheme/sys/kstop.

Hardware-agnostic: works on any x86_64 system with
standard ACPI S3 support (Dell, HP, Lenovo, LG Gram 14).
On Modern Standby-only systems (LG Gram 16 (2025)), the
kernel never enters S3 so these verbs are no-ops.
2026-07-06 18:39:14 +03:00
vasilito 83b228856a redox_syscall: add EnterS2Idle/ExitS2Idle AcpiVerb variants (Phase I/J)
Phase I/J: hardware-agnostic s2idle / Modern Standby
support. These AcpiVerb variants are needed on any
platform with Modern Standby firmware (Dell, HP, Lenovo,
LG Gram, etc.), not just LG Gram. They mirror Linux 7.1:

* EnterS2Idle (= 3) — s2idle_enter() in
  kernel/power/suspend.c:91
* ExitS2Idle (= 4) — s2idle_wake() in
  kernel/power/suspend.c:133

The version field stays at upstream 0.8.1. We do NOT
bump the version — this is the durable overlay pattern
(per AGENTS.md 'GOLDEN RULE — Red Bear adapts to
upstream, never the reverse'). Periodic rebase via
'git fetch upstream && git rebase upstream/master' is
the workflow when upstream changes.

The patch file backing this commit is at
local/patches/syscall/P1-acpiverb-enter-exit-s2idle.patch
in the outer RedBear-OS repo.
2026-07-06 18:39:14 +03:00
4lDO2 1db4871e80 Remove syscalls no longer present in the kernel. 2026-07-02 20:45:46 +02:00
Wildan M fcce297ad3 Set Error::new as const fn 2026-07-01 14:46:29 +00:00
Ibuki Omatsu 4bb9233355 refactor: replace auto fd allocation with reservations and *_into variants 2026-07-01 07:51:53 -06:00
4lDO2 79cb6d9057 Add AcpiVerb 2026-06-02 15:38:05 +02:00
4lDO2 a358928d58 Add additional proc scheme & addrsp verbs. 2026-06-02 13:32:51 +02:00
R Aadarsh 2708fc84ac Add FileTableVerb 2026-05-28 21:35:50 +05:30
Wildan M cde72e8f03 Update CI 2026-05-27 13:02:46 +07:00
Ibuki Omatsu 7a1409a910 feat: Add multiple fds variant for call and std_fs_call 2026-05-27 15:26:37 +02:00
Wildan M aa2a276910 Add EVENT_TIMEOUT_ID 2026-05-23 08:38:21 +07:00
Wildan M 9ff180dd8e Add TimeSpec conversion utility 2026-05-23 08:38:13 +07:00
Jeremy Soller e3c2b74daf 0.7.5 2026-05-04 12:30:22 -06:00
Jeremy Soller d3c6430dc0 Align dirent headers 2026-05-04 12:28:53 -06:00
Akshit Gaur 271374cd4d Bump version 2026-04-06 14:44:29 +05:30
Akshit Gaur 23760e59f7 Add prio field to ProcSchemeAttrs 2026-03-23 22:45:24 +05:30
Ibuki.O 68b511f7a0 feat: Enable StdFsCallKinds except for unlinkat 2026-02-26 14:25:25 +09:00
Jeremy Soller 548f9b0197 0.7.2 2026-02-24 08:09:29 -07:00
Anhad Singh 0a7bf437bd feat(schemev2): detach
This commit adds:
* `CqeOpcode::RespondAndNotifyOnDetach`
* `Opcode::Detach`

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2026-02-20 19:57:28 +11:00
Anhad Singh 374b33f2e4 feat(stdfscall): flocking
Signed-off-by: Anhad Singh <andypython@protonmail.com>
2026-02-12 11:25:35 +11:00
Jeremy Soller 95f4fed4e2 Implement fscall RFC 2026-02-11 12:11:07 -07:00
4lDO2 178461f6fb Remove remnants of the old packet format. 2025-12-27 15:10:54 +01:00
Ibuki Omatsu 208cf4b6ff Remove SYS_OPEN, SYS_UNLINK, and SYS_RMDIR. Add namespace related features 2025-12-27 07:00:21 -07:00
Anhad Singh 2d11366fd1 misc(sigabi): is_parent_sigchld -> stop_or_continue
* The original argument `is_parent_sigchld` was misleading as it
   applied to any `SIGCHLD` sent to the parent (exit and stop/continue).
   `SA_NOCLDSTOP` should only suppress stop and continue events, not
   exits.
* Document the behaviour.

Signed-off-by: Anhad Singh <andypython@protonmail.com>
2025-12-17 14:05:50 +11:00
Ibuki Omatsu 1cf631ce3f Introduce syscall6. Add unlinkat and remove unlink and rmdir. 2025-12-16 07:07:01 -07:00
Jeremy Soller 2d346f1d61 Add F_DUPFD_CLOEXEC 2025-11-17 17:38:30 -07:00
Ibuki Omatsu 15aa8e32ef Define GlobalSchemes. 2025-10-04 16:54:47 +02:00
Ribbon aedadf4d5c Improve the README 2025-07-31 01:15:13 -03:00
Ibuki Omatsu a9880ccf50 feat: Add UPPER_FDTBL_TAG 2025-07-27 07:10:36 -06:00
Ibuki Omatsu 1cfe90df24 feat: Add flags for bulk fd passing. 2025-07-26 06:58:26 -06:00
Ibuki Omatsu 95f15d3a8f feat: Add FsCall. 2025-07-21 07:52:41 -06:00
Darley Barreto 61f7b1bc31 Update openat function to include fcntl_flags parameter 2025-07-12 14:26:17 -03:00
Ibuki Omatsu eb4c83bd50 feat: Add MODE_SOCK to flags. 2025-07-04 14:04:53 -06:00
Ron Williams f821e2ceb7 Bump minor version due to change in filetype constants 2025-06-10 12:58:32 -07:00
Ron Williams 8df03bb6f9 Match DirentKind to include/bits/dirent.h 2025-06-10 13:44:27 -06:00
Jeremy Soller fe32c6b89d 0.5.12: Replace link with flink 2025-05-03 12:15:52 -06:00
4lDO2 8f646a63ac Remove commented-out ThreadEvent. 2025-04-19 13:03:51 +02:00
4lDO2 8a80d1f58b Add debug_name to ProcSchemeAttrs. 2025-04-19 01:04:42 +02:00