Lines Matching refs:rsdp
32 static void acpi_write_rsdp(struct acpi_rsdp *rsdp, struct acpi_rsdt *rsdt, in acpi_write_rsdp() argument
35 memset(rsdp, 0, sizeof(struct acpi_rsdp)); in acpi_write_rsdp()
37 memcpy(rsdp->signature, RSDP_SIG, 8); in acpi_write_rsdp()
38 memcpy(rsdp->oem_id, OEM_ID, 6); in acpi_write_rsdp()
40 rsdp->length = sizeof(struct acpi_rsdp); in acpi_write_rsdp()
41 rsdp->rsdt_address = (u32)rsdt; in acpi_write_rsdp()
51 rsdp->revision = ACPI_RSDP_REV_ACPI_1_0; in acpi_write_rsdp()
53 rsdp->xsdt_address = (u64)(u32)xsdt; in acpi_write_rsdp()
54 rsdp->revision = ACPI_RSDP_REV_ACPI_2_0; in acpi_write_rsdp()
58 rsdp->checksum = table_compute_checksum((void *)rsdp, 20); in acpi_write_rsdp()
59 rsdp->ext_checksum = table_compute_checksum((void *)rsdp, in acpi_write_rsdp()
108 static void acpi_add_table(struct acpi_rsdp *rsdp, void *table) in acpi_add_table() argument
115 rsdt = (struct acpi_rsdt *)rsdp->rsdt_address; in acpi_add_table()
117 if (rsdp->xsdt_address) in acpi_add_table()
118 xsdt = (struct acpi_xsdt *)((u32)rsdp->xsdt_address); in acpi_add_table()
367 struct acpi_rsdp *rsdp; in write_acpi_tables() local
385 rsdp = (struct acpi_rsdp *)current; in write_acpi_tables()
402 acpi_write_rsdp(rsdp, rsdt, xsdt); in write_acpi_tables()
447 acpi_add_table(rsdp, fadt); in write_acpi_tables()
453 acpi_add_table(rsdp, madt); in write_acpi_tables()
460 acpi_add_table(rsdp, mcfg); in write_acpi_tables()
465 acpi_rsdp_addr = (unsigned long)rsdp; in write_acpi_tables()
486 static struct acpi_rsdp *acpi_valid_rsdp(struct acpi_rsdp *rsdp) in acpi_valid_rsdp() argument
488 if (strncmp((char *)rsdp, RSDP_SIG, sizeof(RSDP_SIG) - 1) != 0) in acpi_valid_rsdp()
491 debug("Looking on %p for valid checksum\n", rsdp); in acpi_valid_rsdp()
493 if (table_compute_checksum((void *)rsdp, 20) != 0) in acpi_valid_rsdp()
497 if ((rsdp->revision > 1) && in acpi_valid_rsdp()
498 (table_compute_checksum((void *)rsdp, rsdp->length) != 0)) in acpi_valid_rsdp()
502 return rsdp; in acpi_valid_rsdp()
508 struct acpi_rsdp *rsdp = NULL; in acpi_find_fadt() local
515 rsdp = acpi_valid_rsdp((struct acpi_rsdp *)p); in acpi_find_fadt()
516 if (rsdp) in acpi_find_fadt()
520 if (rsdp == NULL) in acpi_find_fadt()
523 debug("RSDP found at %p\n", rsdp); in acpi_find_fadt()
524 rsdt = (struct acpi_rsdt *)rsdp->rsdt_address; in acpi_find_fadt()