将具体磁盘类型与fat32文件系统进行分离

This commit is contained in:
fslongjin
2022-09-06 14:10:17 +08:00
parent 0fcba99282
commit 339053a20e
23 changed files with 307 additions and 138 deletions

View File

@ -1,6 +1,7 @@
#include "usb.h"
#include "xhci/xhci.h"
#include <common/kprint.h>
#include <common/errno.h>
#include <driver/pci/pci.h>
#include <debug/bug.h>
#include <common/spinlock.h>
@ -28,7 +29,7 @@ int usb_init()
if (WARN_ON(usb_pdevs_count == 0))
{
kwarn("There is no usb hardware in this computer!");
return;
return 0;
}
kdebug("usb_pdevs_count=%d", usb_pdevs_count);
// 初始化每个usb控制器
@ -54,7 +55,7 @@ int usb_init()
default:
kerror("Error value of usb_pdevs[%d]->ProgIF: %#02x", i, usb_pdevs[i]->ProgIF);
return;
return -EINVAL;
break;
}
}

View File

@ -1704,7 +1704,7 @@ void xhci_init(struct pci_device_structure_general_device_t *dev_hdr)
// 创建scratchpad buffers
for (int i = 0; i < max_scratchpad_buf; ++i)
{
uint64_t buf_vaddr = kzalloc(xhci_hc[cid].page_size, 0);
uint64_t buf_vaddr = (uint64_t)kzalloc(xhci_hc[cid].page_size, 0);
__write8b(xhci_hc[cid].scratchpad_buf_array_vaddr, virt_2_phys(buf_vaddr));
}
}