Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ jobs:
# - `litebox_platform_linux_userland` is allowed to have `std` access,
# since it is a purely-userland implementation.
#
# - `litebox_platform_freebsd_userland` is allowed to have `std` access,
# since it is a purely-userland implementation.
#
# - `litebox_platform_windows_userland` is allowed to have `std` access,
# since it is a purely-userland implementation.
#
Expand Down Expand Up @@ -311,6 +314,7 @@ jobs:
find . -type f -name 'Cargo.toml' \
-not -path './Cargo.toml' \
-not -path './litebox_platform_linux_userland/Cargo.toml' \
-not -path './litebox_platform_freebsd_userland/Cargo.toml' \
-not -path './litebox_platform_windows_userland/Cargo.toml' \
-not -path './litebox_runner_linux_on_windows_userland/Cargo.toml' \
-not -path './litebox_platform_lvbs/Cargo.toml' \
Expand Down
14 changes: 14 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ members = [
"litebox",
"litebox_common_linux",
"litebox_common_optee",
"litebox_platform_freebsd_userland",
"litebox_platform_linux_kernel",
"litebox_platform_linux_userland",
"litebox_platform_windows_userland",
Expand All @@ -28,6 +29,7 @@ default-members = [
"litebox",
"litebox_common_linux",
"litebox_common_optee",
"litebox_platform_freebsd_userland",
"litebox_platform_linux_kernel",
"litebox_platform_linux_userland",
"litebox_platform_windows_userland",
Expand Down
2 changes: 2 additions & 0 deletions dev_tests/src/ratchet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ fn ratchet_globals() -> Result<()> {
&[
("dev_bench/", 1),
("litebox/", 9),
("litebox_platform_freebsd_userland/", 7),
("litebox_platform_linux_kernel/", 6),
("litebox_platform_linux_userland/", 5),
("litebox_platform_lvbs/", 23),
Expand Down Expand Up @@ -71,6 +72,7 @@ fn ratchet_maybe_uninit() -> Result<()> {
&[
("dev_tests/", 1),
("litebox/", 1),
("litebox_platform_freebsd_userland/", 2),
("litebox_platform_linux_userland/", 3),
("litebox_shim_linux/", 5),
],
Expand Down
4 changes: 2 additions & 2 deletions litebox/src/mm/exception_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use crate::utils::TruncateExt as _;

#[cfg(any(target_os = "linux", target_os = "none"))]
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "none"))]
macro_rules! ex_table_section {
() => {
// a = allocate, R = retain: don't discard on linking.
Expand Down Expand Up @@ -214,7 +214,7 @@ struct ExceptionTableEntry {

/// Returns the exception table, found by linker-defined symbols marking the
/// start and end of the section.
#[cfg(any(target_os = "linux", target_os = "none"))]
#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "none"))]
fn exception_table() -> &'static [ExceptionTableEntry] {
// SAFETY: the linker automatically defines these symbols when the section
// is non-empty.
Expand Down
16 changes: 16 additions & 0 deletions litebox_platform_freebsd_userland/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "litebox_platform_freebsd_userland"
version = "0.1.0"
edition = "2024"

[dependencies]
libc = { version = "0.2.169", default-features = false }
litebox = { path = "../litebox/", version = "0.1.0" }
litebox_common_linux = { path = "../litebox_common_linux", version = "0.1.0" }
thiserror = { version = "2.0.6", default-features = false }
bitflags = "2.6.0"
getrandom = "0.3.4"
zerocopy = { version = "0.8", default-features = false, features = ["derive"] }

[lints]
workspace = true
3 changes: 3 additions & 0 deletions litebox_platform_freebsd_userland/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# LiteBox Platform: FreeBSD Userland

A [LiteBox platform](../litebox/platform/index.html) for running LiteBox on userland FreeBSD.
Loading
Loading