forked from coconut-svsm/svsm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit copies all files from the svsm directory a new stage2 directory without making any additional changes to any of the files. Signed-off-by: Tom Dohrmann <[email protected]>
- Loading branch information
Showing
131 changed files
with
32,922 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
[package] | ||
name = "svsm" | ||
version = "0.1.0" | ||
edition = "2021" | ||
rust-version = "1.82.0" | ||
|
||
[[bin]] | ||
name = "stage2" | ||
path = "src/stage2.rs" | ||
test = false | ||
|
||
[[bin]] | ||
name = "svsm" | ||
path = "src/svsm.rs" | ||
test = false | ||
|
||
[lib] | ||
test = true | ||
doctest = true | ||
|
||
[dependencies] | ||
bootlib.workspace = true | ||
cpuarch.workspace = true | ||
elf.workspace = true | ||
syscall.workspace = true | ||
|
||
aes-gcm = { workspace = true, features = ["aes", "alloc"] } | ||
bitfield-struct.workspace = true | ||
bitflags.workspace = true | ||
gdbstub = { workspace = true, optional = true } | ||
gdbstub_arch = { workspace = true, optional = true } | ||
igvm_defs = { workspace = true, features = ["unstable"] } | ||
intrusive-collections.workspace = true | ||
log = { workspace = true, features = ["max_level_info", "release_max_level_info"] } | ||
packit.workspace = true | ||
tdx-tdcall.workspace = true | ||
libmstpm = { workspace = true, optional = true } | ||
zerocopy.workspace = true | ||
|
||
[target."x86_64-unknown-none".dev-dependencies] | ||
test.workspace = true | ||
|
||
[features] | ||
default = [] | ||
enable-gdb = ["dep:gdbstub", "dep:gdbstub_arch"] | ||
mstpm = ["dep:libmstpm"] | ||
nosmep = [] | ||
nosmap = [] | ||
|
||
[dev-dependencies] | ||
|
||
[lints] | ||
workspace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// SPDX-License-Identifier: MIT OR Apache-2.0 | ||
// | ||
// Copyright (c) 2022-2023 SUSE LLC | ||
// | ||
// Author: Joerg Roedel <[email protected]> | ||
|
||
fn main() { | ||
// Extra cfgs | ||
println!("cargo::rustc-check-cfg=cfg(fuzzing)"); | ||
println!("cargo::rustc-check-cfg=cfg(test_in_svsm)"); | ||
|
||
// Stage 2 | ||
println!("cargo:rustc-link-arg-bin=stage2=-nostdlib"); | ||
println!("cargo:rustc-link-arg-bin=stage2=--build-id=none"); | ||
println!("cargo:rustc-link-arg-bin=stage2=-Tkernel/src/stage2.lds"); | ||
println!("cargo:rustc-link-arg-bin=stage2=-no-pie"); | ||
|
||
// SVSM 2 | ||
println!("cargo:rustc-link-arg-bin=svsm=-nostdlib"); | ||
println!("cargo:rustc-link-arg-bin=svsm=--build-id=none"); | ||
println!("cargo:rustc-link-arg-bin=svsm=--no-relax"); | ||
println!("cargo:rustc-link-arg-bin=svsm=-Tkernel/src/svsm.lds"); | ||
println!("cargo:rustc-link-arg-bin=svsm=-no-pie"); | ||
|
||
// Extra linker args for tests. | ||
println!("cargo:rerun-if-env-changed=LINK_TEST"); | ||
if std::env::var("LINK_TEST").is_ok() { | ||
println!("cargo:rustc-cfg=test_in_svsm"); | ||
println!("cargo:rustc-link-arg=-nostdlib"); | ||
println!("cargo:rustc-link-arg=--build-id=none"); | ||
println!("cargo:rustc-link-arg=--no-relax"); | ||
println!("cargo:rustc-link-arg=-Tkernel/src/svsm.lds"); | ||
println!("cargo:rustc-link-arg=-no-pie"); | ||
} | ||
|
||
println!("cargo:rerun-if-changed=kernel/src/stage2.lds"); | ||
println!("cargo:rerun-if-changed=kernel/src/svsm.lds"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// SPDX-License-Identifier: MIT OR Apache-2.0 | ||
// | ||
// Copyright (c) 2022-2023 SUSE LLC | ||
// | ||
// Author: Joerg Roedel <[email protected]> | ||
|
||
pub mod tables; |
Oops, something went wrong.