ResetVec.asm16 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. ;------------------------------------------------------------------------------
  2. ;
  3. ; Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
  4. ; SPDX-License-Identifier: BSD-2-Clause-Patent
  5. ;
  6. ; Abstract:
  7. ;
  8. ; Reset Vector Data structure
  9. ; This structure is located at 0xFFFFFFC0
  10. ;
  11. ;------------------------------------------------------------------------------
  12. .model tiny
  13. .686p
  14. .stack 0h
  15. .code
  16. ;
  17. ; The layout of this file is fixed. The build tool makes assumption of the layout.
  18. ;
  19. ORG 0h
  20. ;
  21. ; Reserved
  22. ;
  23. ReservedData DD 0eeeeeeeeh, 0eeeeeeeeh
  24. ORG 10h
  25. ;
  26. ; This is located at 0xFFFFFFD0h
  27. ;
  28. mov di, "AP"
  29. jmp ApStartup
  30. ORG 20h
  31. ;
  32. ; Pointer to the entry point of the PEI core
  33. ; It is located at 0xFFFFFFE0, and is fixed up by some build tool
  34. ; So if the value 8..1 appears in the final FD image, tool failure occurs.
  35. ;
  36. PeiCoreEntryPoint DD 12345678h
  37. ;
  38. ; This is the handler for all kinds of exceptions. Since it's for debugging
  39. ; purpose only, nothing except a deadloop would be done here. Developers could
  40. ; analyze the cause of the exception if a debugger had been attached.
  41. ;
  42. InterruptHandler PROC
  43. jmp $
  44. iret
  45. InterruptHandler ENDP
  46. ORG 30h
  47. ;
  48. ; For IA32, the reset vector must be at 0xFFFFFFF0, i.e., 4G-16 byte
  49. ; Execution starts here upon power-on/platform-reset.
  50. ;
  51. ResetHandler:
  52. nop
  53. nop
  54. ApStartup:
  55. ;
  56. ; Jmp Rel16 instruction
  57. ; Use machine code directly in case of the assembler optimization
  58. ; SEC entry point relatvie address will be fixed up by some build tool.
  59. ;
  60. ; Typically, SEC entry point is the function _ModuleEntryPoint() defined in
  61. ; SecEntry.asm
  62. ;
  63. DB 0e9h
  64. DW -3
  65. ORG 38h
  66. ;
  67. ; Ap reset vector segment address is at 0xFFFFFFF8
  68. ; This will be fixed up by some build tool,
  69. ; so if the value 1..8 appears in the final FD image,
  70. ; tool failure occurs
  71. ;
  72. ApSegAddress dd 12345678h
  73. ORG 3ch
  74. ;
  75. ; BFV Base is at 0xFFFFFFFC
  76. ; This will be fixed up by some build tool,
  77. ; so if the value 1..8 appears in the final FD image,
  78. ; tool failure occurs.
  79. ;
  80. BfvBase DD 12345678h
  81. ;
  82. ; Nothing can go here, otherwise the layout of this file would change.
  83. ;
  84. END