coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
ramtop.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <stdint.h>
4 #include <arch/io.h>
5 #include <acpi/acpi.h>
6 #include "hudson.h"
7 
9 {
10  u16 tmp = inw(ACPI_PM1_CNT_BLK);
11  tmp = ((tmp & (7 << 10)) >> 10);
12  return (int)tmp;
13 }
int acpi_get_sleep_type(void)
Definition: ramtop.c:8
#define ACPI_PM1_CNT_BLK
Definition: iomap.h:43
u16 inw(u16 port)
uint16_t u16
Definition: stdint.h:48