blob: bdc0d5c15c9b667a58a33a859ed296764614089c [file] [log] [blame]
Hannah Williams4cff1d52016-06-08 14:29:47 -07001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2007-2009 coresystems GmbH
5 * Copyright (C) 2012 Google Inc.
6 * Copyright (C) 2016 Intel Corp
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; version 2 of the License.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 */
17
18#include <include/console/post_codes.h>
19
20/* Port 80 POST */
21
22OperationRegion (POST, SystemIO, CONFIG_POST_IO_PORT, 1)
23Field (POST, ByteAcc, Lock, Preserve)
24{
25 DBG0, 8
26}
27
28/*
29 * The _PTS method (Prepare To Sleep) is called before the OS is
30 * entering a sleep state. The sleep state number is passed in Arg0
31 */
32
33Method (_PTS, 1)
34{
35 Store (POST_OS_ENTER_PTS, DBG0)
Duncan Laurie0dd91352018-11-05 16:27:33 -070036
Julius Wernercd49cce2019-03-05 16:53:33 -080037#if CONFIG(SOC_INTEL_COMMON_ACPI_EC_PTS_WAK)
Duncan Laurie0dd91352018-11-05 16:27:33 -070038 /* Call EC _PTS handler */
39 \_SB.PCI0.LPCB.EC0.PTS (Arg0)
40#endif
Hannah Williams4cff1d52016-06-08 14:29:47 -070041}
42
43/* The _WAK method is called on system wakeup */
44
45Method (_WAK, 1)
46{
47 Store (POST_OS_ENTER_WAKE, DBG0)
Duncan Laurie0dd91352018-11-05 16:27:33 -070048
Julius Wernercd49cce2019-03-05 16:53:33 -080049#if CONFIG(SOC_INTEL_COMMON_ACPI_EC_PTS_WAK)
Duncan Laurie0dd91352018-11-05 16:27:33 -070050 /* Call EC _WAK handler */
51 \_SB.PCI0.LPCB.EC0.WAK (Arg0)
52#endif
53
Hannah Williams4cff1d52016-06-08 14:29:47 -070054 Return (Package(){0,0})
55}