使mm支持4K虚拟地址映射

This commit is contained in:
fslongjin
2022-07-18 16:07:34 +08:00
parent 8b6489dac3
commit aa3f433cd5
10 changed files with 335 additions and 111 deletions

View File

@ -2,6 +2,8 @@
#include <driver/usb/usb.h>
#include <driver/pci/pci.h>
#define MAX_XHCI_HOST_CONTROLLERS 8
// xhci Capability Registers offset
#define XHCI_CAPS_CAPLENGTH 0x00 // Cap 寄存器组的长度
#define XHCI_CAPS_RESERVED 0x01
@ -85,11 +87,11 @@ struct xhci_port_info_t
uint8_t reserved;
} __attribute__((packed));
struct xhci_controller_t
struct xhci_host_controller_t
{
struct pci_device_structure_general_device_t *pci_dev_hdr; // 指向pci header结构体的指针
int controller_id; // 操作系统给controller的编号
int vbase; // 虚拟地址basebar0映射到的虚拟地址
uint64_t vbase; // 虚拟地址basebar0映射到的虚拟地址
struct xhci_port_info_t *ports; // 指向端口信息数组的指针
};