Commit Graph

312 Commits

Author SHA1 Message Date
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 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
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
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 d3c6430dc0 Align dirent headers 2026-05-04 12:28:53 -06:00
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
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
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 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
4lDO2 c52c4fec53 Move most sig numbers to redox_rt. 2025-04-16 11:58:21 +02:00
4lDO2 8fa422b2c9 Add Exception stubs for aarch64+riscv64. 2025-04-15 16:37:55 +02:00
4lDO2 8d3e6e5b49 WIP: exception handling interfaces. 2025-04-15 16:30:04 +02:00
4lDO2 c9d824f406 Move RtSigInfo definition to redox-rt. 2025-04-13 20:34:17 +02:00
4lDO2 8909a0b233 Remove SYS_SIGDEQUEUE. 2025-04-13 20:24:47 +02:00
4lDO2 b23d5067c6 Add ContextVerb::Interrupt. 2025-04-07 17:40:45 +02:00
4lDO2 9db2be8663 Add ContextVerb with Stop and Unstop additionally. 2025-04-07 17:40:45 +02:00
4lDO2 30fed98a46 Remove iopl and virttophys. 2025-04-07 17:40:45 +02:00
4lDO2 9a1742f3d3 Add ProcSchemeVerb. 2025-04-07 17:40:45 +02:00
4lDO2 9081c7f2b9 Add ThreadEvent, ContextStatus. 2025-04-07 17:40:45 +02:00
4lDO2 3afd6a2654 Impl Debug for DirentBuf. 2025-04-07 17:40:45 +02:00
4lDO2 9d1b81b92f Remove WaitFlags etc. 2025-04-07 17:40:44 +02:00
4lDO2 3d5e934d16 Add ProcSchemeAttrs. 2025-04-07 17:40:44 +02:00
4lDO2 c68c68041a Remove syscalls replaced by the proc manager. 2025-04-07 17:40:44 +02:00
4lDO2 080f2003cd Rustfmt, add CallFlags::CONSUME. 2025-04-05 17:19:13 +02:00
4lDO2 3c4b7dd55d Fix AsRef unsoundness for path syscalls. 2025-04-05 17:13:50 +02:00
Darley Barreto 8b2bbae6e6 Add OpenAt Opcode 2025-04-05 10:50:48 -03:00
Darley Barreto a65f94f37e Add openat syscall 2025-04-01 18:01:02 -03:00
4lDO2 3117ea451c Implement SYS_CALL. 2025-03-03 14:15:17 +01:00