mainboard/intel/apollolake_rvp: Include FADT tables
[coreboot.git] / src / mainboard / intel / apollolake_rvp / acpi_tables.c
blob5a1628cb7e1ea124dc24b526e9e2917524b93a63
1 /*
2 * This file is part of the coreboot project.
4 * Copyright (C) 2016 Intel Corp.
5 * (Written by Lance Zhao <lijian.zhao@intel.com> for Intel Corp.)
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
13 #include <string.h>
14 #include <soc/acpi.h>
16 void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
18 acpi_header_t *header = &(fadt->header);
20 memset(fadt, 0, sizeof(acpi_fadt_t));
21 memcpy(header->signature, "FACP", 4);
22 header->length = sizeof(acpi_fadt_t);
23 header->revision = 5; /* Major Revision of ACPI5.0 */
24 memcpy(header->oem_id, OEM_ID, 6);
25 memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
26 memcpy(header->asl_compiler_id, ASLC, 4);
27 header->asl_compiler_revision = 20150717; /* iASL verison */
29 fadt->firmware_ctrl = (uintptr_t)facs;
30 fadt->dsdt = (uintptr_t)dsdt;
31 fadt->model = 1; /* compatibilty with ACPI1.0 */
32 fadt->preferred_pm_profile = PM_MOBILE;
34 fadt->x_firmware_ctl_l = (uintptr_t)facs;
35 fadt->x_firmware_ctl_h = 0; /* 32bit physical address */
36 fadt->x_dsdt_l = (uintptr_t)dsdt;
37 fadt->x_dsdt_h = 0; /* 32bit physical address */
39 soc_fill_common_fadt(fadt);
41 header->checksum = acpi_checksum((void *)fadt, header->length);