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>
|
|
|
|
|
|
|
|
/* Write POST information */
|
2020-01-04 10:58:50 +01:00
|
|
|
void __weak arch_post_code(uint8_t value) { }
|
2010-11-22 09:09:50 +01:00
|
|
|
|
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)
|
|
|
|
{
|
2020-01-04 10:58:50 +01:00
|
|
|
if (!CONFIG(NO_POST)) {
|
|
|
|
/* Assume this to be the most reliable and simplest type
|
|
|
|
for displaying POST so keep it first. */
|
|
|
|
arch_post_code(value);
|
|
|
|
|
|
|
|
if (CONFIG(CONSOLE_POST))
|
|
|
|
printk(BIOS_EMERG, "POST: 0x%02x\n", value);
|
2020-01-14 19:07:48 +01:00
|
|
|
|
|
|
|
mainboard_post(value);
|
2020-01-04 10:58:50 +01:00
|
|
|
}
|
2010-11-22 09:09:50 +01:00
|
|
|
}
|