Lines Matching refs:mcfg

98   struct acpi_mcfg *mcfg;  member
117 get_mcfg_allocations_count(struct acpi_mcfg *mcfg) in get_mcfg_allocations_count() argument
119 …return (mcfg->sdt.length - ((unsigned char *)&mcfg->allocations - (unsigned char *)mcfg)) / sizeof… in get_mcfg_allocations_count()
388 struct acpi_mcfg *mcfg; in get_system_firmware_table_acpi_mcfg() local
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()
421 pci_mfree(mcfg); 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()
428 pci_mfree(mcfg); in get_system_firmware_table_acpi_mcfg()
432 return mcfg; in get_system_firmware_table_acpi_mcfg()
444 struct acpi_mcfg *mcfg; local
468 mcfg = get_system_firmware_table_acpi_mcfg(a);
469 if (mcfg)
470 return mcfg;
495 if (length > 0 && (size_t)length > sizeof(*mcfg))
498 mcfg = pci_malloc(a, length);
499 if (fread(mcfg, 1, length, mcfg_file) == (size_t)length &&
500 memcmp(mcfg->sdt.signature, "MCFG", 4) == 0 &&
501 mcfg->sdt.length <= (size_t)length &&
502 calculate_checksum((u8 *)mcfg, mcfg->sdt.length) == 0)
505 return mcfg;
507 pci_mfree(mcfg);
530 mcfg = NULL;
543 mcfg = pci_malloc(a, sdt->length);
544 memcpy(mcfg, sdt, sdt->length);
550 if (mcfg)
553 return mcfg;
567 mcfg = pci_malloc(a, sdt->length);
568 memcpy(mcfg, sdt, sdt->length);
574 if (mcfg)
577 return mcfg;
586 get_mcfg_allocation(struct acpi_mcfg *mcfg, unsigned int i, int *domain, u8 *start_bus, u8 *end_bus… argument
588 …int buses = (int)mcfg->allocations[i].end_bus_number - (int)mcfg->allocations[i].start_bus_number …
591 *domain = mcfg->allocations[i].pci_segment;
593 *start_bus = mcfg->allocations[i].start_bus_number;
595 *end_bus = mcfg->allocations[i].end_bus_number;
597 *addr = mcfg->allocations[i].address;
760 get_bus_addr(struct acpi_mcfg *mcfg, const char *addrs, int domain, u8 bus, u64 *addr, u32 *length) argument
769 if (mcfg)
771 count = get_mcfg_allocations_count(mcfg);
774 … get_mcfg_allocation(mcfg, i, &cur_domain, &start_bus, &end_bus, &start_addr, &total_length);
831 if (!get_bus_addr(eacc->mcfg, addrs, domain, bus, &addr, &length))
995 eacc->mcfg = NULL;
998 eacc->mcfg = find_mcfg(a, acpimcfg, efisystab, use_bsd, use_x86bios);
999 if (!eacc->mcfg)
1051 eacc->mcfg = NULL;
1068 if (!eacc->mcfg)
1069 eacc->mcfg = find_mcfg(a, acpimcfg, efisystab, use_bsd, use_x86bios);
1070 if (!eacc->mcfg)
1074 if (eacc->mcfg)
1075 get_mcfg_allocation(eacc->mcfg, 0, &test_domain, &test_bus, NULL, NULL, NULL);
1091 pci_mfree(eacc->mcfg);
1108 if (eacc->mcfg)
1110 count = get_mcfg_allocations_count(eacc->mcfg);
1112 …segments[eacc->mcfg->allocations[i].pci_segment / 32] |= 1 << (eacc->mcfg->allocations[i].pci_segm…