Skip to content

Commit

Permalink
comment: update
Browse files Browse the repository at this point in the history
Signed-off-by: Zone.N <[email protected]>
  • Loading branch information
MRNIU committed Jul 6, 2024
1 parent 4b9154c commit d7ae1ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
7 changes: 1 addition & 6 deletions src/kernel/arch/riscv64/interrupt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,7 @@ void Interrupt::RegisterInterruptFunc(uint64_t cause, InterruptFunc func) {

static uint64_t kInterval = 0;

// 在 riscv64 情景下,argc 为启动核 id,argv 为 dtb 地址
/// @todo 从 dtb 读取 cpu 速度
uint32_t InterruptInit(uint32_t argc, uint8_t *argv) {
(void)argc;
(void)argv;

uint32_t InterruptInit(uint32_t, uint8_t *) {
// 获取 cpu 速度
kInterval = kKernelFdt.GetInstance().GetTimebaseFrequency();
printf("kInterval: 0x%X\n", kInterval);
Expand Down
6 changes: 1 addition & 5 deletions src/kernel/arch/x86_64/interrupt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,7 @@ void Interrupt::RegisterInterruptFunc(uint64_t cause, InterruptFunc func) {
}
}

/// @todo 读取 cpu 速度
uint32_t InterruptInit(uint32_t argc, uint8_t *argv) {
(void)argc;
(void)argv;

uint32_t InterruptInit(uint32_t, uint8_t *) {
std::cout << cpu::kAllCr.efer << std::endl;
std::cout << cpu::kAllCr.gdtr << std::endl;
std::cout << cpu::kAllCr.idtr << std::endl;
Expand Down

0 comments on commit d7ae1ff

Please sign in to comment.