/DragonOS-0.1.8/kernel/src/driver/pci/ |
D | pci.c | 8 static void pci_checkBus(uint8_t bus); 40 uint32_t pci_read_config(uchar bus, uchar slot, uchar func, uchar offset) in pci_read_config() argument 42 uint lbus = (uint)bus; in pci_read_config() 64 uint pci_write_config(uchar bus, uchar slot, uchar func, uchar offset, uint32_t data) in pci_write_config() argument 66 uint lbus = (uint)bus; in pci_write_config() 88 …_device_header(struct pci_device_structure_general_device_t *header, uchar bus, uchar slot, uchar … in pci_read_general_device_header() argument 91 header->BAR0 = pci_read_config(bus, slot, func, 0x10); in pci_read_general_device_header() 92 header->BAR1 = pci_read_config(bus, slot, func, 0x14); in pci_read_general_device_header() 93 header->BAR2 = pci_read_config(bus, slot, func, 0x18); in pci_read_general_device_header() 94 header->BAR3 = pci_read_config(bus, slot, func, 0x1c); in pci_read_general_device_header() [all …]
|
D | msi.c | 25 …dw0 = pci_read_config(msi_desc->pci_dev->bus, msi_desc->pci_dev->device, msi_desc->pci_dev->func, … in __msi_read_msix_cap_list() 32 …pci_read_config(msi_desc->pci_dev->bus, msi_desc->pci_dev->device, msi_desc->pci_dev->func, cap_of… in __msi_read_msix_cap_list() 34 …pci_read_config(msi_desc->pci_dev->bus, msi_desc->pci_dev->device, msi_desc->pci_dev->func, cap_of… in __msi_read_msix_cap_list() 42 …dw0 = pci_read_config(msi_desc->pci_dev->bus, msi_desc->pci_dev->device, msi_desc->pci_dev->func, … in __msi_read_cap_list() 48 …pci_read_config(msi_desc->pci_dev->bus, msi_desc->pci_dev->device, msi_desc->pci_dev->func, cap_of… in __msi_read_cap_list() 53 …pci_read_config(msi_desc->pci_dev->bus, msi_desc->pci_dev->device, msi_desc->pci_dev->func, cap_of… in __msi_read_cap_list() 61 …cap_list.msg_data = pci_read_config(msi_desc->pci_dev->bus, msi_desc->pci_dev->device, msi_desc->p… in __msi_read_cap_list() 66 …pci_read_config(msi_desc->pci_dev->bus, msi_desc->pci_dev->device, msi_desc->pci_dev->func, cap_of… in __msi_read_cap_list() 68 …pci_read_config(msi_desc->pci_dev->bus, msi_desc->pci_dev->device, msi_desc->pci_dev->func, cap_of… in __msi_read_cap_list() 94 uint32_t bar = pci_read_config(pci_dev->bus, pci_dev->device, pci_dev->func, bar_off); in __msix_map_table() [all …]
|
D | pci.h | 30 uint8_t bus; member 179 uint32_t pci_read_config(uchar bus, uchar slot, uchar func, uchar offset); 190 uint pci_write_config(uchar bus, uchar slot, uchar func, uchar offset, uint32_t data); 201 void *pci_read_header(int *type, uchar bus, uchar slot, uchar func, bool add_to_list);
|
D | pci.rs | 668 let bdf = ((bus_device_function.bus - self.bus_begin) as u32) << 8 in cam_offset() 1016 bus: 0, in pci_check_all_buses() 1058 fn pci_check_device(bus: u8, device: u8) -> Result<u8, PciError> { in pci_check_device() 1061 bus, in pci_check_device() 1080 busdevicefunction.bus, in pci_check_device() 1086 bus, in pci_check_device() 1097 fn pci_check_bus(bus: u8) -> Result<u8, PciError> { in pci_check_bus() 1100 pci_check_device(bus, device)?; in pci_check_bus() 1178 pub bus: u8, field 1200 self.bus, self.device, self.function in fmt()
|
/DragonOS-0.1.8/docs/kernel/filesystem/ |
D | sysfs.md | 91   对于bus设备而言,需要调用bus_register,将bus注册进系统,并在sysfs中可视化。 94 /// @brief: 总线注册,将总线加入全局总线管理器中,并根据id table在sys/bus和sys/devices下生成文件夹 95 /// @parameter bus: Bus设备实体 97 pub fn bus_register<T: Bus>(bus: Arc<T>) -> Result<(), DeviceError> { 98 BUS_MANAGER.add_bus(bus.get_id_table(), bus.clone()); 99 match sys_bus_register(&bus.get_id_table().to_name()) { 102 return device_register(bus); 109   通过bus_register源码可知,该函数不仅在sysfs/bus下生成总线文件夹,同时内部调用device_register,该函数将总线加入设备管理器中,同时在sys/…
|
/DragonOS-0.1.8/kernel/src/driver/base/device/ |
D | bus.rs | 9 bus::{sys_bus_init, sys_bus_register}, 177 pub fn bus_register<T: Bus>(bus: Arc<T>) -> Result<(), DeviceError> { in bus_register() 178 BUS_MANAGER.add_bus(bus.id_table(), bus.clone()); in bus_register() 179 match sys_bus_register(&bus.id_table().to_name()) { in bus_register() 182 return device_register(bus); in bus_register() 192 pub fn bus_unregister<T: Bus>(bus: Arc<T>) -> Result<(), DeviceError> { in bus_unregister() 193 BUS_MANAGER.add_bus(bus.id_table(), bus.clone()); in bus_unregister() 194 return device_unregister(bus); in bus_unregister()
|
D | mod.rs | 16 pub mod bus; module
|
/DragonOS-0.1.8/kernel/src/arch/x86_64/pci/ |
D | pci.rs | 17 let address = ((bus_device_function.bus as u32) << 16) in read_config() 31 let address = ((bus_device_function.bus as u32) << 16) in write_config()
|
/DragonOS-0.1.8/kernel/src/filesystem/sysfs/ |
D | mod.rs | 19 pub mod bus; module 120 Ok(bus) => unsafe { in new() 121 __SYS_BUS_INODE = Box::leak(Box::new(bus)); in new()
|
/DragonOS-0.1.8/kernel/src/driver/base/platform/ |
D | mod.rs | 2 bus::{bus_driver_register, bus_register, Bus, BusDriver, BusState},
|
/DragonOS-0.1.8/kernel/src/driver/uart/ |
D | uart.rs | 11 sysfs::bus::{bus_device_register, bus_driver_register},
|