early_init.S 529 B

12345678910111213141516171819202122232425262728
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (c) 2014 Google, Inc
  4. */
  5. .globl early_board_init
  6. early_board_init:
  7. /* Enable post codes to EC */
  8. #ifdef CONFIG_EARLY_POST_CROS_EC
  9. mov $0x1b, %ecx
  10. rdmsr
  11. and $0x100, %eax
  12. test %eax, %eax
  13. je 1f
  14. mov $0x8000f8f0, %eax
  15. mov $0xcf8, %dx
  16. out %eax, (%dx)
  17. mov $0xfed1c001, %eax
  18. mov $0xcfc, %dx
  19. out %eax, (%dx)
  20. mov $0xfed1f410, %esp
  21. mov (%esp), %eax
  22. and $0xfffffffb, %eax
  23. mov %eax, (%esp)
  24. 1:
  25. #endif
  26. jmp early_board_init_ret