Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion components/patina_acpi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ patina_test = { workspace = true }

[dev-dependencies]
mockall = { workspace = true }
patina = { workspace = true, features = ["mockall"] }
patina = { workspace = true, features = ["alloc", "mockall"] }

[features]
mockall = ["dep:mockall", "std"]
Expand Down
2 changes: 1 addition & 1 deletion components/patina_adv_logger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ required-features = ['std']

[dependencies]
log = { workspace = true }
patina = { workspace = true }
patina = { workspace = true, features = ["alloc"] }
patina_test = { workspace = true }
spin = { workspace = true }
zerocopy = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion components/patina_mm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ workspace = true
cfg-if = { workspace = true }
log = { workspace = true }
mockall = { workspace = true, optional = true }
patina = { workspace = true }
patina = { workspace = true, features = ["alloc"] }
zerocopy = { workspace = true }
zerocopy-derive = { workspace = true }

Expand Down
2 changes: 1 addition & 1 deletion components/patina_performance/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ workspace = true
[dependencies]
log = { workspace = true }

patina = { workspace = true }
patina = { workspace = true, features = ["alloc"] }
patina_mm = { workspace = true }
zerocopy = { workspace = true }
zerocopy-derive = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion components/patina_samples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ workspace = true

[dependencies]
log = { workspace = true }
patina = { workspace = true }
patina = { workspace = true, features = ["alloc"] }
patina_macro = { workspace = true }
patina_smbios = { workspace = true }

Expand Down
2 changes: 1 addition & 1 deletion components/patina_smbios/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description = "System Management BIOS (SMBIOS) support for Patina UEFI component
[dependencies]
log = { workspace = true }
mockall = { workspace = true, optional = true }
patina = { workspace = true }
patina = { workspace = true, features = ["alloc"] }
patina_macro = { workspace = true }
zerocopy = { workspace = true }
zerocopy-derive = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion components/patina_test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ workspace = true
[dependencies]
linkme = { workspace = true }
log = { workspace = true }
patina = { workspace = true }
patina = { workspace = true, features = ["alloc"] }
patina_macro = { workspace = true }
spin = { workspace = true }

Expand Down
3 changes: 1 addition & 2 deletions core/patina_debugger/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ workspace = true
[dependencies]
cfg-if = { workspace = true }
gdbstub = { workspace = true }
patina = { workspace = true }
patina = { workspace = true, features = ["alloc"] }
patina_internal_cpu = { workspace = true }
log = { workspace = true }
spin = { workspace = true }
Expand All @@ -28,7 +28,6 @@ serial_test = { workspace = true }
patina_mtrr = { workspace = true }

[features]
default = []
alloc = []
# All non-std features to test in CI
ci_features = ["alloc"]
3 changes: 1 addition & 2 deletions core/patina_internal_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
default = ["alloc"]
alloc = []
# All non-std features to test in CI
ci_features = ["alloc"]

[dependencies]
log = { workspace=true }
patina = { workspace = true }
patina = { workspace = true, features = ["alloc"] }
uuid = { workspace = true }

[dev-dependencies]
Expand Down
3 changes: 1 addition & 2 deletions core/patina_internal_cpu/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ features = ["std"]

[dependencies]
log = { workspace = true }
patina = { workspace = true, features = ["core"] }
patina = { workspace = true, features = ["alloc", "core"] }
spin = { workspace = true, features = ["rwlock"] }
patina_paging = { workspace = true }
cfg-if = { workspace = true }
Expand All @@ -32,7 +32,6 @@ mockall = { workspace = true }
serial_test = { workspace = true }

