coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
pmutil.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <bl_uapp/bl_syscall_public.h>
4 #include <bootmode.h>
5 #include <console/console.h>
6 #include <stdint.h>
7 
9 {
10  uint32_t bootmode = 0;
11  if (svc_get_boot_mode(&bootmode)) {
12  printk(BIOS_ERR, "Error getting boot mode. Assuming no resume.\n");
13  return 0;
14  }
15 
16  if (bootmode == PSP_BOOT_MODE_S3_RESUME || bootmode == PSP_BOOT_MODE_S0i3_RESUME)
17  return 1;
18 
19  return 0;
20 }
uint32_t svc_get_boot_mode(uint32_t *boot_mode)
Definition: svc.c:29
#define printk(level,...)
Definition: stdlib.h:16
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
Definition: loglevel.h:72
int platform_is_resuming(void)
Definition: pmutil.c:8
unsigned int uint32_t
Definition: stdint.h:14