2020-04-02 23:48:09 +02:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2010-11-22 09:09:50 +01:00
|
|
|
|
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
|
|
|
}
|