1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (c) 2014 Google, Inc
9 /* port to use for post codes */
10 #define POST_PORT 0x80
12 /* post codes which represent various stages of init */
13 #define POST_START 0x1e
14 #define POST_CAR_START 0x1f
15 #define POST_CAR_SIPI 0x20
16 #define POST_CAR_MTRR 0x21
17 #define POST_CAR_UNCACHEABLE 0x22
18 #define POST_CAR_BASE_ADDRESS 0x23
19 #define POST_CAR_MASK 0x24
20 #define POST_CAR_FILL 0x25
21 #define POST_CAR_ROM_CACHE 0x26
22 #define POST_CAR_MRC_CACHE 0x27
23 #define POST_CAR_CPU_CACHE 0x28
24 #define POST_START_STACK 0x29
25 #define POST_START_DONE 0x2a
26 #define POST_CPU_INIT 0x2b
27 #define POST_EARLY_INIT 0x2c
28 #define POST_CPU_INFO 0x2d
29 #define POST_PRE_MRC 0x2e
31 #define POST_DRAM 0x30
32 #define POST_LAPIC 0x31
33 #define POST_OS_RESUME 0x40
35 #define POST_RAM_FAILURE 0xea
36 #define POST_BIST_FAILURE 0xeb
37 #define POST_CAR_FAILURE 0xec
38 #define POST_RESUME_FAILURE 0xed
40 /* Output a post code using al - value must be 0 to 0xff */
42 #define post_code(value) \
48 static inline void post_code(int code)
50 outb(code, POST_PORT);