blob: 6ac64b33888024aed5d5790e61eeb253fcc844c5 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Simon Glass0b36ecd2014-11-12 22:42:07 -07002/*
3 * Copyright (c) 2014 Google, Inc
Simon Glass0b36ecd2014-11-12 22:42:07 -07004 */
5
6.globl early_board_init
7early_board_init:
Simon Glass245561d2014-11-12 22:42:09 -07008 /* Enable post codes to EC */
9#ifdef CONFIG_EARLY_POST_CROS_EC
10 mov $0x1b, %ecx
11 rdmsr
12 and $0x100, %eax
13 test %eax, %eax
14 je 1f
15
16 mov $0x8000f8f0, %eax
17 mov $0xcf8, %dx
18 out %eax, (%dx)
19 mov $0xfed1c001, %eax
20 mov $0xcfc, %dx
21 out %eax, (%dx)
22 mov $0xfed1f410, %esp
23 mov (%esp), %eax
24 and $0xfffffffb, %eax
25 mov %eax, (%esp)
261:
27#endif
Simon Glass0b36ecd2014-11-12 22:42:07 -070028 jmp early_board_init_ret