| /pciutils/lib/ |
| H A D | names.c | 78 res = snprintf(buf, size, "%s", num); in format_name() 82 res = snprintf(buf, size, "%s", name); in format_name() 85 if (res >= size && size >= 4) in format_name() 86 buf[size-2] = buf[size-3] = buf[size-4] = '.'; in format_name() 87 else if (res < 0 || res >= size) in format_name() 99 res = snprintf(buf, size, "%s", num); in format_name_pair() 112 res = snprintf(buf, size, "%s %s", v, d); in format_name_pair() 114 res = snprintf(buf, size, "Device %s", num); in format_name_pair() 118 if (res >= size && size >= 4) in format_name_pair() 119 buf[size-2] = buf[size-3] = buf[size-4] = '.'; in format_name_pair() [all …]
|
| H A D | physmem-djgpp.c | 36 aligned_alloc(size_t alignment, size_t size) in aligned_alloc() argument 48 ptr_alloc = malloc(size + alignment); in aligned_alloc() 64 return memalign(alignment, size); in aligned_alloc() 154 unsigned long size; in set_and_get_page_attributes() local 159 size = mi->size; in set_and_get_page_attributes() 188 mi->size = size; in set_and_get_page_attributes() 191 for (i = 0; i < mi->size; i++) in set_and_get_page_attributes() 392 unsigned long size; in physmem_map() local 630 size = mi.size; in physmem_map() 632 mi.size = size; in physmem_map() [all …]
|
| H A D | hurd.c | 272 mach_msg_type_number_t size = sizeof(regions); in hurd_fill_regions() local 274 int err = pci_get_dev_regions(device_port, &buf, &size); in hurd_fill_regions() 281 if (size > sizeof(regions)) in hurd_fill_regions() 287 memcpy(®ions, buf, size); in hurd_fill_regions() 293 if (regions[i].size == 0) in hurd_fill_regions() 301 d->size[i] = regions[i].size; in hurd_fill_regions() 313 mach_msg_type_number_t size = sizeof(rom); in hurd_fill_rom() local 315 int err = pci_get_dev_rom(device_port, &buf, &size); in hurd_fill_rom() 322 if (size > sizeof(rom)) in hurd_fill_rom() 328 memcpy(&rom, buf, size); in hurd_fill_rom() [all …]
|
| H A D | init.c | 242 pci_malloc(struct pci_access *a, int size) in pci_malloc() argument 244 void *x = malloc(size); in pci_malloc() 247 …&& a->error ? a->error : pci_generic_error)("Out of memory (allocation of %d bytes failed)", size); in pci_malloc() 304 size_t size; in pci_init_name_list_path() local 323 size = 256; /* initial buffer size (more than sizeof(PCI_IDS)-4) */ in pci_init_name_list_path() 325 path = pci_malloc(a, size); in pci_init_name_list_path() 326 len = GetModuleFileName(module, path, size-sizeof(PCI_IDS)-4); /* 4 for "\\\\?\\" */ in pci_init_name_list_path() 327 if (len >= size-sizeof(PCI_IDS)-4) in pci_init_name_list_path() 330 size *= 2; in pci_init_name_list_path()
|
| H A D | win32-helpers.c | 1137 DWORD size, length; in win32_find_and_open_process_for_query() local 1186 size = 1024 * sizeof(*processes); in win32_find_and_open_process_for_query() 1189 processes = (DWORD *)LocalAlloc(LPTR, size); in win32_find_and_open_process_for_query() 1197 if (!MyEnumProcesses(processes, size, &length)) in win32_find_and_open_process_for_query() 1204 else if (size == length) in win32_find_and_open_process_for_query() 1213 size *= 2; in win32_find_and_open_process_for_query() 1239 size = 256; in win32_find_and_open_process_for_query() 1244 path = (LPWSTR)LocalAlloc(LPTR, size * sizeof(*path)); in win32_find_and_open_process_for_query() 1249 length = MyGetProcessImageFileNameW(process, path, size); in win32_find_and_open_process_for_query() 1283 (!MyGetProcessImageFileNameW && (length == size || length == size-1))) in win32_find_and_open_process_for_query() [all …]
|
| H A D | sysfs.c | 159 struct { pciaddr_t flags, base_addr, size; } lines[10]; in sysfs_get_resources() member 171 unsigned long long start, end, size, flags; in sysfs_get_resources() local 177 size = end - start + 1; in sysfs_get_resources() 179 size = 0; in sysfs_get_resources() 185 d->size[i] = size; in sysfs_get_resources() 193 d->rom_size = size; in sysfs_get_resources() 214 lines[i-7].size = size; in sysfs_get_resources() 224 d->bridge_size[i] = lines[offset+i].size; in sysfs_get_resources()
|
| H A D | rt-thread-smart-dm.c | 91 &d->size[0], in rt_thread_smart_dm_scan() 92 &d->size[1], in rt_thread_smart_dm_scan() 93 &d->size[2], in rt_thread_smart_dm_scan() 94 &d->size[3], in rt_thread_smart_dm_scan() 95 &d->size[4], in rt_thread_smart_dm_scan() 96 &d->size[5], in rt_thread_smart_dm_scan()
|
| H A D | proc.c | 89 &d->size[0], in proc_scan() 90 &d->size[1], in proc_scan() 91 &d->size[2], in proc_scan() 92 &d->size[3], in proc_scan() 93 &d->size[4], in proc_scan() 94 &d->size[5], in proc_scan()
|
| H A D | win32-kldbg.c | 650 DWORD size; in win32_kldbg_scan() local 665 size = MyGetSystemFirmwareTable(0x41435049, 0x4746434D, NULL, 0); in win32_kldbg_scan() 666 if (size == 0) in win32_kldbg_scan() 677 mcfg = pci_malloc(a, size); in win32_kldbg_scan() 679 if (MyGetSystemFirmwareTable(0x41435049, 0x4746434D, mcfg, size) != size) in win32_kldbg_scan() 687 if (size < sizeof(*mcfg) || size < mcfg->length) in win32_kldbg_scan()
|
| H A D | physmem-windows.c | 163 w32skrnl_physical_address_mapping(struct physmem *physmem, DWORD phys_addr, DWORD size, DWORD *virt… in w32skrnl_physical_address_mapping() argument 167 DWORD size_hi = size >> 16; in w32skrnl_physical_address_mapping() 168 DWORD size_lo = size & 0xffff; in w32skrnl_physical_address_mapping() 181 if ((u64)phys_addr + size > 1*1024*1024UL) in w32skrnl_physical_address_mapping() 249 vdxcall_physical_address_mapping(struct physmem *physmem, DWORD phys_addr, DWORD size, DWORD *virt_… in vdxcall_physical_address_mapping() argument 253 DWORD size_hi = size >> 16; in vdxcall_physical_address_mapping() 254 DWORD size_lo = size & 0xffff; in vdxcall_physical_address_mapping()
|
| H A D | win32-cfgmgr32.c | 338 UINT (WINAPI *get_system_root_path)(LPWSTR buffer, UINT size) = NULL; in get_driver_path_for_service() 996 pciaddr_t start, end, size, flags; in fill_resources() local 1043 size = (end > start) ? (end - start + 1) : 0; in fill_resources() 1071 d->size[bar_res_count] = size; in fill_resources() 1078 d->bridge_size[0] = size; in fill_resources() 1088 size = (end > start) ? (end - start + 1) : 0; in fill_resources() 1120 d->size[bar_res_count] = size; in fill_resources() 1130 d->bridge_size[1] = size; in fill_resources() 1137 d->bridge_size[2] = size; in fill_resources()
|
| H A D | ecam.c | 391 DWORD size; in get_system_firmware_table_acpi_mcfg() local 403 size = MyGetSystemFirmwareTable(0x41435049, 0x4746434D, NULL, 0); in get_system_firmware_table_acpi_mcfg() 404 if (size == 0) in get_system_firmware_table_acpi_mcfg() 415 mcfg = pci_malloc(a, size); in get_system_firmware_table_acpi_mcfg() 417 if (MyGetSystemFirmwareTable(0x41435049, 0x4746434D, mcfg, size) != size) in get_system_firmware_table_acpi_mcfg() 425 …if (size < sizeof(*mcfg) || size < mcfg->sdt.length || calculate_checksum((u8 *)mcfg, mcfg->sdt.le… in get_system_firmware_table_acpi_mcfg()
|
| H A D | names-hash.c | 32 static void *id_alloc(struct pci_access *a, unsigned int size) in id_alloc() argument 43 if (!buck || buck->full + size > BUCKET_SIZE) in id_alloc() 51 buck->full = BUCKET_ALIGN(buck->full + size); in id_alloc()
|
| H A D | i386-io-beos.h | 12 extern int read_isa_io(int pci_bus, void *addr, int size); 13 extern int write_isa_io(int pci_bus, void *addr, int size, u32 value);
|
| H A D | i386-io-haiku.h | 46 uint8 size; // == index for POKE_PORT_INDEXED_* member 56 uint8 size; member
|
| H A D | pci.h | 149 pciaddr_t size[6]; /* Region sizes */ member 298 char *pci_lookup_name(struct pci_access *a, char *buf, int size, int flags, ...) PCI_ABI;
|
| /pciutils/tests/ |
| H A D | cap-vendor-virtio | 8 Region 0: I/O ports at c060 [size=32] 11 Expansion ROM at feb80000 [disabled] [size=256K] 16 BAR=2 offset=00003000 size=00040000 19 BAR=2 offset=00002000 size=00001000 21 BAR=2 offset=00001000 size=00001000 23 BAR=2 offset=00000000 size=00001000 52 BAR=0 offset=00003000 size=0000003c 54 BAR=0 offset=0000303c size=00000004 56 BAR=0 offset=00003040 size=00000008 multiplier=00000004 58 BAR=0 offset=00003048 size=0000002c [all …]
|
| H A D | cap-pcie-2 | 7 Region 0: Memory at e0800000 (32-bit, non-prefetchable) [size=128K] 8 Region 1: Memory at e0000000 (32-bit, non-prefetchable) [size=4M] 9 Region 2: I/O ports at 1020 [size=32] 10 Region 3: Memory at e0840000 (32-bit, non-prefetchable) [size=16K] 11 Expansion ROM at c7800000 [disabled] [size=4M]
|
| H A D | cap-vc-and-rcl | 1484 Region 4: I/O ports at 6080 [size=32] 1510 Region 4: I/O ports at 6060 [size=32] 1536 Region 4: I/O ports at 6040 [size=32] 1562 Region 4: I/O ports at 6020 [size=32] 1667 Region 0: I/O ports at 01f0 [size=8] 1668 Region 1: I/O ports at 03f4 [size=1] 1669 Region 2: I/O ports at 0170 [size=8] 1670 Region 3: I/O ports at 0374 [size=1] 1671 Region 4: I/O ports at 60a0 [size=16] 1698 Region 4: I/O ports at 6000 [size=32] [all …]
|
| H A D | cap-pasid-pri | 7 Region 0: Memory at a0000000 (64-bit, non-prefetchable) [size=16M] 8 Region 2: Memory at 90000000 (64-bit, prefetchable) [size=256M] 9 Region 4: I/O ports at 3000 [size=64]
|
| H A D | cap-dvsec-cxl | 7 Region 0: Memory at a6f00000 (32-bit, non-prefetchable) [disabled] [size=1M] 8 Region 2: I/O ports at a400 [disabled] [size=1K] 9 Region 4: Memory at a0000000 (32-bit, prefetchable) [disabled] [size=16M] 65 BAR 4: current size: 16MB, supported: 16MB 32MB
|
| H A D | cap-address-xlation | 7 Region 0: Memory at 50000000 (64-bit, prefetchable) [size=16M] 8 Region 2: Memory at 53100000 (64-bit, non-prefetchable) [size=1M]
|
| H A D | cap-ea-1 | 6 Region 0: [virtual] Memory at 843000000000 (32-bit, non-prefetchable) [size=1G] 7 Region 4: [virtual] Memory at 843060000000 (32-bit, non-prefetchable) [size=1M]
|
| /pciutils/ |
| H A D | ls-caps-vendor.c | 23 u32 size; in show_vendor_caps_virtio() local 60 size = get_conf_long(d, where + 12); in show_vendor_caps_virtio() 63 get_conf_byte(d, where + 4), offset, size); in show_vendor_caps_virtio() 70 (u64) size | (u64) size_hi << 32, in show_vendor_caps_virtio()
|
| H A D | ls-caps.c | 1093 if (p->base_addr[i] || p->size[i]) in device_has_memory_space_bar() 1466 int size; in cap_express() local 1520 size = 16; in cap_express() 1522 size = 24; in cap_express() 1524 size = 32; in cap_express() 1525 if (!config_fetch(d, where + PCI_EXP_DEVCAP, size)) in cap_express() 1542 size = 16; in cap_express() 1544 size = 24; in cap_express() 1545 if (!config_fetch(d, where + PCI_EXP_DEVCAP2, size)) in cap_express()
|