-
-
Notifications
You must be signed in to change notification settings - Fork 158
完成e1000e驱动 #393
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
完成e1000e驱动 #393
Conversation
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.
需要结合最新代码再更改一下才能合并
记得make fmt格式化代码
/// @brief 申请用于DMA的内存页 | ||
/// @param pages 页数(4k一页) | ||
/// @return PhysAddr 获得的内存页的初始物理地址 | ||
pub fn dma_alloc(pages: usize) -> (usize, NonNull<u8>) { |
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.
这里的代码下一个pr可以把它整合到mm模块里面去。并且加上守卫来保护。目前这样的写法容易造成内存泄露、越界。
@@ -22,7 +24,7 @@ pub fn initial_kernel_thread() -> i32 { | |||
mount_root_fs().expect("Failed to mount root fs"); | |||
|
|||
virtio_probe(); | |||
|
|||
e1000e_init(); |
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.
* 测试RESET * 测试RESET * 基于轮询的实现 * 规范化部分unsafe的使用 * 完成中断处理函数,同时去除了不必要的内存拷贝行为,准备编写napi机制 * 实现现有协议栈下的部分napi机制;修复了内存泄漏的问题;添加了一部分代码注释 * 去除部分无用代码 * 去除一些无用代码 * 适配新的驱动模型 * 完成msi中断测试 * 去除一些无用代码 * 格式化代码 * 增加了一些注释,提高代码可读性 * 去除无关文件 * 优化了读取mac地址的方式,提高可读性
初步完成了e1000e系列网卡的驱动设计与开发工作,在qemu模拟的82574l网卡上完成了相关测试,系统可以通过网络设备在dhcp协议下自动分配ip。
文件改动概述: