Home
last modified time | relevance | path

Searched refs:bus (Results 1 – 11 of 11) sorted by relevance

/DragonOS-0.1.7/kernel/src/driver/pci/
Dpci.c8 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 …]
Dmsi.c25 …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 …]
Dpci.h30 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);
Dpci.rs578 let bdf = ((bus_device_function.bus - self.bus_begin) as u32) << 8 in cam_offset()
926 bus: 0, in pci_check_all_buses()
968 fn pci_check_device(bus: u8, device: u8) -> Result<u8, PciError> { in pci_check_device()
971 bus, in pci_check_device()
990 busdevicefunction.bus, in pci_check_device()
996 bus, in pci_check_device()
1007 fn pci_check_bus(bus: u8) -> Result<u8, PciError> { in pci_check_bus()
1010 pci_check_device(bus, device)?; in pci_check_bus()
1088 pub bus: u8, field
1110 self.bus, self.device, self.function in fmt()
/DragonOS-0.1.7/docs/kernel/filesystem/
Dsysfs.md91 &emsp;&emsp;对于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 &emsp;&emsp;通过bus_register源码可知,该函数不仅在sysfs/bus下生成总线文件夹,同时内部调用device_register,该函数将总线加入设备管理器中,同时在sys/…
/DragonOS-0.1.7/kernel/src/driver/base/device/
Dbus.rs9 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.get_id_table(), bus.clone()); in bus_register()
179 match sys_bus_register(&bus.get_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.get_id_table(), bus.clone()); in bus_unregister()
194 return device_unregister(bus); in bus_unregister()
Dmod.rs16 pub mod bus; module
/DragonOS-0.1.7/kernel/src/arch/x86_64/pci/
Dpci.rs17 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.7/kernel/src/filesystem/sysfs/
Dmod.rs19 pub mod bus; module
120 Ok(bus) => unsafe { in new()
121 __SYS_BUS_INODE = Box::leak(Box::new(bus)); in new()
/DragonOS-0.1.7/kernel/src/driver/usb/xhci/
Dxhci.c2092 … dev_hdr->header.bus, dev_hdr->header.device, dev_hdr->header.func, dev_hdr->header.Vendor_ID, in xhci_init()
2107 …uint32_t tmp = pci_read_config(dev_hdr->header.bus, dev_hdr->header.device, dev_hdr->header.func, … in xhci_init()
2110 … pci_write_config(dev_hdr->header.bus, dev_hdr->header.device, dev_hdr->header.func, 0x4, tmp); in xhci_init()
2154 …uint32_t tmp = pci_read_config(dev_hdr->header.bus, dev_hdr->header.device, dev_hdr->header.func, … in xhci_init()
2156 … pci_write_config(dev_hdr->header.bus, dev_hdr->header.device, dev_hdr->header.func, 0x60, tmp); in xhci_init()
2159 …if (((pci_read_config(dev_hdr->header.bus, dev_hdr->header.device, dev_hdr->header.func, 0) & 0xff… in xhci_init()
2160 …(((pci_read_config(dev_hdr->header.bus, dev_hdr->header.device, dev_hdr->header.func, 0) >> 16) & … in xhci_init()
2162 …((pci_read_config(dev_hdr->header.bus, dev_hdr->header.device, dev_hdr->header.func, 8) & 0xff) ==… in xhci_init()
2165 …pci_write_config(dev_hdr->header.bus, dev_hdr->header.device, dev_hdr->header.func, 0xd8, 0xffffff… in xhci_init()
2166 …pci_write_config(dev_hdr->header.bus, dev_hdr->header.device, dev_hdr->header.func, 0xd0, 0xffffff… in xhci_init()
[all …]
/DragonOS-0.1.7/kernel/src/driver/base/platform/
Dmod.rs2 bus::{bus_driver_register, bus_register, Bus, BusDriver, BusState},