Add IRQ12 to the dbm690t mptable for mouse interrupt support.
[coreboot.git] / src / mainboard / amd / dbm690t / fadt.c
1 /*\r
2  * This file is part of the coreboot project.\r
3  *\r
4  * Copyright (C) 2008 Advanced Micro Devices, Inc.\r
5  *\r
6  * This program is free software; you can redistribute it and/or modify\r
7  * it under the terms of the GNU General Public License as published by\r
8  * the Free Software Foundation; version 2 of the License.\r
9  *\r
10  * This program is distributed in the hope that it will be useful,\r
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
13  * GNU General Public License for more details.\r
14  *\r
15  * You should have received a copy of the GNU General Public License\r
16  * along with this program; if not, write to the Free Software\r
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA\r
18  */\r
19 #include <string.h>\r
20 #include <console/console.h>\r
21 #include <arch/acpi.h>\r
22 \r
23 \r
24 \r
25 /**\r
26  * Create the Fixed ACPI Description Tables (FADT) for this board.\r
27  The FADT defines various fixed hardware ACPI information vital to an ACPI-compatible\r
28  OS, such as the base address for the following hardware registers blocks:\r
29  PM1a_EVT_BLK, PM1b_EVT_BLK, PM1a_CNT_BLK, PM1b_CNT_BLK,\r
30  PM2_CNT_BLK, PM_TMR_BLK, GPE0_BLK and GPE1_BLK.\r
31  The FADT also has a pointer to the DSDT that contains the Differentiated Definition Block,\r
32  which in turn provides variable information to an ACPI-compatible OS concerning the base\r
33  system design.\r
34 \r
35  Not all blocks are necessary usualy only PM1a, PMTMR and GPE0 are used.\r
36  */\r
37 void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)\r
38 {\r
39         acpi_header_t *header=&(fadt->header);\r
40         \r
41         printk_debug("pm_base: 0x%04x\n", pm_base);\r
42         \r
43         memset((void *)fadt,0,sizeof(acpi_fadt_t));\r
44 \r
45         /* Prepare the header */\r
46         memcpy(header->signature,"FACP",4);\r
47         header->length = 244;\r
48         header->revision = 1;\r
49         memcpy(header->oem_id,OEM_ID,6);\r
50         memcpy(header->oem_table_id,"LXBACPI ",8);\r
51         memcpy(header->asl_compiler_id,ASLC,4);\r
52         header->asl_compiler_revision=0;\r
53 \r
54         \r
55         fadt->firmware_ctrl=(u32)facs;\r
56         fadt->dsdt= (u32)dsdt;\r
57 \r
58         /*\r
59         0:      unspecified\r
60         1:      desktop\r
61         2:      mobile\r
62         3:      workstation\r
63         4:      enterprise server\r
64         */\r
65         fadt->preferred_pm_profile=0x01;\r
66 \r
67         /*\r
68         System vector the SCI interrupt is wired to in 8259 mode. \r
69         On systems that do not contain the 8259, this field contains the Global\r
70         System interrupt number of the SCI interrupt. OSPM is required to treat\r
71         the ACPI SCI interrupt as a sharable, level, active low interrupt.\r
72         SB600 BDG 4.1\r
73         */\r
74         fadt->sci_int=4;\r
75 \r
76         /*\r
77         System port address of the SMI Command Port. During ACPI OS initialization,\r
78         OSPM can determine that the ACPI hardware registers are owned by SMI (by way\r
79         of the SCI_EN bit), in which case the ACPI OS issues the ACPI_ENABLE command\r
80         to the SMI_CMD port. The SCI_EN bit effectively tracks the ownership of the\r
81         ACPI hardware registers. OSPM issues commands to the SMI_CMD port\r
82         synchronously from the boot processor.\r
83         This filed is reserved and must be zero on system that does not support\r
84         System Management mode.\r
85         */\r
86         fadt->smi_cmd = 0;\r
87 \r
88         /*Those two fields are reserved and must be zero on systems that do not\r
89         support Legacy Mode.*/\r
90         fadt->acpi_enable = 0;\r
91         fadt->acpi_disable = 0;\r
92         \r
93         fadt->s4bios_req = 0x0;\r
94         fadt->pstate_cnt = 0x0;\r
95         \r
96 }\r