-
-
Notifications
You must be signed in to change notification settings - Fork 143
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
Patch virtio net #194
Patch virtio net #194
Conversation
}; | ||
unsafe { | ||
let pa = (memory_management_struct.pages_struct as usize | ||
+ (paddr >> PAGE_2M_SHIFT) * 56) as *mut Page; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个大小不要写死哈哈,可以写成mem::sizeof()的形式,这样会好一些。
kernel/src/main.c
Outdated
@@ -178,7 +175,7 @@ void system_initialize() | |||
|
|||
apic_timer_init(); | |||
io_mfence(); | |||
|
|||
c_virtio_probe(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
由于当前进程是pid=0的IDLE进程,在apic_timer初始化之后,当前进程将会被调度走(直到没有其他任何进程要执行),因此请把这个代码改写到https://opengrok.ringotek.cn/xref/DragonOS/kernel/src/process/process.c?r=f6ba114b#495
PCI功能增加与virtio-net设备驱动支持