coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
panic.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #include <console/console.h>
3 #include <ec/acpi/ec.h>
4 
5 #include "h8.h"
6 
7 static void h8_panic(void)
8 {
9  if (CONFIG(H8_FLASH_LEDS_ON_DEATH)) {
10  static const u8 leds[] = {
20  };
21 
22  /* Flash all LEDs */
23  for (size_t i = 0; i < ARRAY_SIZE(leds); i++)
25  H8_LED_CONTROL_BLINK | leds[i]);
26  }
27  if (CONFIG(H8_BEEP_ON_DEATH)) {
28  /* Beep 4 Sec. 1250 Hz */
32  }
33 }
34 
35 void die_notify(void)
36 {
37  h8_panic();
38 }
#define ARRAY_SIZE(a)
Definition: helpers.h:12
@ CONFIG
Definition: dsi_common.h:201
int ec_write(u8 addr, u8 data)
Definition: ec.c:115
#define H8_LED_CONTROL_SUSPEND_LED
Definition: h8.h:81
#define H8_LED_CONTROL_BAT0_LED
Definition: h8.h:78
#define H8_LED_CONTROL_MUTE_LED
Definition: h8.h:85
#define H8_LED_CONTROL_POWER_LED
Definition: h8.h:77
#define H8_LED_CONTROL_BAT1_LED
Definition: h8.h:79
#define H8_LED_CONTROL
Definition: h8.h:71
#define H8_SOUND_REPEAT
Definition: h8.h:64
#define H8_LED_CONTROL_DOCK_LED1
Definition: h8.h:82
#define H8_LED_CONTROL_UBAY_LED
Definition: h8.h:80
#define H8_SOUND_REG
Definition: h8.h:63
#define H8_LED_CONTROL_ACDC_LED
Definition: h8.h:84
#define H8_SOUND_ENABLE1
Definition: h8.h:62
#define H8_LED_CONTROL_BLINK
Definition: h8.h:75
#define H8_LED_CONTROL_DOCK_LED2
Definition: h8.h:83
void die_notify(void)
Definition: panic.c:35
static void h8_panic(void)
Definition: panic.c:7
uint8_t u8
Definition: stdint.h:45