autoport: Don't initialize already initialized fields in acpi_tables
[coreboot.git] / Documentation / mainboard_io_trap_handler_sample.c
bloba949009c200bedeec965c57e0c2742521dff52cc
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <arch/io.h>
4 #include <console/console.h>
5 #include <cpu/x86/smm.h>
6 #include <soc/pm.h>
7 #include <soc/smm.h>
8 #include <elog.h>
9 #include <ec/google/chromeec/ec.h>
10 #include <soc/gpio.h>
11 #include <soc/iomap.h>
12 #include <soc/nvs.h>
13 #include <soc/pm.h>
14 #include <soc/smm.h>
15 #include "ec.h"
16 #include "gpio.h"
18 int mainboard_io_trap_handler(int smif)
20 switch (smif) {
21 case 0x99:
22 printk(BIOS_DEBUG, "Sample\n");
23 gnvs->smif = 0;
24 break;
25 default:
26 return 0;
29 /* On success, the IO Trap Handler returns 0
30 * On failure, the IO Trap Handler returns a value != 0
32 * For now, we force the return value to 0 and log all traps to
33 * see what's going on.
35 //gnvs->smif = 0;
36 return 1;