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

Patch virtio net #194

Merged
merged 10 commits into from
Mar 11, 2023
Merged

Conversation

YJwu2023
Copy link
Collaborator

PCI功能增加与virtio-net设备驱动支持

};
unsafe {
let pa = (memory_management_struct.pages_struct as usize
+ (paddr >> PAGE_2M_SHIFT) * 56) as *mut Page;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个大小不要写死哈哈,可以写成mem::sizeof()的形式,这样会好一些。

@@ -178,7 +175,7 @@ void system_initialize()

apic_timer_init();
io_mfence();

c_virtio_probe();
Copy link
Member

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

@fslongjin fslongjin merged commit 26d84a3 into DragonOS-Community:master Mar 11, 2023
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 this pull request may close these issues.

2 participants