[features]
default = []
std = []
# All non-std features to test in CI
ci_features = []
9 changes: 4 additions & 5 deletions patina_dxe_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ scroll = { workspace = true, features = ["derive"] }
spin = { workspace = true }
corosensei = { workspace = true }
uuid = { workspace = true }
patina = { workspace = true, features = ["core"] }
patina = { workspace = true, features = ["alloc", "core"] }
patina_ffs = { workspace = true }
patina_internal_core = { workspace = true }
patina_internal_core = { workspace = true, features = ["alloc"] }
patina_internal_cpu = { workspace = true }
patina_debugger = { workspace = true, features = ["alloc"] }
patina_test = { workspace = true }
Expand All @@ -35,9 +35,9 @@ patina_test = { workspace = true }
# local to the workspace should be added via `path` instead of `workspace = true` so that that it does not fail to
# compile due to the dev-dependency not being published yet.
patina_samples = { path = "../components/patina_samples" }
patina = { path = "../sdk/patina", features = ["core", "mockall"] }
patina = { path = "../sdk/patina", features = ["alloc", "core", "mockall"] }
patina_ffs_extractors = { path = "../sdk/patina_ffs_extractors" }
patina_internal_core = { path = "../core/patina_internal_core" }
patina_internal_core = { path = "../core/patina_internal_core", features = ["alloc"] }
env_logger = { workspace = true }
mockall = { workspace = true }
serial_test = { workspace = true }
Expand All @@ -48,7 +48,6 @@ zerocopy-derive = { workspace = true }
arm-gic = { workspace = true }

[features]
default = []
std = ["patina/std"]
compatibility_mode_allowed = []
v1_resource_descriptor_support = []
Expand Down
1 change: 0 additions & 1 deletion sdk/patina/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ std = ['alloc']
alloc = ["dep:goblin", "dep:fixedbitset"]
mockall = ["dep:mockall", "std"]
global_allocator = []
default = ['alloc']
serde = ["alloc", "dep:serde", "serde/alloc", "dep:serde_json"]
serde-with-yaml = ["serde", "dep:serde_yaml"]

Expand Down
4 changes: 4 additions & 0 deletions sdk/patina/src/base/c_ptr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ unsafe impl<'a, T> CMutRef<'a> for &'a mut T {}
// Box<T>
#[cfg(any(test, feature = "alloc"))]
// SAFETY: Memory layout and mutability are respected for these types.
#[cfg(any(test, feature = "alloc"))]
unsafe impl<T> CPtr<'_> for Box<T> {
type Type = T;

Expand All @@ -181,12 +182,15 @@ unsafe impl<T> CPtr<'_> for Box<T> {
}
#[cfg(any(test, feature = "alloc"))]
// SAFETY: Memory layout and mutability are respected for these types.
#[cfg(any(test, feature = "alloc"))]
unsafe impl<T> CRef<'_> for Box<T> {}
#[cfg(any(test, feature = "alloc"))]
// SAFETY: Memory layout and mutability are respected for these types.
#[cfg(any(test, feature = "alloc"))]
unsafe impl<T> CMutPtr<'_> for Box<T> {}
#[cfg(any(test, feature = "alloc"))]
// SAFETY: Memory layout and mutability are respected for these types.
#[cfg(any(test, feature = "alloc"))]
unsafe impl<T> CMutRef<'_> for Box<T> {}

// ()
Expand Down
2 changes: 1 addition & 1 deletion sdk/patina_ffs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description = "Support for Firmware File System as described in the UEFI Platfor
workspace = true

[dependencies]
patina = {workspace = true}
patina = {workspace = true, features = ["alloc"]}
log = {workspace = true}

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion sdk/patina_ffs_extractors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description = "UEFI section extractor implementations."
workspace = true

[dependencies]
patina = { workspace = true }
patina = { workspace = true, features = ["alloc"] }
patina_ffs = { workspace = true }
brotli-decompressor = { workspace = true, optional = true }
alloc-no-stdlib = { workspace = true, optional = true }
Expand Down
3 changes: 1 addition & 2 deletions sdk/patina_macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ proc-macro2 = { workspace = true }
# cargo-release, however they are still used when verifying the package is compileable. Any dev-dependency that is
# local to the workspace should be added via `path` instead of `workspace = true` so that that it does not fail to
# compile due to the dev-dependency not being published yet.
patina = { path="../../sdk/patina" }
patina = { path="../../sdk/patina", features = ["alloc"] }


[features]
default = []
# Opting in to the `enable_patina_tests` feature requires registering at least one test
# with the `#[patina_test]` attribute. Otherwise, a linker crash or failure will
# occur!
Expand Down
Loading