2010-11-22 09:09:50 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the coreboot project.
|
2011-10-31 20:56:45 +01:00
|
|
|
*
|
2010-11-22 09:09:50 +01:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; version 2 of
|
|
|
|
* the License.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*/
|
|
|
|
|
2019-03-02 23:35:15 +01:00
|
|
|
#include <stdint.h>
|
2010-11-22 09:09:50 +01:00
|
|
|
#include <console/console.h>
|
2019-03-06 01:53:33 +01:00
|
|
|
#if CONFIG(POST_IO)
|
2019-03-02 23:35:15 +01:00
|
|
|
#include <arch/io.h>
|
|
|
|
#endif
|
2010-11-22 09:09:50 +01:00
|
|
|
|
|
|
|
/* Write POST information */
|
|
|
|
|
2012-08-03 20:20:57 +02:00
|
|
|
/* Some mainboards have very nice features beyond just a simple display.
|
|
|
|
* They can override this function.
|
|
|
|
*/
|
2020-01-03 11:23:52 +01:00
|
|
|
void __weak mainboard_post(uint8_t value) { }
|
2012-09-10 04:09:56 +02:00
|
|
|
|
2010-11-22 09:09:50 +01:00
|
|
|
void post_code(uint8_t value)
|
|
|
|
{
|
2019-03-06 01:53:33 +01:00
|
|
|
#if !CONFIG(NO_POST)
|
|
|
|
#if CONFIG(CONSOLE_POST)
|
2015-01-05 22:12:38 +01:00
|
|
|
printk(BIOS_EMERG, "POST: 0x%02x\n", value);
|
2012-09-10 04:09:56 +02:00
|
|
|
#endif
|
2019-03-06 01:53:33 +01:00
|
|
|
#if CONFIG(CMOS_POST)
|
2012-09-10 04:09:56 +02:00
|
|
|
cmos_post_code(value);
|
2010-11-22 09:09:50 +01:00
|
|
|
#endif
|
2019-03-06 01:53:33 +01:00
|
|
|
#if CONFIG(POST_IO)
|
2014-03-11 16:36:21 +01:00
|
|
|
outb(value, CONFIG_POST_IO_PORT);
|
2012-11-05 21:34:09 +01:00
|
|
|
#endif
|
2010-11-22 09:09:50 +01:00
|
|
|
#endif
|
2012-08-03 20:20:57 +02:00
|
|
|
mainboard_post(value);
|
2010-11-22 09:09:50 +01:00
|
|
|
}
|