ResetVec.asm16 2.2 KB

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