Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/nvdimm/nvdimm_nfit.c
Show First 20 Lines • Show All 195 Lines • ▼ Show 20 Lines | if (subtable == NULL || subtable->HintCount == 0) { | ||||
return; | return; | ||||
} | } | ||||
*countp = subtable->HintCount; | *countp = subtable->HintCount; | ||||
*listp = mallocarray(subtable->HintCount, sizeof(uint64_t *), M_NVDIMM, | *listp = mallocarray(subtable->HintCount, sizeof(uint64_t *), M_NVDIMM, | ||||
M_WAITOK); | M_WAITOK); | ||||
for (i = 0; i < subtable->HintCount; i++) | for (i = 0; i < subtable->HintCount; i++) | ||||
(*listp)[i] = (uint64_t *)(intptr_t)subtable->HintAddress[i]; | (*listp)[i] = (uint64_t *)(intptr_t)subtable->HintAddress[i]; | ||||
} | } | ||||
void | |||||
acpi_nfit_get_memory_maps_by_dimm(ACPI_TABLE_NFIT *nfitbl, nfit_handle_t dimm, | |||||
ACPI_NFIT_MEMORY_MAP ***listp, int *countp) | |||||
{ | |||||
malloc_find_matches(nfitbl, ACPI_NFIT_TYPE_MEMORY_MAP, | |||||
offsetof(ACPI_NFIT_MEMORY_MAP, DeviceHandle), UINT32_MAX, dimm, | |||||
(void ***)listp, countp); | |||||
} |