SMM for AMD K8 Part 1/2
[coreboot.git] / src / mainboard / via / epia-n / fadt.c
index f9e2871d804a06efc35213fff833f2a7fe342023..7ff9a34b48d244fabc6bdc56c9a85f050875df66 100644 (file)
@@ -1,13 +1,13 @@
 /*
- * ACPI - create the Fixed ACPI Description Tables (FADT)
- * (C) Copyright 2004 Nick Barker <nick.barker9@btinternet.com>
- * (C) Copyright 2009 Jon Harrison <bothlyn@blueyonder.co.uk>
+ * This file is part of the coreboot project.
  *
+ * Copyright (C) 2004 Nick Barker <nick.barker9@btinternet.com>
+ * Copyright (C) 2009 Jon Harrison <bothlyn@blueyonder.co.uk>
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
- * MA 02110-1301 USA
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+/*
+ * ACPI - create the Fixed ACPI Description Tables (FADT)
+ */
 
 #include <string.h>
 #include <arch/acpi.h>
-#include "../../../southbridge/via/vt8237r/vt8237r.h"
+#include <device/device.h>
+#include "southbridge/via/vt8237r/vt8237r.h"
 
 void acpi_create_fadt(acpi_fadt_t *fadt,acpi_facs_t *facs,void *dsdt){
        acpi_header_t *header=&(fadt->header);
@@ -31,14 +34,14 @@ void acpi_create_fadt(acpi_fadt_t *fadt,acpi_facs_t *facs,void *dsdt){
        memset((void *)fadt,0,sizeof(acpi_fadt_t));
        memcpy(header->signature,"FACP",4);
        header->length = 244;
-       header->revision = 1;
+       header->revision = 3;
        memcpy(header->oem_id,OEM_ID,6);
        memcpy(header->oem_table_id,"COREBOOT",8);
        memcpy(header->asl_compiler_id,ASLC,4);
        header->asl_compiler_revision=0;
 
-       fadt->firmware_ctrl=facs;
-       fadt->dsdt= dsdt;
+       fadt->firmware_ctrl=(u32)facs;
+       fadt->dsdt= (u32)dsdt;
        fadt->preferred_pm_profile=0;
        fadt->sci_int=VT8237R_ACPI_IRQ;
        fadt->smi_cmd = 0;
@@ -84,9 +87,9 @@ void acpi_create_fadt(acpi_fadt_t *fadt,acpi_facs_t *facs,void *dsdt){
        fadt->reset_reg.addrh = 0x0;
 
        fadt->reset_value = 0;
-       fadt->x_firmware_ctl_l = facs;
+       fadt->x_firmware_ctl_l = (u32)facs;
        fadt->x_firmware_ctl_h = 0;
-       fadt->x_dsdt_l = dsdt;
+       fadt->x_dsdt_l = (u32)dsdt;
        fadt->x_dsdt_h = 0;
 
        fadt->x_pm1a_evt_blk.space_id = 1;