Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed an issue where IRQ failed to initialize on some x86 hardware: IRQ register handler 8, panicked on an Err value: InvalidParam #258

Closed
elliott10 opened this issue Mar 1, 2022 · 0 comments · Fixed by #255

Comments

@elliott10
Copy link
Collaborator

在某些x86的物理机中,在启动zCore时初始化IRQ却panic

跟踪调试,并与贾爷交流发现,是在新建IRQ的redirection table的内存中,存在随机数据,导致后续的初始化bug

Log如下:

[6.870686 INF0 0:0 zcore::memory] Frame allocator init end.
[6.874955 INFO0 0:0 kernel hal::imp::boot] Primary cpu o init...
[6.879409 INF0 0:0 kernel hal::imp::arch::drivers] Drivers init start.
[6.884540 INFO0 0:0 kernel hal::imp::arch::drivers] Drivers reg dev..
[6.889219 INF0 0:0 zcore drivers::utils::irq manager] IRQ register handler 8

panicked at 'called`Result::unwrap() on an Err value: InvalidParam', kernel-hal/src/bare/arch/x86 64/mod.rs:34:21

解决方法:
把新建IRQ的redirection table的内存初始化并清零

提交修复Patch:
1e59926

@elliott10 elliott10 changed the title 在x86物理机初始化IRQ失败的问题修复,IRQ register handler 8, panicked on an Err value: InvalidParam Fixed an issue where IRQ failed to initialize on some x86 hardware: IRQ register handler 8, panicked on an Err value: InvalidParam Mar 1, 2022
@elliott10 elliott10 linked a pull request Mar 1, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant