coreboot-kgpe-d16/src/lib/fallback_boot.c
Stefan Reinauer 0867062412 This patch unifies the use of config options in v2 to all start with CONFIG_
It's basically done with the following script and some manual fixup:

VARS=`grep ^define src/config/Options.lb | cut -f2 -d\ | grep -v ^CONFIG | grep -v ^COREBOOT |grep -v ^CC`
for VAR in $VARS; do
	find . -name .svn -prune -o -type f -exec perl -pi -e "s/(^|[^0-9a-zA-Z_]+)$VAR($|[^0-9a-zA-Z_]+)/\1CONFIG_$VAR\2/g" {} \;
done

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4381 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
2009-06-30 15:17:49 +00:00

38 lines
788 B
C

#include <console/console.h>
#include <part/fallback_boot.h>
#include <part/watchdog.h>
#include <pc80/mc146818rtc.h>
#include <arch/io.h>
#if CONFIG_HAVE_FALLBACK_BOOT == 1
void set_boot_successful(void)
{
/* Remember I succesfully booted by setting
* the initial boot direction
* to the direction that I booted.
*/
unsigned char index, byte;
index = inb(RTC_PORT(0)) & 0x80;
index |= RTC_BOOT_BYTE;
outb(index, RTC_PORT(0));
byte = inb(RTC_PORT(1));
byte &= 0xfe;
byte |= (byte & (1 << 1)) >> 1;
/* If we are in normal mode set the boot count to 0 */
if(byte & 1)
byte &= 0x0f;
outb(byte, RTC_PORT(1));
}
#endif
void boot_successful(void)
{
/* Remember this was a successful boot */
set_boot_successful();
/* turn off the boot watchdog */
watchdog_off();
}