tree: drop last paragraph of GPL copyright header
[coreboot.git] / src / mainboard / asus / kgpe-d16 / bootblock.c
blob0289f0897e05dc7affbdc722e8e3be6efdc97a25
1 /*
2 * This file is part of the coreboot project.
4 * Copyright (C) 2015 Timothy Pearson <tpearson@raptorengineeringinc.com>, Raptor Engineering
5 * Copyright (C) 2014 Edward O'Callaghan <eocallaghan@alterapraxis.com>
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; either version 2 of the License, or
10 * (at your option) any later version.
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.
18 #include <pc80/mc146818rtc.h>
20 void bootblock_mainboard_init(void)
22 uint8_t recovery_enabled;
23 unsigned char addr;
24 unsigned char byte;
26 bootblock_northbridge_init();
27 bootblock_southbridge_init();
29 /* Recovery jumper is connected to SP5100 GPIO61, and clears the GPIO when placed in the Recovery position */
30 recovery_enabled = (!(pci_read_config8(PCI_DEV(0, 0x14, 0), 0x57) & 0x1));
31 if (recovery_enabled) {
32 #if CONFIG_USE_OPTION_TABLE
33 /* Clear NVRAM checksum */
34 for (addr = LB_CKS_RANGE_START; addr <= LB_CKS_RANGE_END; addr++) {
35 cmos_write(0x0, addr);
38 /* Set fallback boot */
39 byte = cmos_read(RTC_BOOT_BYTE);
40 byte &= 0xfc;
41 cmos_write(byte, RTC_BOOT_BYTE);
42 #else
43 /* FIXME
44 * Figure out how to recover if the option table is not available
46 #endif