Hannah Williams | 01bc897 | 2016-02-04 20:13:34 -0800 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2013 Google Inc. |
| 5 | * Copyright (C) 2015-2016 Intel Corp. |
| 6 | * |
| 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; version 2 of the License, or (at your option) |
| 10 | * any later version. |
| 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 | |
Alexandru Gagniuc | a633980 | 2016-04-05 12:40:24 -0700 | [diff] [blame] | 18 | #define __SIMPLE_DEVICE__ |
| 19 | |
Hannah Williams | 01bc897 | 2016-02-04 20:13:34 -0800 | [diff] [blame] | 20 | #include <arch/io.h> |
| 21 | #include <console/console.h> |
| 22 | #include <rules.h> |
| 23 | #include <device/pci_def.h> |
| 24 | #include <soc/iomap.h> |
Alexandru Gagniuc | a633980 | 2016-04-05 12:40:24 -0700 | [diff] [blame] | 25 | #include <soc/pci_devs.h> |
Hannah Williams | 01bc897 | 2016-02-04 20:13:34 -0800 | [diff] [blame] | 26 | #include <soc/pm.h> |
| 27 | #include <device/device.h> |
| 28 | #include <device/pci.h> |
Aaron Durbin | bef75e7 | 2016-05-26 11:00:44 -0500 | [diff] [blame] | 29 | #include <vendorcode/google/chromeos/vboot_common.h> |
Hannah Williams | 01bc897 | 2016-02-04 20:13:34 -0800 | [diff] [blame] | 30 | |
Alexandru Gagniuc | a633980 | 2016-04-05 12:40:24 -0700 | [diff] [blame] | 31 | static uintptr_t read_pmc_mmio_bar(void) |
| 32 | { |
| 33 | uint32_t bar = pci_read_config32(PMC_DEV, PCI_BASE_ADDRESS_0); |
| 34 | return bar & ~PCI_BASE_ADDRESS_MEM_ATTR_MASK; |
| 35 | } |
Hannah Williams | 01bc897 | 2016-02-04 20:13:34 -0800 | [diff] [blame] | 36 | |
Shaunak Saha | 9a0c9ac | 2016-06-27 23:00:15 -0700 | [diff] [blame] | 37 | uintptr_t get_pmc_mmio_bar(void) |
| 38 | { |
| 39 | return read_pmc_mmio_bar(); |
| 40 | } |
| 41 | |
Hannah Williams | 01bc897 | 2016-02-04 20:13:34 -0800 | [diff] [blame] | 42 | static void print_num_status_bits(int num_bits, uint32_t status, |
| 43 | const char * const bit_names[]) |
| 44 | { |
| 45 | int i; |
| 46 | |
| 47 | if (!status) |
| 48 | return; |
| 49 | |
| 50 | for (i = num_bits - 1; i >= 0; i--) { |
| 51 | if (status & (1 << i)) { |
| 52 | if (bit_names[i]) |
| 53 | printk(BIOS_DEBUG, "%s ", bit_names[i]); |
| 54 | else |
| 55 | printk(BIOS_DEBUG, "BIT%d ", i); |
| 56 | } |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | static uint32_t print_smi_status(uint32_t smi_sts) |
| 61 | { |
| 62 | static const char * const smi_sts_bits[] = { |
Aaron Durbin | 7929dd0 | 2016-06-10 18:01:45 -0500 | [diff] [blame] | 63 | [BIOS_SMI_STS] = "BIOS", |
| 64 | [LEGACY_USB_SMI_STS] = "LEGACY USB", |
| 65 | [SLP_SMI_STS] = "SLP_SMI", |
| 66 | [APM_SMI_STS] = "APM", |
| 67 | [SWSMI_TMR_SMI_STS] = "SWSMI_TMR", |
Aaron Durbin | a554b71 | 2016-06-10 18:04:21 -0500 | [diff] [blame] | 68 | [FAKE_PM1_SMI_STS] = "PM1", |
Aaron Durbin | 7929dd0 | 2016-06-10 18:01:45 -0500 | [diff] [blame] | 69 | [GPIO_SMI_STS]= "GPIO_SMI", |
| 70 | [GPIO_UNLOCK_SMI_STS]= "GPIO_UNLOCK_SSMI", |
| 71 | [MC_SMI_STS] = "MCSMI", |
| 72 | [TCO_SMI_STS] = "TCO", |
| 73 | [PERIODIC_SMI_STS] = "PERIODIC", |
| 74 | [SERIRQ_SMI_STS] = "SERIRQ", |
| 75 | [SMBUS_SMI_STS] = "SMBUS_SMI", |
| 76 | [XHCI_SMI_STS] = "XHCI", |
| 77 | [HSMBUS_SMI_STS] = "HOST_SMBUS", |
| 78 | [SCS_SMI_STS] = "SCS", |
| 79 | [PCIE_SMI_STS] = "PCI_EXP_SMI", |
| 80 | [SCC2_SMI_STS] = "SCC2", |
| 81 | [SPI_SSMI_STS] = "SPI_SSMI", |
| 82 | [SPI_SMI_STS] = "SPI", |
| 83 | [PMC_OCP_SMI_STS] = "OCP_CSE", |
Hannah Williams | 01bc897 | 2016-02-04 20:13:34 -0800 | [diff] [blame] | 84 | }; |
| 85 | |
| 86 | if (!smi_sts) |
| 87 | return 0; |
| 88 | |
| 89 | printk(BIOS_DEBUG, "SMI_STS: "); |
| 90 | print_num_status_bits(ARRAY_SIZE(smi_sts_bits), smi_sts, smi_sts_bits); |
| 91 | printk(BIOS_DEBUG, "\n"); |
| 92 | |
| 93 | return smi_sts; |
| 94 | } |
| 95 | |
| 96 | static uint32_t reset_smi_status(void) |
| 97 | { |
| 98 | uint32_t smi_sts = inl(ACPI_PMIO_BASE + SMI_STS); |
| 99 | outl(smi_sts, ACPI_PMIO_BASE + SMI_STS); |
| 100 | return smi_sts; |
| 101 | } |
| 102 | |
| 103 | uint32_t clear_smi_status(void) |
| 104 | { |
Aaron Durbin | a554b71 | 2016-06-10 18:04:21 -0500 | [diff] [blame] | 105 | uint32_t sts = reset_smi_status(); |
| 106 | |
| 107 | /* |
| 108 | * Check for power button status if nothing else is indicating an SMI |
| 109 | * and SMIs aren't turned into SCIs. Apparently, there is no PM1 status |
| 110 | * bit in the SMI status register. That makes things difficult for |
| 111 | * determining if the power button caused an SMI. |
| 112 | */ |
| 113 | if (sts == 0 && !(inl(ACPI_PMIO_BASE + PM1_CNT) & SCI_EN)) { |
| 114 | uint16_t pm1_sts = inw(ACPI_PMIO_BASE + PM1_STS); |
| 115 | |
| 116 | /* Fake PM1 status bit if power button pressed. */ |
| 117 | if (pm1_sts & PWRBTN_STS) |
| 118 | sts |= (1 << FAKE_PM1_SMI_STS); |
| 119 | } |
| 120 | |
| 121 | return print_smi_status(sts); |
Hannah Williams | 01bc897 | 2016-02-04 20:13:34 -0800 | [diff] [blame] | 122 | } |
| 123 | |
| 124 | uint32_t get_smi_en(void) |
| 125 | { |
| 126 | return inl(ACPI_PMIO_BASE + SMI_EN); |
| 127 | } |
| 128 | |
| 129 | void enable_smi(uint32_t mask) |
| 130 | { |
| 131 | uint32_t smi_en = inl(ACPI_PMIO_BASE + SMI_EN); |
| 132 | smi_en |= mask; |
| 133 | outl(smi_en, ACPI_PMIO_BASE + SMI_EN); |
| 134 | } |
| 135 | |
| 136 | void disable_smi(uint32_t mask) |
| 137 | { |
| 138 | uint32_t smi_en = inl(ACPI_PMIO_BASE + SMI_EN); |
| 139 | smi_en &= ~mask; |
| 140 | outl(smi_en, ACPI_PMIO_BASE + SMI_EN); |
| 141 | } |
| 142 | |
| 143 | void enable_pm1_control(uint32_t mask) |
| 144 | { |
| 145 | uint32_t pm1_cnt = inl(ACPI_PMIO_BASE + PM1_CNT); |
| 146 | pm1_cnt |= mask; |
| 147 | outl(pm1_cnt, ACPI_PMIO_BASE + PM1_CNT); |
| 148 | } |
| 149 | |
| 150 | void disable_pm1_control(uint32_t mask) |
| 151 | { |
| 152 | uint32_t pm1_cnt = inl(ACPI_PMIO_BASE + PM1_CNT); |
| 153 | pm1_cnt &= ~mask; |
| 154 | outl(pm1_cnt, ACPI_PMIO_BASE + PM1_CNT); |
| 155 | } |
| 156 | |
| 157 | static uint16_t reset_pm1_status(void) |
| 158 | { |
| 159 | uint16_t pm1_sts = inw(ACPI_PMIO_BASE + PM1_STS); |
| 160 | outw(pm1_sts, ACPI_PMIO_BASE + PM1_STS); |
| 161 | return pm1_sts; |
| 162 | } |
| 163 | |
| 164 | static uint16_t print_pm1_status(uint16_t pm1_sts) |
| 165 | { |
| 166 | static const char * const pm1_sts_bits[] = { |
| 167 | [0] = "TMROF", |
| 168 | [5] = "GBL", |
| 169 | [8] = "PWRBTN", |
| 170 | [10] = "RTC", |
| 171 | [11] = "PRBTNOR", |
| 172 | [13] = "USB", |
| 173 | [14] = "PCIEXPWAK", |
| 174 | [15] = "WAK", |
| 175 | }; |
| 176 | |
| 177 | if (!pm1_sts) |
| 178 | return 0; |
| 179 | |
| 180 | printk(BIOS_SPEW, "PM1_STS: "); |
| 181 | print_num_status_bits(ARRAY_SIZE(pm1_sts_bits), pm1_sts, pm1_sts_bits); |
| 182 | printk(BIOS_SPEW, "\n"); |
| 183 | |
| 184 | return pm1_sts; |
| 185 | } |
| 186 | |
| 187 | uint16_t clear_pm1_status(void) |
| 188 | { |
| 189 | return print_pm1_status(reset_pm1_status()); |
| 190 | } |
| 191 | |
| 192 | void enable_pm1(uint16_t events) |
| 193 | { |
| 194 | outw(events, ACPI_PMIO_BASE + PM1_EN); |
| 195 | } |
| 196 | |
| 197 | static uint32_t print_tco_status(uint32_t tco_sts) |
| 198 | { |
| 199 | static const char * const tco_sts_bits[] = { |
| 200 | [3] = "TIMEOUT", |
| 201 | [17] = "SECOND_TO", |
| 202 | }; |
| 203 | |
| 204 | if (!tco_sts) |
| 205 | return 0; |
| 206 | |
| 207 | printk(BIOS_DEBUG, "TCO_STS: "); |
| 208 | print_num_status_bits(ARRAY_SIZE(tco_sts_bits), tco_sts, tco_sts_bits); |
| 209 | printk(BIOS_DEBUG, "\n"); |
| 210 | |
| 211 | return tco_sts; |
| 212 | } |
| 213 | |
| 214 | static uint32_t reset_tco_status(void) |
| 215 | { |
| 216 | uint32_t tco_sts = inl(ACPI_PMIO_BASE + TCO_STS); |
| 217 | uint32_t tco_en = inl(ACPI_PMIO_BASE + TCO1_CNT); |
| 218 | |
| 219 | outl(tco_sts, ACPI_PMIO_BASE + TCO_STS); |
| 220 | return tco_sts & tco_en; |
| 221 | } |
| 222 | |
| 223 | uint32_t clear_tco_status(void) |
| 224 | { |
| 225 | return print_tco_status(reset_tco_status()); |
| 226 | } |
| 227 | |
| 228 | void enable_gpe(uint32_t mask) |
| 229 | { |
| 230 | uint32_t gpe0a_en = inl(ACPI_PMIO_BASE + GPE0_EN(0)); |
| 231 | gpe0a_en |= mask; |
| 232 | outl(gpe0a_en, ACPI_PMIO_BASE + GPE0_EN(0)); |
| 233 | } |
| 234 | |
| 235 | void disable_gpe(uint32_t mask) |
| 236 | { |
| 237 | uint32_t gpe0a_en = inl(ACPI_PMIO_BASE + GPE0_EN(0)); |
| 238 | gpe0a_en &= ~mask; |
| 239 | outl(gpe0a_en, ACPI_PMIO_BASE + GPE0_EN(0)); |
| 240 | } |
| 241 | |
| 242 | void disable_all_gpe(void) |
| 243 | { |
| 244 | disable_gpe(~0); |
| 245 | } |
| 246 | |
| 247 | |
| 248 | static uint32_t reset_gpe_status(void) |
| 249 | { |
| 250 | uint32_t gpe_sts = inl(ACPI_PMIO_BASE + GPE0_STS(0)); |
| 251 | outl(gpe_sts, ACPI_PMIO_BASE + GPE0_STS(0)); |
| 252 | return gpe_sts; |
| 253 | } |
| 254 | |
| 255 | static uint32_t print_gpe_sts(uint32_t gpe_sts) |
| 256 | { |
| 257 | static const char * const gpe_sts_bits[] = { |
| 258 | [0] = "PCIE_SCI", |
| 259 | [2] = "SWGPE", |
| 260 | [3] = "PCIE_WAKE0", |
| 261 | [4] = "PUNIT", |
| 262 | [6] = "PCIE_WAKE1", |
| 263 | [7] = "PCIE_WAKE2", |
| 264 | [8] = "PCIE_WAKE3", |
| 265 | [9] = "PCI_EXP", |
| 266 | [10] = "BATLOW", |
| 267 | [11] = "CSE_PME", |
| 268 | [12] = "XDCI_PME", |
| 269 | [13] = "XHCI_PME", |
| 270 | [14] = "AVS_PME", |
| 271 | [15] = "GPIO_TIER1_SCI", |
| 272 | [16] = "SMB_WAK", |
| 273 | [17] = "SATA_PME", |
| 274 | }; |
| 275 | |
| 276 | if (!gpe_sts) |
| 277 | return gpe_sts; |
| 278 | |
| 279 | printk(BIOS_DEBUG, "GPE0a_STS: "); |
| 280 | print_num_status_bits(ARRAY_SIZE(gpe_sts_bits), gpe_sts, gpe_sts_bits); |
| 281 | printk(BIOS_DEBUG, "\n"); |
| 282 | |
| 283 | return gpe_sts; |
| 284 | } |
| 285 | |
| 286 | uint32_t clear_gpe_status(void) |
| 287 | { |
| 288 | return print_gpe_sts(reset_gpe_status()); |
| 289 | } |
| 290 | |
| 291 | void clear_pmc_status(void) |
| 292 | { |
| 293 | uint32_t prsts; |
| 294 | uint32_t gen_pmcon1; |
Alexandru Gagniuc | a633980 | 2016-04-05 12:40:24 -0700 | [diff] [blame] | 295 | uintptr_t pmc_bar0 = read_pmc_mmio_bar(); |
Hannah Williams | 01bc897 | 2016-02-04 20:13:34 -0800 | [diff] [blame] | 296 | |
Alexandru Gagniuc | a633980 | 2016-04-05 12:40:24 -0700 | [diff] [blame] | 297 | prsts = read32((void *)(pmc_bar0 + PRSTS)); |
| 298 | gen_pmcon1 = read32((void *)(pmc_bar0 + GEN_PMCON1)); |
Hannah Williams | 01bc897 | 2016-02-04 20:13:34 -0800 | [diff] [blame] | 299 | |
| 300 | /* Clear the status bits. The RPS field is cleared on a 0 write. */ |
Alexandru Gagniuc | a633980 | 2016-04-05 12:40:24 -0700 | [diff] [blame] | 301 | write32((void *)(pmc_bar0 + GEN_PMCON1), gen_pmcon1 & ~RPS); |
| 302 | write32((void *)(pmc_bar0 + PRSTS), prsts); |
Hannah Williams | 01bc897 | 2016-02-04 20:13:34 -0800 | [diff] [blame] | 303 | } |
| 304 | |
| 305 | |
| 306 | /* Return 0, 3, or 5 to indicate the previous sleep state. */ |
| 307 | int chipset_prev_sleep_state(struct chipset_power_state *ps) |
| 308 | { |
| 309 | /* Default to S0. */ |
Aaron Durbin | ed35b7c | 2016-07-13 23:17:38 -0500 | [diff] [blame] | 310 | int prev_sleep_state = ACPI_S0; |
Hannah Williams | 01bc897 | 2016-02-04 20:13:34 -0800 | [diff] [blame] | 311 | |
| 312 | if (ps->pm1_sts & WAK_STS) { |
Aaron Durbin | ed35b7c | 2016-07-13 23:17:38 -0500 | [diff] [blame] | 313 | switch (acpi_sleep_from_pm1(ps->pm1_cnt)) { |
| 314 | case ACPI_S3: |
| 315 | if (IS_ENABLED(CONFIG_HAVE_ACPI_RESUME)) |
| 316 | prev_sleep_state = ACPI_S3; |
Hannah Williams | 01bc897 | 2016-02-04 20:13:34 -0800 | [diff] [blame] | 317 | break; |
Aaron Durbin | ed35b7c | 2016-07-13 23:17:38 -0500 | [diff] [blame] | 318 | case ACPI_S5: |
| 319 | prev_sleep_state = ACPI_S5; |
Hannah Williams | 01bc897 | 2016-02-04 20:13:34 -0800 | [diff] [blame] | 320 | break; |
| 321 | } |
Hannah Williams | 5992afa | 2016-06-23 09:50:28 -0700 | [diff] [blame] | 322 | |
| 323 | /* Clear SLP_TYP. */ |
| 324 | outl(ps->pm1_cnt & ~(SLP_TYP), ACPI_PMIO_BASE + PM1_CNT); |
Hannah Williams | 01bc897 | 2016-02-04 20:13:34 -0800 | [diff] [blame] | 325 | } |
| 326 | return prev_sleep_state; |
| 327 | } |
| 328 | |
| 329 | /* returns prev_sleep_state */ |
| 330 | int fill_power_state(struct chipset_power_state *ps) |
| 331 | { |
| 332 | int i; |
Alexandru Gagniuc | a633980 | 2016-04-05 12:40:24 -0700 | [diff] [blame] | 333 | uintptr_t pmc_bar0 = read_pmc_mmio_bar(); |
| 334 | |
Hannah Williams | 01bc897 | 2016-02-04 20:13:34 -0800 | [diff] [blame] | 335 | ps->pm1_sts = inw(ACPI_PMIO_BASE + PM1_STS); |
| 336 | ps->pm1_en = inw(ACPI_PMIO_BASE + PM1_EN); |
| 337 | ps->pm1_cnt = inl(ACPI_PMIO_BASE + PM1_CNT); |
| 338 | ps->tco_sts = inl(ACPI_PMIO_BASE + TCO_STS); |
Alexandru Gagniuc | a633980 | 2016-04-05 12:40:24 -0700 | [diff] [blame] | 339 | ps->prsts = read32((void *)(pmc_bar0 + PRSTS)); |
| 340 | ps->gen_pmcon1 =read32((void *)(pmc_bar0 + GEN_PMCON1)); |
| 341 | ps->gen_pmcon2 = read32((void *)(pmc_bar0 + GEN_PMCON2)); |
| 342 | ps->gen_pmcon3 = read32((void *)(pmc_bar0 + GEN_PMCON3)); |
Hannah Williams | 01bc897 | 2016-02-04 20:13:34 -0800 | [diff] [blame] | 343 | |
| 344 | ps->prev_sleep_state = chipset_prev_sleep_state(ps); |
| 345 | |
| 346 | printk(BIOS_DEBUG, "pm1_sts: %04x pm1_en: %04x pm1_cnt: %08x\n", |
| 347 | ps->pm1_sts, ps->pm1_en, ps->pm1_cnt); |
| 348 | printk(BIOS_DEBUG, "prsts: %08x tco_sts: %08x\n", |
| 349 | ps->prsts, ps->tco_sts); |
| 350 | printk(BIOS_DEBUG, |
| 351 | "gen_pmcon1: %08x gen_pmcon2: %08x gen_pmcon3: %08x\n", |
| 352 | ps->gen_pmcon1, ps->gen_pmcon2, ps->gen_pmcon3); |
| 353 | printk(BIOS_DEBUG, "smi_en: %08x smi_sts: %08x\n", |
| 354 | inl(ACPI_PMIO_BASE + SMI_EN), inl(ACPI_PMIO_BASE + SMI_STS)); |
| 355 | for (i=0; i < GPE0_REG_MAX; i++) { |
| 356 | ps->gpe0_sts[i] = inl(ACPI_PMIO_BASE + GPE0_STS(i)); |
| 357 | ps->gpe0_en[i] = inl(ACPI_PMIO_BASE + GPE0_EN(i)); |
| 358 | printk(BIOS_DEBUG, "gpe0_sts[%d]: %08x gpe0_en[%d]: %08x\n", |
| 359 | i, ps->gpe0_sts[i], i, ps->gpe0_en[i]); |
| 360 | } |
| 361 | printk(BIOS_DEBUG, "prev_sleep_state %d\n", ps->prev_sleep_state); |
| 362 | return ps->prev_sleep_state; |
| 363 | } |
Aaron Durbin | bef75e7 | 2016-05-26 11:00:44 -0500 | [diff] [blame] | 364 | |
| 365 | int vboot_platform_is_resuming(void) |
| 366 | { |
Aaron Durbin | bef75e7 | 2016-05-26 11:00:44 -0500 | [diff] [blame] | 367 | if (!(inw(ACPI_PMIO_BASE + PM1_STS) & WAK_STS)) |
| 368 | return 0; |
| 369 | |
Aaron Durbin | ed35b7c | 2016-07-13 23:17:38 -0500 | [diff] [blame] | 370 | return acpi_sleep_from_pm1(inl(ACPI_PMIO_BASE + PM1_CNT)) == ACPI_S3; |
Aaron Durbin | bef75e7 | 2016-05-26 11:00:44 -0500 | [diff] [blame] | 371 | } |
Andrey Petrov | 0f593c2 | 2016-06-17 15:30:13 -0700 | [diff] [blame] | 372 | |
| 373 | /* |
| 374 | * If possible, lock 0xcf9. Once the register is locked, it can't be changed. |
| 375 | * This lock is reset on cold boot, hard reset, soft reset and Sx. |
| 376 | */ |
| 377 | void global_reset_lock(void) |
| 378 | { |
| 379 | uintptr_t etr = read_pmc_mmio_bar() + ETR; |
| 380 | uint32_t reg; |
| 381 | |
| 382 | reg = read32((void *)etr); |
| 383 | if (reg & CF9_LOCK) |
| 384 | return; |
| 385 | reg |= CF9_LOCK; |
| 386 | write32((void *)etr, reg); |
| 387 | } |
| 388 | |
| 389 | /* |
| 390 | * Enable or disable global reset. If global reset is enabled, hard reset and |
| 391 | * soft reset will trigger global reset, where both host and TXE are reset. |
| 392 | * This is cleared on cold boot, hard reset, soft reset and Sx. |
| 393 | */ |
| 394 | void global_reset_enable(bool enable) |
| 395 | { |
| 396 | uintptr_t etr = read_pmc_mmio_bar() + ETR; |
| 397 | uint32_t reg; |
| 398 | |
| 399 | reg = read32((void *)etr); |
| 400 | reg = enable ? reg | CF9_GLB_RST : reg & ~CF9_GLB_RST; |
| 401 | write32((void *)etr, reg); |
| 402 | } |
Furquan Shaikh | 4c1cb42 | 2016-06-23 14:00:05 -0700 | [diff] [blame] | 403 | |
| 404 | /* |
| 405 | * The PM1 control is set to S5 when vboot requests a reboot because the power |
| 406 | * state code above may not have collected its data yet. Therefore, set it to |
| 407 | * S5 when vboot requests a reboot. That's necessary if vboot fails in the |
| 408 | * resume path and requests a reboot. This prevents a reboot loop where the |
| 409 | * error is continually hit on the failing vboot resume path. |
| 410 | */ |
| 411 | void vboot_platform_prepare_reboot(void) |
| 412 | { |
| 413 | const uint16_t port = ACPI_PMIO_BASE + PM1_CNT; |
| 414 | outl((inl(port) & ~(SLP_TYP)) | (SLP_TYP_S5 << SLP_TYP_SHIFT), port); |
| 415 | } |