GdbStubInternal.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717
  1. /** @file
  2. Private include file for GDB stub
  3. Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #ifndef __GDB_STUB_INTERNAL__
  7. #define __GDB_STUB_INTERNAL__
  8. #include <Uefi.h>
  9. #include <Library/BaseLib.h>
  10. #include <Library/BaseMemoryLib.h>
  11. #include <Library/MemoryAllocationLib.h>
  12. #include <Library/DebugLib.h>
  13. #include <Library/UefiLib.h>
  14. #include <Library/UefiBootServicesTableLib.h>
  15. #include <Library/PcdLib.h>
  16. #include <Library/GdbSerialLib.h>
  17. #include <Library/PrintLib.h>
  18. #include <Protocol/DebugSupport.h>
  19. #include <Protocol/SerialIo.h>
  20. #include <Protocol/LoadedImage.h>
  21. #include <Protocol/LoadedImage.h>
  22. #include <Guid/DebugImageInfoTable.h>
  23. #include <IndustryStandard/PeImage.h>
  24. extern CONST CHAR8 mHexToStr[];
  25. // maximum size of input and output buffers
  26. // This value came from the show remote command of the gdb we tested against
  27. #define MAX_BUF_SIZE 2000
  28. // maximum size of address buffer
  29. #define MAX_ADDR_SIZE 32
  30. // maximum size of register number buffer
  31. #define MAX_REG_NUM_BUF_SIZE 32
  32. // maximum size of length buffer
  33. #define MAX_LENGTH_SIZE 32
  34. // maximum size of T signal members
  35. #define MAX_T_SIGNAL_SIZE 64
  36. // the mask used to clear all the cache
  37. #define TF_BIT 0x00000100
  38. //
  39. // GDB Signal definitions - generic names for interrupts
  40. //
  41. #define GDB_SIGILL 4 // Illegal instruction
  42. #define GDB_SIGTRAP 5 // Trace Trap (Breakpoint and SingleStep)
  43. #define GDB_SIGEMT 7 // Emulator Trap
  44. #define GDB_SIGFPE 8 // Floating point exception
  45. #define GDB_SIGSEGV 11 // Segment violation, page fault
  46. //
  47. // GDB File I/O Error values, zero means no error
  48. // Includes all general GDB Unix like error values
  49. //
  50. #define GDB_EBADMEMADDRBUFSIZE 11 // the buffer that stores memory Address to be read from/written to is not the right size
  51. #define GDB_EBADMEMLENGBUFSIZE 12 // the buffer that stores Length is not the right size
  52. #define GDB_EBADMEMLENGTH 13 // Length, the given number of bytes to read or write, is not the right size
  53. #define GDB_EBADMEMDATA 14 // one of the bytes or nibbles of the memory is less than 0
  54. #define GDB_EBADMEMDATASIZE 15 // the memory data, 'XX..', is too short or too long
  55. #define GDB_EBADBUFSIZE 21 // the buffer created is not the correct size
  56. #define GDB_EINVALIDARG 31 // argument is invalid
  57. #define GDB_ENOSPACE 41 //
  58. #define GDB_EINVALIDBRKPOINTTYPE 51 // the breakpoint type is not recognized
  59. #define GDB_EINVALIDREGNUM 61 // given register number is not valid: either <0 or >=Number of Registers
  60. #define GDB_EUNKNOWN 255 // unknown
  61. //
  62. // These devices are open by GDB so we can just read and write to them
  63. //
  64. #define GDB_STDIN 0x00
  65. #define GDB_STDOUT 0x01
  66. #define GDB_STDERR 0x02
  67. //
  68. // Define Register size for different architectures
  69. //
  70. #if defined (MDE_CPU_IA32)
  71. #define REG_SIZE 32
  72. #elif defined (MDE_CPU_X64)
  73. #define REG_SIZE 64
  74. #elif defined (MDE_CPU_ARM)
  75. #define REG_SIZE 32
  76. #endif
  77. #define GDB_SERIAL_DEV_SIGNATURE SIGNATURE_32 ('g', 'd', 'b', 's')
  78. typedef struct {
  79. VENDOR_DEVICE_PATH VendorDevice;
  80. UINT32 Index; // Support more than one
  81. EFI_DEVICE_PATH_PROTOCOL End;
  82. } GDB_SERIAL_DEVICE_PATH;
  83. //
  84. // Name: SERIAL_DEV
  85. // Purpose: To provide device specific information
  86. // Fields:
  87. // Signature UINTN: The identity of the serial device
  88. // SerialIo SERIAL_IO_PROTOCOL: Serial I/O protocol interface
  89. // SerialMode SERIAL_IO_MODE:
  90. // DevicePath EFI_DEVICE_PATH_PROTOCOL *: Device path of the serial device
  91. //
  92. typedef struct {
  93. UINTN Signature;
  94. EFI_HANDLE Handle;
  95. EFI_SERIAL_IO_PROTOCOL SerialIo;
  96. EFI_SERIAL_IO_MODE SerialMode;
  97. GDB_SERIAL_DEVICE_PATH DevicePath;
  98. INTN InFileDescriptor;
  99. INTN OutFileDescriptor;
  100. } GDB_SERIAL_DEV;
  101. #define GDB_SERIAL_DEV_FROM_THIS(a) CR (a, GDB_SERIAL_DEV, SerialIo, GDB_SERIAL_DEV_SIGNATURE)
  102. typedef struct {
  103. EFI_EXCEPTION_TYPE Exception;
  104. UINT8 SignalNo;
  105. } EFI_EXCEPTION_TYPE_ENTRY;
  106. #if defined (MDE_CPU_IA32) || defined (MDE_CPU_X64)
  107. //
  108. // Byte packed structure for DR6
  109. // 32-bits on IA-32
  110. // 64-bits on X64. The upper 32-bits on X64 are reserved
  111. //
  112. typedef union {
  113. struct {
  114. UINT32 B0 : 1; // Breakpoint condition detected
  115. UINT32 B1 : 1; // Breakpoint condition detected
  116. UINT32 B2 : 1; // Breakpoint condition detected
  117. UINT32 B3 : 1; // Breakpoint condition detected
  118. UINT32 Reserved_1 : 9; // Reserved
  119. UINT32 BD : 1; // Debug register access detected
  120. UINT32 BS : 1; // Single step
  121. UINT32 BT : 1; // Task switch
  122. UINT32 Reserved_2 : 16; // Reserved
  123. } Bits;
  124. UINTN UintN;
  125. } IA32_DR6;
  126. //
  127. // Byte packed structure for DR7
  128. // 32-bits on IA-32
  129. // 64-bits on X64. The upper 32-bits on X64 are reserved
  130. //
  131. typedef union {
  132. struct {
  133. UINT32 L0 : 1; // Local breakpoint enable
  134. UINT32 G0 : 1; // Global breakpoint enable
  135. UINT32 L1 : 1; // Local breakpoint enable
  136. UINT32 G1 : 1; // Global breakpoint enable
  137. UINT32 L2 : 1; // Local breakpoint enable
  138. UINT32 G2 : 1; // Global breakpoint enable
  139. UINT32 L3 : 1; // Local breakpoint enable
  140. UINT32 G3 : 1; // Global breakpoint enable
  141. UINT32 LE : 1; // Local exact breakpoint enable
  142. UINT32 GE : 1; // Global exact breakpoint enable
  143. UINT32 Reserved_1 : 3; // Reserved
  144. UINT32 GD : 1; // Global detect enable
  145. UINT32 Reserved_2 : 2; // Reserved
  146. UINT32 RW0 : 2; // Read/Write field
  147. UINT32 LEN0 : 2; // Length field
  148. UINT32 RW1 : 2; // Read/Write field
  149. UINT32 LEN1 : 2; // Length field
  150. UINT32 RW2 : 2; // Read/Write field
  151. UINT32 LEN2 : 2; // Length field
  152. UINT32 RW3 : 2; // Read/Write field
  153. UINT32 LEN3 : 2; // Length field
  154. } Bits;
  155. UINTN UintN;
  156. } IA32_DR7;
  157. #endif /* if defined (MDE_CPU_IA32) || defined (MDE_CPU_X64) */
  158. typedef enum {
  159. InstructionExecution, // Hardware breakpoint
  160. DataWrite, // watch
  161. DataRead, // rwatch
  162. DataReadWrite, // awatch
  163. SoftwareBreakpoint, // Software breakpoint
  164. NotSupported
  165. } BREAK_TYPE;
  166. //
  167. // Array of exception types that need to be hooked by the debugger
  168. //
  169. extern EFI_EXCEPTION_TYPE_ENTRY gExceptionType[];
  170. //
  171. // Set TRUE if F Reply package signals a ctrl-c. We can not process the Ctrl-c
  172. // here we need to wait for the periodic callback to do this.
  173. //
  174. extern BOOLEAN gCtrlCBreakFlag;
  175. //
  176. // If the periodic callback is called while we are processing an F packet we need
  177. // to let the callback know to not read from the serial stream as it could steal
  178. // characters from the F response packet
  179. //
  180. extern BOOLEAN gProcessingFPacket;
  181. // The offsets of registers SystemContext.
  182. // The fields in the array are in the gdb ordering.
  183. //
  184. extern UINTN gRegisterOffsets[];
  185. /**
  186. Return the number of entries in the gExceptionType[]
  187. @retval UINTN, the number of entries in the gExceptionType[] array.
  188. **/
  189. UINTN
  190. MaxEfiException (
  191. VOID
  192. );
  193. /**
  194. Return the number of entries in the gRegisters[]
  195. @retval UINTN, the number of entries (registers) in the gRegisters[] array.
  196. **/
  197. UINTN
  198. MaxRegisterCount (
  199. VOID
  200. );
  201. /**
  202. Check to see if the ISA is supported.
  203. ISA = Instruction Set Architecture
  204. @retval TRUE if Isa is supported,
  205. FALSE otherwise.
  206. **/
  207. BOOLEAN
  208. CheckIsa (
  209. IN EFI_INSTRUCTION_SET_ARCHITECTURE Isa
  210. );
  211. /**
  212. Send the T signal with the given exception type (in gdb order) and possibly with n:r pairs related to the watchpoints
  213. @param SystemContext Register content at time of the exception
  214. @param GdbExceptionType GDB exception type
  215. **/
  216. VOID
  217. GdbSendTSignal (
  218. IN EFI_SYSTEM_CONTEXT SystemContext,
  219. IN UINT8 GdbExceptionType
  220. );
  221. /**
  222. Translates the EFI mapping to GDB mapping
  223. @param EFIExceptionType EFI Exception that is being processed
  224. @retval UINTN that corresponds to EFIExceptionType's GDB exception type number
  225. **/
  226. UINT8
  227. ConvertEFItoGDBtype (
  228. IN EFI_EXCEPTION_TYPE EFIExceptionType
  229. );
  230. /**
  231. Empties the given buffer
  232. @param *Buf pointer to the first element in buffer to be emptied
  233. **/
  234. VOID
  235. EmptyBuffer (
  236. IN CHAR8 *Buf
  237. );
  238. /**
  239. Converts an 8-bit Hex Char into a INTN.
  240. @param Char - the hex character to be converted into UINTN
  241. @retval a INTN, from 0 to 15, that corresponds to Char
  242. -1 if Char is not a hex character
  243. **/
  244. INTN
  245. HexCharToInt (
  246. IN CHAR8 Char
  247. );
  248. /** 'E NN'
  249. Send an error with the given error number after converting to hex.
  250. The error number is put into the buffer in hex. '255' is the biggest errno we can send.
  251. ex: 162 will be sent as A2.
  252. @param errno the error number that will be sent
  253. **/
  254. VOID
  255. EFIAPI
  256. SendError (
  257. IN UINT8 ErrorNum
  258. );
  259. /**
  260. Send 'OK' when the function is done executing successfully.
  261. **/
  262. VOID
  263. EFIAPI
  264. SendSuccess (
  265. VOID
  266. );
  267. /**
  268. Send empty packet to specify that particular command/functionality is not supported.
  269. **/
  270. VOID
  271. EFIAPI
  272. SendNotSupported (
  273. VOID
  274. );
  275. /** ‘p n’
  276. Reads the n-th register's value into an output buffer and sends it as a packet
  277. @param SystemContext Register content at time of the exception
  278. @param InBuffer This is the input buffer received from gdb server
  279. **/
  280. VOID
  281. ReadNthRegister (
  282. IN EFI_SYSTEM_CONTEXT SystemContext,
  283. IN CHAR8 *InBuffer
  284. );
  285. /** ‘g’
  286. Reads the general registers into an output buffer and sends it as a packet
  287. @param SystemContext Register content at time of the exception
  288. **/
  289. VOID
  290. EFIAPI
  291. ReadGeneralRegisters (
  292. IN EFI_SYSTEM_CONTEXT SystemContext
  293. );
  294. /** ‘P n...=r...’
  295. Writes the new value of n-th register received into the input buffer to the n-th register
  296. @param SystemContext Register content at time of the exception
  297. @param InBuffer This is the input buffer received from gdb server
  298. **/
  299. VOID
  300. EFIAPI
  301. WriteNthRegister (
  302. IN EFI_SYSTEM_CONTEXT SystemContext,
  303. IN CHAR8 *InBuffer
  304. );
  305. /** ‘G XX...’
  306. Writes the new values received into the input buffer to the general registers
  307. @param SystemContext Register content at time of the exception
  308. @param InBuffer Pointer to the input buffer received from gdb server
  309. **/
  310. VOID
  311. EFIAPI
  312. WriteGeneralRegisters (
  313. IN EFI_SYSTEM_CONTEXT SystemContext,
  314. IN CHAR8 *InBuffer
  315. );
  316. /** ‘m addr,length ’
  317. Find the Length of the area to read and the start address. Finally, pass them to
  318. another function, TransferFromMemToOutBufAndSend, that will read from that memory space and
  319. send it as a packet.
  320. @param *PacketData Pointer to Payload data for the packet
  321. **/
  322. VOID
  323. EFIAPI
  324. ReadFromMemory (
  325. IN CHAR8 *PacketData
  326. );
  327. /** ‘M addr,length :XX...’
  328. Find the Length of the area in bytes to write and the start address. Finally, pass them to
  329. another function, TransferFromInBufToMem, that will write to that memory space the info in
  330. the input buffer.
  331. @param PacketData Pointer to Payload data for the packet
  332. **/
  333. VOID
  334. EFIAPI
  335. WriteToMemory (
  336. IN CHAR8 *PacketData
  337. );
  338. /** ‘c [addr ]’
  339. Continue. addr is Address to resume. If addr is omitted, resume at current
  340. Address.
  341. @param SystemContext Register content at time of the exception
  342. @param *PacketData Pointer to PacketData
  343. **/
  344. VOID
  345. EFIAPI
  346. ContinueAtAddress (
  347. IN EFI_SYSTEM_CONTEXT SystemContext,
  348. IN CHAR8 *PacketData
  349. );
  350. /** ‘s [addr ]’
  351. Single step. addr is the Address at which to resume. If addr is omitted, resume
  352. at same Address.
  353. @param SystemContext Register content at time of the exception
  354. @param PacketData Pointer to Payload data for the packet
  355. **/
  356. VOID
  357. EFIAPI
  358. SingleStep (
  359. IN EFI_SYSTEM_CONTEXT SystemContext,
  360. IN CHAR8 *PacketData
  361. );
  362. /**
  363. Insert Single Step in the SystemContext
  364. @param SystemContext Register content at time of the exception
  365. **/
  366. VOID
  367. AddSingleStep (
  368. IN EFI_SYSTEM_CONTEXT SystemContext
  369. );
  370. /**
  371. Remove Single Step in the SystemContext
  372. @param SystemContext Register content at time of the exception
  373. **/
  374. VOID
  375. RemoveSingleStep (
  376. IN EFI_SYSTEM_CONTEXT SystemContext
  377. );
  378. /**
  379. ‘Z1, [addr], [length]’
  380. ‘Z2, [addr], [length]’
  381. ‘Z3, [addr], [length]’
  382. ‘Z4, [addr], [length]’
  383. Insert hardware breakpoint/watchpoint at address addr of size length
  384. @param SystemContext Register content at time of the exception
  385. @param *PacketData Pointer to the Payload data for the packet
  386. **/
  387. VOID
  388. EFIAPI
  389. InsertBreakPoint (
  390. IN EFI_SYSTEM_CONTEXT SystemContext,
  391. IN CHAR8 *PacketData
  392. );
  393. /**
  394. ‘z1, [addr], [length]’
  395. ‘z2, [addr], [length]’
  396. ‘z3, [addr], [length]’
  397. ‘z4, [addr], [length]’
  398. Remove hardware breakpoint/watchpoint at address addr of size length
  399. @param SystemContext Register content at time of the exception
  400. @param *PacketData Pointer to the Payload data for the packet
  401. **/
  402. VOID
  403. EFIAPI
  404. RemoveBreakPoint (
  405. IN EFI_SYSTEM_CONTEXT SystemContext,
  406. IN CHAR8 *PacketData
  407. );
  408. /**
  409. Exception Handler for GDB. It will be called for all exceptions
  410. registered via the gExceptionType[] array.
  411. @param ExceptionType Exception that is being processed
  412. @param SystemContext Register content at time of the exception
  413. **/
  414. VOID
  415. EFIAPI
  416. GdbExceptionHandler (
  417. IN EFI_EXCEPTION_TYPE ExceptionType,
  418. IN OUT EFI_SYSTEM_CONTEXT SystemContext
  419. );
  420. /**
  421. Periodic callback for GDB. This function is used to catch a ctrl-c or other
  422. break in type command from GDB.
  423. @param SystemContext Register content at time of the call
  424. **/
  425. VOID
  426. EFIAPI
  427. GdbPeriodicCallBack (
  428. IN OUT EFI_SYSTEM_CONTEXT SystemContext
  429. );
  430. /**
  431. Make two serial consoles: 1) StdIn and StdOut via GDB. 2) StdErr via GDB.
  432. These console show up on the remote system running GDB
  433. **/
  434. VOID
  435. GdbInitializeSerialConsole (
  436. VOID
  437. );
  438. /**
  439. Send a GDB Remote Serial Protocol Packet
  440. $PacketData#checksum PacketData is passed in and this function adds the packet prefix '$',
  441. the packet terminating character '#' and the two digit checksum.
  442. If an ack '+' is not sent resend the packet, but timeout eventually so we don't end up
  443. in an infinite loop. This is so if you unplug the debugger code just keeps running
  444. @param PacketData Payload data for the packet
  445. @retval Number of bytes of packet data sent.
  446. **/
  447. UINTN
  448. SendPacket (
  449. IN CHAR8 *PacketData
  450. );
  451. /**
  452. Receive a GDB Remote Serial Protocol Packet
  453. $PacketData#checksum PacketData is passed in and this function adds the packet prefix '$',
  454. the packet terminating character '#' and the two digit checksum.
  455. If host re-starts sending a packet without ending the previous packet, only the last valid packet is processed.
  456. (In other words, if received packet is '$12345$12345$123456#checksum', only '$123456#checksum' will be processed.)
  457. If an ack '+' is not sent resend the packet
  458. @param PacketData Payload data for the packet
  459. @retval Number of bytes of packet data received.
  460. **/
  461. UINTN
  462. ReceivePacket (
  463. OUT CHAR8 *PacketData,
  464. IN UINTN PacketDataSize
  465. );
  466. /**
  467. Read data from a FileDescriptor. On success number of bytes read is returned. Zero indicates
  468. the end of a file. On error -1 is returned. If count is zero, GdbRead returns zero.
  469. @param FileDescriptor Device to talk to.
  470. @param Buffer Buffer to hold Count bytes that were read
  471. @param Count Number of bytes to transfer.
  472. @retval -1 Error
  473. @retval {other} Number of bytes read.
  474. **/
  475. INTN
  476. GdbRead (
  477. IN INTN FileDescriptor,
  478. OUT VOID *Buffer,
  479. IN UINTN Count
  480. );
  481. /**
  482. Write data to a FileDescriptor. On success number of bytes written is returned. Zero indicates
  483. nothing was written. On error -1 is returned.
  484. @param FileDescriptor Device to talk to.
  485. @param Buffer Buffer to hold Count bytes that are to be written
  486. @param Count Number of bytes to transfer.
  487. @retval -1 Error
  488. @retval {other} Number of bytes written.
  489. **/
  490. INTN
  491. GdbWrite (
  492. IN INTN FileDescriptor,
  493. OUT CONST VOID *Buffer,
  494. IN UINTN Count
  495. );
  496. UINTN *
  497. FindPointerToRegister (
  498. IN EFI_SYSTEM_CONTEXT SystemContext,
  499. IN UINTN RegNumber
  500. );
  501. CHAR8 *
  502. BasicReadRegister (
  503. IN EFI_SYSTEM_CONTEXT SystemContext,
  504. IN UINTN RegNumber,
  505. IN CHAR8 *OutBufPtr
  506. );
  507. VOID
  508. TransferFromInBufToMem (
  509. IN UINTN Length,
  510. IN UINT8 *Address,
  511. IN CHAR8 *NewData
  512. );
  513. VOID
  514. TransferFromMemToOutBufAndSend (
  515. IN UINTN Length,
  516. IN UINT8 *Address
  517. );
  518. CHAR8 *
  519. BasicWriteRegister (
  520. IN EFI_SYSTEM_CONTEXT SystemContext,
  521. IN UINTN RegNumber,
  522. IN CHAR8 *InBufPtr
  523. );
  524. VOID
  525. PrintReg (
  526. EFI_SYSTEM_CONTEXT SystemContext
  527. );
  528. UINTN
  529. ParseBreakpointPacket (
  530. IN CHAR8 *PacketData,
  531. OUT UINTN *Type,
  532. OUT UINTN *Address,
  533. OUT UINTN *Length
  534. );
  535. UINTN
  536. GetBreakpointDataAddress (
  537. IN EFI_SYSTEM_CONTEXT SystemContext,
  538. IN UINTN BreakpointNumber
  539. );
  540. UINTN
  541. GetBreakpointDetected (
  542. IN EFI_SYSTEM_CONTEXT SystemContext
  543. );
  544. BREAK_TYPE
  545. GetBreakpointType (
  546. IN EFI_SYSTEM_CONTEXT SystemContext,
  547. IN UINTN BreakpointNumber
  548. );
  549. UINTN
  550. ConvertLengthData (
  551. IN UINTN Length
  552. );
  553. EFI_STATUS
  554. FindNextFreeDebugRegister (
  555. IN EFI_SYSTEM_CONTEXT SystemContext,
  556. OUT UINTN *Register
  557. );
  558. EFI_STATUS
  559. EnableDebugRegister (
  560. IN EFI_SYSTEM_CONTEXT SystemContext,
  561. IN UINTN Register,
  562. IN UINTN Address,
  563. IN UINTN Length,
  564. IN UINTN Type
  565. );
  566. EFI_STATUS
  567. FindMatchingDebugRegister (
  568. IN EFI_SYSTEM_CONTEXT SystemContext,
  569. IN UINTN Address,
  570. IN UINTN Length,
  571. IN UINTN Type,
  572. OUT UINTN *Register
  573. );
  574. EFI_STATUS
  575. DisableDebugRegister (
  576. IN EFI_SYSTEM_CONTEXT SystemContext,
  577. IN UINTN Register
  578. );
  579. VOID
  580. InitializeProcessor (
  581. VOID
  582. );
  583. BOOLEAN
  584. ValidateAddress (
  585. IN VOID *Address
  586. );
  587. BOOLEAN
  588. ValidateException (
  589. IN EFI_EXCEPTION_TYPE ExceptionType,
  590. IN OUT EFI_SYSTEM_CONTEXT SystemContext
  591. );
  592. #endif