Patrick Georgi | 11f0079 | 2020-03-04 15:10:45 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Kyösti Mälkki | 10bc806 | 2020-01-04 11:58:50 +0200 | [diff] [blame] | 2 | |
Elyes Haouas | ae1ca82 | 2022-10-07 10:02:38 +0200 | [diff] [blame] | 3 | #include <arch/io.h> |
| 4 | #include <console/console.h> |
Kyösti Mälkki | ce39ba9 | 2020-01-04 16:15:50 +0200 | [diff] [blame] | 5 | #include <post.h> |
Kyösti Mälkki | 10bc806 | 2020-01-04 11:58:50 +0200 | [diff] [blame] | 6 | #include <stdint.h> |
Kyösti Mälkki | 10bc806 | 2020-01-04 11:58:50 +0200 | [diff] [blame] | 7 | |
| 8 | void arch_post_code(uint8_t value) |
| 9 | { |
| 10 | if (CONFIG(POST_IO)) |
| 11 | outb(value, CONFIG_POST_IO_PORT); |
| 12 | |
Maulik V Vaghela | a6d7c00 | 2020-01-12 00:50:57 +0530 | [diff] [blame] | 13 | if (CONFIG(CMOS_POST) && !ENV_SMM) |
Kyösti Mälkki | 10bc806 | 2020-01-04 11:58:50 +0200 | [diff] [blame] | 14 | cmos_post_code(value); |
| 15 | } |