1 #pragma once
2 
3 #include <common/kprint.h>
4 #include <mm/slab.h>
5 #include <syscall/syscall.h>
6 #include <syscall/syscall_num.h>
7 #include <sched/sched.h>
8 #include <common/string.h>
9 #include <common/block.h>
10 #include <debug/bug.h>
11 #include <driver/pci/pci.h>
12 #include <mm/mm.h>
13 
14 // 计算HBA_MEM的虚拟内存地址
15 #define MAX_AHCI_DEVICES 100
16 #define AHCI_MAPPING_BASE SPECIAL_MEMOEY_MAPPING_VIRT_ADDR_BASE + AHCI_MAPPING_OFFSET
17 
18 /// @brief 保留了对 pci设备获取 和 mm内存映射 的依赖
19 void ahci_cpp_init(uint32_t *count_ahci_devices, struct pci_device_structure_header_t *ahci_devs[MAX_AHCI_DEVICES], struct pci_device_structure_general_device_t *gen_devs[MAX_AHCI_DEVICES]);