blob: 7017185d06d6a56c2c757428de4f777b1dde9529 [file] [log] [blame]
Simon Glass8ef07572014-11-12 22:42:07 -07001/*
2 * Copyright (c) 2014 Google, Inc
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7.globl early_board_init
8early_board_init:
Simon Glassd1cd0452014-11-12 22:42:09 -07009 /* Enable post codes to EC */
10#ifdef CONFIG_EARLY_POST_CROS_EC
11 mov $0x1b, %ecx
12 rdmsr
13 and $0x100, %eax
14 test %eax, %eax
15 je 1f
16
17 mov $0x8000f8f0, %eax
18 mov $0xcf8, %dx
19 out %eax, (%dx)
20 mov $0xfed1c001, %eax
21 mov $0xcfc, %dx
22 out %eax, (%dx)
23 mov $0xfed1f410, %esp
24 mov (%esp), %eax
25 and $0xfffffffb, %eax
26 mov %eax, (%esp)
271:
28#endif
Simon Glass8ef07572014-11-12 22:42:07 -070029 jmp early_board_init_ret