Skip to content

Commit 368fb82

Browse files
Copilotmackz-maxw
andcommitted
Add documentation comments to kernel target configuration
Co-authored-by: mackz-maxw <61910211+mackz-maxw@users.noreply.github.com>
1 parent ae88282 commit 368fb82

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.cargo/config.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,17 @@ rustflags = [
1414
linker = "ld.lld"
1515
rustflags = ["-C", "link-arg=-nostartfiles"]
1616

17+
# Custom target for x86_64 kernel with higher-half memory layout
18+
# Used when building with --target kernel/x86_64-rint.json
1719
[target.x86_64-rint]
1820
rustflags = [
21+
# Linker script for higher-half kernel (0xFFFFFFFF80000000)
1922
"-C", "link-arg=-Tkernel/ld/link.ld",
23+
# Static relocation model for bare-metal kernel
2024
"-C", "relocation-model=static",
25+
# Kernel code model required for high memory addresses (> 4GB)
2126
"-C", "code-model=kernel",
27+
# Disable red zone for interrupt safety
2228
"-C", "no-redzone=yes",
2329
]
2430

0 commit comments

Comments
 (0)