Lines Matching refs:ctxt
74 static struct acpi_20_madt *construct_madt(struct acpi_ctxt *ctxt, in construct_madt() argument
93 madt = ctxt->mem_ops.alloc(ctxt, sz, 16); in construct_madt()
151 info->madt_lapic0_addr = ctxt->mem_ops.v2p(ctxt, lapic); in construct_madt()
169 ctxt->mem_ops.v2p(ctxt, &madt->header.checksum); in construct_madt()
174 static struct acpi_20_hpet *construct_hpet(struct acpi_ctxt *ctxt, in construct_hpet() argument
179 hpet = ctxt->mem_ops.alloc(ctxt, sizeof(*hpet), 16); in construct_hpet()
198 static struct acpi_20_waet *construct_waet(struct acpi_ctxt *ctxt, in construct_waet() argument
203 waet = ctxt->mem_ops.alloc(ctxt, sizeof(*waet), 16); in construct_waet()
214 static struct acpi_20_srat *construct_srat(struct acpi_ctxt *ctxt, in construct_srat() argument
227 p = ctxt->mem_ops.alloc(ctxt, size, 16); in construct_srat()
273 static struct acpi_20_slit *construct_slit(struct acpi_ctxt *ctxt, in construct_slit() argument
282 slit = ctxt->mem_ops.alloc(ctxt, size, 16); in construct_slit()
306 static int construct_passthrough_tables(struct acpi_ctxt *ctxt, in construct_passthrough_tables() argument
330 buffer = ctxt->mem_ops.alloc(ctxt, header->length, 16); in construct_passthrough_tables()
335 table_ptrs[nr_tables++] = ctxt->mem_ops.v2p(ctxt, buffer); in construct_passthrough_tables()
343 static int construct_secondary_tables(struct acpi_ctxt *ctxt, in construct_secondary_tables() argument
360 madt = construct_madt(ctxt, config, info); in construct_secondary_tables()
362 table_ptrs[nr_tables++] = ctxt->mem_ops.v2p(ctxt, madt); in construct_secondary_tables()
368 hpet = construct_hpet(ctxt, config); in construct_secondary_tables()
370 table_ptrs[nr_tables++] = ctxt->mem_ops.v2p(ctxt, hpet); in construct_secondary_tables()
376 waet = construct_waet(ctxt, config); in construct_secondary_tables()
379 table_ptrs[nr_tables++] = ctxt->mem_ops.v2p(ctxt, waet); in construct_secondary_tables()
384 ssdt = ctxt->mem_ops.alloc(ctxt, sizeof(ssdt_pm), 16); in construct_secondary_tables()
387 table_ptrs[nr_tables++] = ctxt->mem_ops.v2p(ctxt, ssdt); in construct_secondary_tables()
392 ssdt = ctxt->mem_ops.alloc(ctxt, sizeof(ssdt_s3), 16); in construct_secondary_tables()
395 table_ptrs[nr_tables++] = ctxt->mem_ops.v2p(ctxt, ssdt); in construct_secondary_tables()
402 ssdt = ctxt->mem_ops.alloc(ctxt, sizeof(ssdt_s4), 16); in construct_secondary_tables()
405 table_ptrs[nr_tables++] = ctxt->mem_ops.v2p(ctxt, ssdt); in construct_secondary_tables()
412 ssdt = ctxt->mem_ops.alloc(ctxt, sizeof(ssdt_laptop_slate), 16); in construct_secondary_tables()
415 table_ptrs[nr_tables++] = ctxt->mem_ops.v2p(ctxt, ssdt); in construct_secondary_tables()
426 ssdt = ctxt->mem_ops.alloc(ctxt, sizeof(ssdt_tpm), 16); in construct_secondary_tables()
429 table_ptrs[nr_tables++] = ctxt->mem_ops.v2p(ctxt, ssdt); in construct_secondary_tables()
431 tcpa = ctxt->mem_ops.alloc(ctxt, sizeof(struct acpi_20_tcpa), 16); in construct_secondary_tables()
434 table_ptrs[nr_tables++] = ctxt->mem_ops.v2p(ctxt, tcpa); in construct_secondary_tables()
444 if ( (lasa = ctxt->mem_ops.alloc(ctxt, ACPI_2_0_TCPA_LAML_SIZE, 16)) != NULL ) in construct_secondary_tables()
446 tcpa->lasa = ctxt->mem_ops.v2p(ctxt, lasa); in construct_secondary_tables()
458 struct acpi_20_srat *srat = construct_srat(ctxt, config); in construct_secondary_tables()
459 struct acpi_20_slit *slit = construct_slit(ctxt, config); in construct_secondary_tables()
462 table_ptrs[nr_tables++] = ctxt->mem_ops.v2p(ctxt, srat); in construct_secondary_tables()
466 table_ptrs[nr_tables++] = ctxt->mem_ops.v2p(ctxt, slit); in construct_secondary_tables()
472 nr_tables += construct_passthrough_tables(ctxt, table_ptrs, in construct_secondary_tables()
486 static int new_vm_gid(struct acpi_ctxt *ctxt, in new_vm_gid() argument
499 buf = ctxt->mem_ops.alloc(ctxt, sizeof(config->vm_gid), 8); in new_vm_gid()
505 info->vm_gid_addr = ctxt->mem_ops.v2p(ctxt, buf); in new_vm_gid()
511 int acpi_build_tables(struct acpi_ctxt *ctxt, struct acpi_config *config) in acpi_build_tables() argument
543 facs = ctxt->mem_ops.alloc(ctxt, sizeof(struct acpi_20_facs), 16); in acpi_build_tables()
557 dsdt = ctxt->mem_ops.alloc(ctxt, config->dsdt_15cpu_len, 16); in acpi_build_tables()
563 dsdt = ctxt->mem_ops.alloc(ctxt, config->dsdt_anycpu_len, 16); in acpi_build_tables()
576 fadt_10 = ctxt->mem_ops.alloc(ctxt, sizeof(struct acpi_10_fadt), 16); in acpi_build_tables()
581 fadt_10->dsdt = ctxt->mem_ops.v2p(ctxt, dsdt); in acpi_build_tables()
582 fadt_10->firmware_ctrl = ctxt->mem_ops.v2p(ctxt, facs); in acpi_build_tables()
603 fadt = ctxt->mem_ops.alloc(ctxt, fadt_size, 16); in acpi_build_tables()
619 fadt->dsdt = ctxt->mem_ops.v2p(ctxt, dsdt); in acpi_build_tables()
620 fadt->x_dsdt = ctxt->mem_ops.v2p(ctxt, dsdt); in acpi_build_tables()
621 fadt->firmware_ctrl = ctxt->mem_ops.v2p(ctxt, facs); in acpi_build_tables()
622 fadt->x_firmware_ctrl = ctxt->mem_ops.v2p(ctxt, facs); in acpi_build_tables()
638 nr_secondaries = construct_secondary_tables(ctxt, secondary_tables, in acpi_build_tables()
643 xsdt = ctxt->mem_ops.alloc(ctxt, sizeof(struct acpi_20_xsdt) + in acpi_build_tables()
648 xsdt->entry[0] = ctxt->mem_ops.v2p(ctxt, fadt); in acpi_build_tables()
656 rsdt = ctxt->mem_ops.alloc(ctxt, sizeof(struct acpi_20_rsdt) + in acpi_build_tables()
661 rsdt->entry[0] = ctxt->mem_ops.v2p(ctxt, fadt_10); in acpi_build_tables()
675 rsdp->rsdt_address = ctxt->mem_ops.v2p(ctxt, rsdt); in acpi_build_tables()
676 rsdp->xsdt_address = ctxt->mem_ops.v2p(ctxt, xsdt); in acpi_build_tables()
684 if ( !new_vm_gid(ctxt, config, acpi_info) ) in acpi_build_tables()