-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(kernel): dump commands for GDT and timer (#375)
- Loading branch information
Showing
4 changed files
with
34 additions
and
1 deletion.
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
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
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,25 @@ | ||
use crate::shell::{self, Command}; | ||
|
||
pub const DUMP_ARCH: Command = Command::new("arch") | ||
.with_help("dump architecture-specific structures") | ||
.with_subcommands(&[ | ||
Command::new("gdt") | ||
.with_help("print the global descriptor table (GDT)") | ||
.with_fn(|_| { | ||
let gdt = super::interrupt::GDT.get(); | ||
tracing::info!(?gdt); | ||
Ok(()) | ||
}), | ||
// Command::new("idt") | ||
// .with_help("print the interrupt descriptor table (IDT)") | ||
// .with_fn(|_| { | ||
// let gdt = super::interrupt::GDT.get(); | ||
// tracing::info!(?gdt); | ||
// Ok(()) | ||
// }), | ||
]); | ||
|
||
pub fn dump_timer(_: &str) -> Result<(), shell::Error> { | ||
tracing::info!(timer = ?super::interrupt::TIMER); | ||
Ok(()) | ||
} |
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