| 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <console/console.h> |
| 4 | #include <stdint.h> |
| 5 | |
| 6 | /* Write POST information */ |
| 7 | void __weak arch_post_code(uint8_t value) { } |
| 8 | void __weak soc_post_code(uint8_t value) { } |
| 9 | |
| 10 | /* Some mainboards have very nice features beyond just a simple display. |
| 11 | * They can override this function. |
| 12 | */ |
| 13 | void __weak mainboard_post(uint8_t value) { } |
| 14 | |
| 15 | void post_code(uint8_t value) |
| 16 | { |
| 17 | if (!CONFIG(NO_POST)) { |
| 18 | /* Assume this to be the most reliable and simplest type |
| 19 | for displaying POST so keep it first. */ |
| 20 | arch_post_code(value); |
| 21 | |
| 22 | soc_post_code(value); |
| 23 | |
| 24 | if (CONFIG(CONSOLE_POST)) |
| 25 | printk(BIOS_INFO, "POST: 0x%02x\n", value); |
| 26 | |
| 27 | mainboard_post(value); |
| 28 | } |
| 29 | } |