Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1190 lines
39 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. ia64 psr
  5. Abstract:
  6. KD Extension Api
  7. Author:
  8. Thierry Fevrier (v-thief)
  9. Environment:
  10. User Mode.
  11. Revision History:
  12. --*/
  13. #include "precomp.h"
  14. #pragma hdrstop
  15. #include "ia64.h"
  16. //
  17. // EmPsrFields: EM register fields for the Processor Status Register.
  18. //
  19. EM_REG_FIELD EmPsrFields[] = {
  20. { "rv", "reserved0" , 0x1, 0 }, // 0
  21. { "be", "Big-Endian" , 0x1, 1 }, // 1
  22. { "up", "User Performance monitor enable", 0x1, 2 }, // 2
  23. { "ac", "Alignment Check", 0x1, 3 }, // 3
  24. { "mfl", "Lower floating-point registers written", 0x1, 4 }, // 4
  25. { "mfh", "Upper floating-point registers written", 0x1, 5 }, // 5
  26. { "rv", "reserved1", 0x7, 6 }, // 6-12
  27. { "ic", "Interruption Collection", 0x1, 13 }, // 13
  28. { "i", "Interrupt enable", 0x1, 14 }, // 14
  29. { "pk", "Protection Key enable", 0x1, 15 }, // 15
  30. { "rv", "reserved2", 0x1, 16 }, // 16
  31. { "dt", "Data Address Translation enable", 0x1, 17 }, // 17
  32. { "dfl", "Disabled Floating-point Low register set", 0x1, 18 }, // 18
  33. { "dfh", "Disabled Floating-point High register set", 0x1, 19 }, // 19
  34. { "sp", "Secure Performance monitors", 0x1, 20 }, // 20
  35. { "pp", "Privileged Performance monitor enable", 0x1, 21 }, // 21
  36. { "di", "Disable Instruction set transition", 0x1, 22 }, // 22
  37. { "si", "Secure Interval timer", 0x1, 23 }, // 23
  38. { "db", "Debug Breakpoint fault enable", 0x1, 24 }, // 24
  39. { "lp", "Lower Privilege transfer trap enable", 0x1, 25 }, // 25
  40. { "tb", "Taken Branch trap enable", 0x1, 26 }, // 26
  41. { "rt", "Register stack translation enable", 0x1, 27 }, // 27
  42. { "rv", "reserved3", 0x4, 28 }, // 28-31
  43. { "cpl", "Current Privilege Level", 0x2, 32 }, // 32-33
  44. { "is", "Instruction Set", 0x1, 34 }, // 34
  45. { "mc", "Machine Abort Mask delivery disable", 0x1, 35 }, // 35
  46. { "it", "Instruction address Translation enable", 0x1, 36 }, // 36
  47. { "id", "Instruction Debug fault disable", 0x1, 37 }, // 37
  48. { "da", "Disable Data Access and Dirty-bit faults", 0x1, 38 }, // 38
  49. { "dd", "Data Debug fault disable", 0x1, 39 }, // 39
  50. { "ss", "Single Step enable", 0x1, 40 }, // 40
  51. { "ri", "Restart Instruction", 0x2, 41 }, // 41-42
  52. { "ed", "Exception Deferral", 0x1, 43 }, // 43
  53. { "bn", "register Bank", 0x1, 44 }, // 44
  54. { "ia", "Disable Instruction Access-bit faults", 0x1, 45 }, // 45
  55. { "rv", "reserved4", 0x12, 46 } // 46-63
  56. };
  57. VOID
  58. DisplayPsrIA64(
  59. IN const PCHAR Header,
  60. IN EM_PSR EmPsr,
  61. IN DISPLAY_MODE DisplayMode
  62. )
  63. {
  64. dprintf("%s", Header ? Header : "" );
  65. if ( DisplayMode >= DISPLAY_MED ) {
  66. DisplayFullEmReg( EM_PSRToULong64(EmPsr), EmPsrFields, DisplayMode );
  67. }
  68. else {
  69. dprintf(
  70. "ia bn ed ri ss dd da id it mc is cpl rt tb lp db\n\t\t "
  71. "%1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x\n\t\t"
  72. "si di pp sp dfh dfl dt pk i ic | mfh mfl ac up be\n\t\t "
  73. "%1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x | %1I64x %1I64x %1I64x %1I64x %1I64x\n",
  74. EmPsr.ia,
  75. EmPsr.bn,
  76. EmPsr.ed,
  77. EmPsr.ri,
  78. EmPsr.ss,
  79. EmPsr.dd,
  80. EmPsr.da,
  81. EmPsr.id,
  82. EmPsr.it,
  83. EmPsr.mc,
  84. EmPsr.is,
  85. EmPsr.cpl,
  86. EmPsr.rt,
  87. EmPsr.tb,
  88. EmPsr.lp,
  89. EmPsr.db,
  90. EmPsr.si,
  91. EmPsr.di,
  92. EmPsr.pp,
  93. EmPsr.sp,
  94. EmPsr.dfh,
  95. EmPsr.dfl,
  96. EmPsr.dt,
  97. EmPsr.pk,
  98. EmPsr.i,
  99. EmPsr.ic,
  100. EmPsr.mfh,
  101. EmPsr.mfl,
  102. EmPsr.ac,
  103. EmPsr.up,
  104. EmPsr.be
  105. );
  106. }
  107. return;
  108. } // DisplayPsrIA64()
  109. DECLARE_API( psr )
  110. /*++
  111. Routine Description:
  112. Dumps an IA64 Processor Status Word
  113. Arguments:
  114. args - Supplies the address in hex.
  115. Return Value:
  116. None
  117. --*/
  118. {
  119. ULONG64 psrValue;
  120. ULONG result;
  121. ULONG flags = 0;
  122. char *header;
  123. result = sscanf(args,"%X %lx", &psrValue, &flags);
  124. psrValue = GetExpression(args);
  125. if ((result != 1) && (result != 2)) {
  126. //
  127. // If user specified "@ipsr"...
  128. //
  129. char ipsrStr[16];
  130. result = sscanf(args, "%s %lx", ipsrStr, &flags);
  131. if ( ((result != 1) && (result != 2)) || strcmp(ipsrStr,"@ipsr") ) {
  132. dprintf("USAGE: !psr 0xValue [display_mode:0,1,2]\n");
  133. dprintf("USAGE: !psr @ipsr [display_mode:0,1,2]\n");
  134. return E_INVALIDARG;
  135. }
  136. psrValue = GetExpression("@ipsr");
  137. }
  138. header = (flags > DISPLAY_MIN) ? NULL : "\tpsr:\t";
  139. if (TargetMachine != IMAGE_FILE_MACHINE_IA64)
  140. {
  141. dprintf("!psr not implemented for this architecture.\n");
  142. }
  143. else
  144. {
  145. DisplayPsrIA64( header, ULong64ToEM_PSR(psrValue), flags );
  146. }
  147. return S_OK;
  148. } // !psr
  149. //
  150. // EmPspFields: EM register fields for the Processor State Parameter.
  151. //
  152. EM_REG_FIELD EmPspFields[] = {
  153. { "rv", "reserved0" , 0x2, 0 },
  154. { "rz", "Rendez-vous successful" , 0x1, 2 },
  155. { "ra", "Rendez-vous attempted" , 0x1, 3 },
  156. { "me", "Distinct Multiple errors" , 0x1, 4 },
  157. { "mn", "Min-state Save Area registered" , 0x1, 5 },
  158. { "sy", "Storage integrity synchronized" , 0x1, 6 },
  159. { "co", "Continuable" , 0x1, 7 },
  160. { "ci", "Machine Check isolated" , 0x1, 8 },
  161. { "us", "Uncontained Storage damage" , 0x1, 9 },
  162. { "hd", "Hardware damage" , 0x1, 10 },
  163. { "tl", "Trap lost" , 0x1, 11 },
  164. { "mi", "More Information" , 0x1, 12 },
  165. { "pi", "Precise Instruction pointer" , 0x1, 13 },
  166. { "pm", "Precise Min-state Save Area" , 0x1, 14 },
  167. { "dy", "Processor Dynamic State valid" , 0x1, 15 },
  168. { "in", "INIT interruption" , 0x1, 16 },
  169. { "rs", "RSE valid" , 0x1, 17 },
  170. { "cm", "Machine Check corrected" , 0x1, 18 },
  171. { "ex", "Machine Check expected" , 0x1, 19 },
  172. { "cr", "Control Registers valid" , 0x1, 20 },
  173. { "pc", "Performance Counters valid" , 0x1, 21 },
  174. { "dr", "Debug Registers valid" , 0x1, 22 },
  175. { "tr", "Translation Registers valid" , 0x1, 23 },
  176. { "rr", "Region Registers valid" , 0x1, 24 },
  177. { "ar", "Application Registers valid" , 0x1, 25 },
  178. { "br", "Branch Registers valid" , 0x1, 26 },
  179. { "pr", "Predicate Registers valid" , 0x1, 27 },
  180. { "fp", "Floating-Point Registers valid" , 0x1, 28 },
  181. { "b1", "Preserved Bank 1 General Registers valid" , 0x1, 29 },
  182. { "b0", "Preserved Bank 0 General Registers valid" , 0x1, 30 },
  183. { "gr", "General Registers valid" , 0x1, 31 },
  184. { "dsize", "Processor Dynamic State size" , 0x10, 32 },
  185. { "rv", "reserved1" , 0xB, 48 },
  186. { "cc", "Cache Check" , 0x1, 59 },
  187. { "tc", "TLB Check" , 0x1, 60 },
  188. { "bc", "Bus Check" , 0x1, 61 },
  189. { "rc", "Register File Check" , 0x1, 62 },
  190. { "uc", "Micro-Architectural Check" , 0x1, 63 }
  191. };
  192. VOID
  193. DisplayPspIA64(
  194. IN const PCHAR Header,
  195. IN EM_PSP EmPsp,
  196. IN DISPLAY_MODE DisplayMode
  197. )
  198. {
  199. dprintf("%s", Header ? Header : "" );
  200. if ( DisplayMode >= DISPLAY_MED ) {
  201. DisplayFullEmReg( EM_PSPToULong64(EmPsp), EmPspFields, DisplayMode );
  202. }
  203. else {
  204. dprintf(
  205. "gr b0 b1 fp pr br ar rr tr dr pc cr ex cm rs in dy pm pi mi tl hd us ci co sy mn me ra rz\n\t\t "
  206. "%1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x %1I64x\n\t\t"
  207. "uc rc bc tc cc dsize\n\t\t "
  208. "%1I64x %1I64x %1I64x %1I64x %1I64x %I64x\n",
  209. EmPsp.gr,
  210. EmPsp.b0,
  211. EmPsp.b1,
  212. EmPsp.fp,
  213. EmPsp.pr,
  214. EmPsp.br,
  215. EmPsp.ar,
  216. EmPsp.rr,
  217. EmPsp.tr,
  218. EmPsp.dr,
  219. EmPsp.pc,
  220. EmPsp.cr,
  221. EmPsp.ex,
  222. EmPsp.cm,
  223. EmPsp.rs,
  224. EmPsp.in,
  225. EmPsp.dy,
  226. EmPsp.pm,
  227. EmPsp.pi,
  228. EmPsp.mi,
  229. EmPsp.tl,
  230. EmPsp.hd,
  231. EmPsp.us,
  232. EmPsp.ci,
  233. EmPsp.co,
  234. EmPsp.sy,
  235. EmPsp.mn,
  236. EmPsp.me,
  237. EmPsp.ra,
  238. EmPsp.rz,
  239. EmPsp.uc,
  240. EmPsp.rc,
  241. EmPsp.bc,
  242. EmPsp.tc,
  243. EmPsp.cc,
  244. EmPsp.dsize
  245. );
  246. }
  247. return;
  248. } // DisplayPspIA64()
  249. DECLARE_API( psp )
  250. /*++
  251. Routine Description:
  252. Dumps an IA64 Processor State Parameter
  253. Arguments:
  254. args - Supplies the address in hex.
  255. Return Value:
  256. None
  257. --*/
  258. {
  259. ULONG64 pspValue;
  260. ULONG result;
  261. ULONG flags = 0;
  262. char *header;
  263. INIT_API();
  264. pspValue = (ULONG64)0;
  265. flags = 0;
  266. if ( GetExpressionEx( args, &pspValue, &args ) ) {
  267. if ( args && *args ) {
  268. flags = (ULONG) GetExpression( args );
  269. }
  270. }
  271. header = (flags > DISPLAY_MIN) ? NULL : "\tpsp:\t";
  272. if (TargetMachine != IMAGE_FILE_MACHINE_IA64)
  273. {
  274. dprintf("!psp not implemented for this architecture.\n");
  275. }
  276. else
  277. {
  278. DisplayPspIA64( header, ULong64ToEM_PSP(pspValue), flags );
  279. }
  280. EXIT_API();
  281. return S_OK;
  282. } // !psp
  283. #define PROCESSOR_MINSTATE_SAVE_AREA_FORMAT_IA64 \
  284. "\tGRNats : 0x%I64x\n" \
  285. "\tGR1 : 0x%I64x\n" \
  286. "\tGR2 : 0x%I64x\n" \
  287. "\tGR3 : 0x%I64x\n" \
  288. "\tGR4 : 0x%I64x\n" \
  289. "\tGR5 : 0x%I64x\n" \
  290. "\tGR6 : 0x%I64x\n" \
  291. "\tGR7 : 0x%I64x\n" \
  292. "\tGR8 : 0x%I64x\n" \
  293. "\tGR9 : 0x%I64x\n" \
  294. "\tGR10 : 0x%I64x\n" \
  295. "\tGR11 : 0x%I64x\n" \
  296. "\tGR12 : 0x%I64x\n" \
  297. "\tGR13 : 0x%I64x\n" \
  298. "\tGR14 : 0x%I64x\n" \
  299. "\tGR15 : 0x%I64x\n" \
  300. "\tBank0GR16 : 0x%I64x\n" \
  301. "\tBank0GR17 : 0x%I64x\n" \
  302. "\tBank0GR18 : 0x%I64x\n" \
  303. "\tBank0GR19 : 0x%I64x\n" \
  304. "\tBank0GR20 : 0x%I64x\n" \
  305. "\tBank0GR21 : 0x%I64x\n" \
  306. "\tBank0GR22 : 0x%I64x\n" \
  307. "\tBank0GR23 : 0x%I64x\n" \
  308. "\tBank0GR24 : 0x%I64x\n" \
  309. "\tBank0GR25 : 0x%I64x\n" \
  310. "\tBank0GR26 : 0x%I64x\n" \
  311. "\tBank0GR27 : 0x%I64x\n" \
  312. "\tBank0GR28 : 0x%I64x\n" \
  313. "\tBank0GR29 : 0x%I64x\n" \
  314. "\tBank0GR30 : 0x%I64x\n" \
  315. "\tBank0GR31 : 0x%I64x\n" \
  316. "\tBank1GR16 : 0x%I64x\n" \
  317. "\tBank1GR17 : 0x%I64x\n" \
  318. "\tBank1GR18 : 0x%I64x\n" \
  319. "\tBank1GR19 : 0x%I64x\n" \
  320. "\tBank1GR20 : 0x%I64x\n" \
  321. "\tBank1GR21 : 0x%I64x\n" \
  322. "\tBank1GR22 : 0x%I64x\n" \
  323. "\tBank1GR23 : 0x%I64x\n" \
  324. "\tBank1GR24 : 0x%I64x\n" \
  325. "\tBank1GR25 : 0x%I64x\n" \
  326. "\tBank1GR26 : 0x%I64x\n" \
  327. "\tBank1GR27 : 0x%I64x\n" \
  328. "\tBank1GR28 : 0x%I64x\n" \
  329. "\tBank1GR29 : 0x%I64x\n" \
  330. "\tBank1GR30 : 0x%I64x\n" \
  331. "\tBank1GR31 : 0x%I64x\n" \
  332. "\tPreds : 0x%I64x\n" \
  333. "\tBR0 : 0x%I64x\n" \
  334. "\tRSC : 0x%I64x\n" \
  335. "\tIIP : 0x%I64x\n" \
  336. "\tIPSR : 0x%I64x\n" \
  337. "\tIFS : 0x%I64x\n" \
  338. "\tXIP : 0x%I64x\n" \
  339. "\tXPSR : 0x%I64x\n" \
  340. "\tXFS : 0x%I64x\n\n"
  341. VOID
  342. DisplayProcessorMinStateSaveArea(
  343. ULONG64 Pmssa
  344. )
  345. {
  346. ULONG pmssaSize;
  347. pmssaSize = GetTypeSize("hal!_PROCESSOR_MINSTATE_SAVE_AREA");
  348. dprintf("\tProcessor MinState Save Area @ 0x%I64x\n", Pmssa );
  349. if ( pmssaSize ) {
  350. CHAR cmd[MAX_PATH];
  351. sprintf(cmd, "dt -o -r hal!_PROCESSOR_MINSTATE_SAVE_AREA 0x%I64x", Pmssa);
  352. ExecCommand(cmd);
  353. }
  354. else {
  355. PROCESSOR_MINSTATE_SAVE_AREA_IA64 minStateSaveArea;
  356. ULONG bytesRead = 0;
  357. pmssaSize = sizeof(minStateSaveArea);
  358. ReadMemory( Pmssa, &minStateSaveArea, pmssaSize, &bytesRead );
  359. if ( bytesRead >= pmssaSize ) {
  360. dprintf( PROCESSOR_MINSTATE_SAVE_AREA_FORMAT_IA64,
  361. minStateSaveArea.GRNats,
  362. minStateSaveArea.GR1,
  363. minStateSaveArea.GR2,
  364. minStateSaveArea.GR3,
  365. minStateSaveArea.GR4,
  366. minStateSaveArea.GR5,
  367. minStateSaveArea.GR6,
  368. minStateSaveArea.GR7,
  369. minStateSaveArea.GR8,
  370. minStateSaveArea.GR9,
  371. minStateSaveArea.GR10,
  372. minStateSaveArea.GR11,
  373. minStateSaveArea.GR12,
  374. minStateSaveArea.GR13,
  375. minStateSaveArea.GR14,
  376. minStateSaveArea.GR15,
  377. minStateSaveArea.Bank0GR16,
  378. minStateSaveArea.Bank0GR17,
  379. minStateSaveArea.Bank0GR18,
  380. minStateSaveArea.Bank0GR19,
  381. minStateSaveArea.Bank0GR20,
  382. minStateSaveArea.Bank0GR21,
  383. minStateSaveArea.Bank0GR22,
  384. minStateSaveArea.Bank0GR23,
  385. minStateSaveArea.Bank0GR24,
  386. minStateSaveArea.Bank0GR25,
  387. minStateSaveArea.Bank0GR26,
  388. minStateSaveArea.Bank0GR27,
  389. minStateSaveArea.Bank0GR28,
  390. minStateSaveArea.Bank0GR29,
  391. minStateSaveArea.Bank0GR30,
  392. minStateSaveArea.Bank0GR31,
  393. minStateSaveArea.Bank1GR16,
  394. minStateSaveArea.Bank1GR17,
  395. minStateSaveArea.Bank1GR18,
  396. minStateSaveArea.Bank1GR19,
  397. minStateSaveArea.Bank1GR20,
  398. minStateSaveArea.Bank1GR21,
  399. minStateSaveArea.Bank1GR22,
  400. minStateSaveArea.Bank1GR23,
  401. minStateSaveArea.Bank1GR24,
  402. minStateSaveArea.Bank1GR25,
  403. minStateSaveArea.Bank1GR26,
  404. minStateSaveArea.Bank1GR27,
  405. minStateSaveArea.Bank1GR28,
  406. minStateSaveArea.Bank1GR29,
  407. minStateSaveArea.Bank1GR30,
  408. minStateSaveArea.Bank1GR31,
  409. minStateSaveArea.Preds,
  410. minStateSaveArea.BR0,
  411. minStateSaveArea.RSC,
  412. minStateSaveArea.IIP,
  413. minStateSaveArea.IPSR,
  414. minStateSaveArea.IFS,
  415. minStateSaveArea.XIP,
  416. minStateSaveArea.XPSR,
  417. minStateSaveArea.XFS
  418. );
  419. }
  420. else {
  421. dprintf("Reading _PROCESSOR_MINSTATE_SAVE_AREA directly from memory failed @ 0x%I64x.\n", Pmssa );
  422. }
  423. }
  424. return;
  425. } // DisplayProcessorMinStateSaveArea()
  426. DECLARE_API( pmssa )
  427. /*++
  428. Routine Description:
  429. Dumps memory address as an IA64 Processor Min-State Save Area.
  430. Arguments:
  431. args - Supplies the address in hex.
  432. Return Value:
  433. None
  434. --*/
  435. {
  436. ULONG64 pmssaValue;
  437. ULONG result;
  438. char *header;
  439. pmssaValue = GetExpression(args);
  440. if (TargetMachine != IMAGE_FILE_MACHINE_IA64)
  441. {
  442. dprintf("!pmssa not implemented for this architecture.\n");
  443. }
  444. else
  445. {
  446. if ( pmssaValue ) {
  447. DisplayProcessorMinStateSaveArea( pmssaValue );
  448. }
  449. else {
  450. dprintf("usage: pmssa <address>\n");
  451. }
  452. }
  453. return S_OK;
  454. } // !pmssa
  455. #define PROCESSOR_CONTROL_REGISTERS_FORMAT_IA64 \
  456. "\tDCR : 0x%I64x\n" \
  457. "\tITM : 0x%I64x\n" \
  458. "\tIVA : 0x%I64x\n" \
  459. "\tCR3 : 0x%I64x\n" \
  460. "\tCR4 : 0x%I64x\n" \
  461. "\tCR5 : 0x%I64x\n" \
  462. "\tCR6 : 0x%I64x\n" \
  463. "\tCR7 : 0x%I64x\n" \
  464. "\tPTA : 0x%I64x\n" \
  465. "\tGPTA : 0x%I64x\n" \
  466. "\tCR10 : 0x%I64x\n" \
  467. "\tCR11 : 0x%I64x\n" \
  468. "\tCR12 : 0x%I64x\n" \
  469. "\tCR13 : 0x%I64x\n" \
  470. "\tCR14 : 0x%I64x\n" \
  471. "\tCR15 : 0x%I64x\n" \
  472. "\tIPSR : 0x%I64x\n" \
  473. "\tISR : 0x%I64x\n" \
  474. "\tCR18 : 0x%I64x\n" \
  475. "\tIIP : 0x%I64x\n" \
  476. "\tIFA : 0x%I64x\n" \
  477. "\tITIR : 0x%I64x\n" \
  478. "\tIFS : 0x%I64x\n" \
  479. "\tIIM : 0x%I64x\n" \
  480. "\tIHA : 0x%I64x\n" \
  481. "\tCR26 : 0x%I64x\n" \
  482. "\tCR27 : 0x%I64x\n" \
  483. "\tCR28 : 0x%I64x\n" \
  484. "\tCR29 : 0x%I64x\n" \
  485. "\tCR30 : 0x%I64x\n" \
  486. "\tCR31 : 0x%I64x\n" \
  487. "\tCR32 : 0x%I64x\n" \
  488. "\tCR33 : 0x%I64x\n" \
  489. "\tCR34 : 0x%I64x\n" \
  490. "\tCR35 : 0x%I64x\n" \
  491. "\tCR36 : 0x%I64x\n" \
  492. "\tCR37 : 0x%I64x\n" \
  493. "\tCR38 : 0x%I64x\n" \
  494. "\tCR39 : 0x%I64x\n" \
  495. "\tCR40 : 0x%I64x\n" \
  496. "\tCR41 : 0x%I64x\n" \
  497. "\tCR42 : 0x%I64x\n" \
  498. "\tCR43 : 0x%I64x\n" \
  499. "\tCR44 : 0x%I64x\n" \
  500. "\tCR45 : 0x%I64x\n" \
  501. "\tCR46 : 0x%I64x\n" \
  502. "\tCR47 : 0x%I64x\n" \
  503. "\tCR48 : 0x%I64x\n" \
  504. "\tCR49 : 0x%I64x\n" \
  505. "\tCR50 : 0x%I64x\n" \
  506. "\tCR51 : 0x%I64x\n" \
  507. "\tCR52 : 0x%I64x\n" \
  508. "\tCR53 : 0x%I64x\n" \
  509. "\tCR54 : 0x%I64x\n" \
  510. "\tCR55 : 0x%I64x\n" \
  511. "\tCR56 : 0x%I64x\n" \
  512. "\tCR57 : 0x%I64x\n" \
  513. "\tCR58 : 0x%I64x\n" \
  514. "\tCR59 : 0x%I64x\n" \
  515. "\tCR60 : 0x%I64x\n" \
  516. "\tCR61 : 0x%I64x\n" \
  517. "\tCR62 : 0x%I64x\n" \
  518. "\tCR63 : 0x%I64x\n" \
  519. "\tLID : 0x%I64x\n" \
  520. "\tIVR : 0x%I64x\n" \
  521. "\tTPR : 0x%I64x\n" \
  522. "\tEOI : 0x%I64x\n" \
  523. "\tIRR0 : 0x%I64x\n" \
  524. "\tIRR1 : 0x%I64x\n" \
  525. "\tIRR2 : 0x%I64x\n" \
  526. "\tIRR3 : 0x%I64x\n" \
  527. "\tITV : 0x%I64x\n" \
  528. "\tPMV : 0x%I64x\n" \
  529. "\tCMCV : 0x%I64x\n" \
  530. "\tCR75 : 0x%I64x\n" \
  531. "\tCR76 : 0x%I64x\n" \
  532. "\tCR77 : 0x%I64x\n" \
  533. "\tCR78 : 0x%I64x\n" \
  534. "\tCR79 : 0x%I64x\n" \
  535. "\tLRR0 : 0x%I64x\n" \
  536. "\tLRR1 : 0x%I64x\n" \
  537. "\tCR82 : 0x%I64x\n" \
  538. "\tCR83 : 0x%I64x\n" \
  539. "\tCR84 : 0x%I64x\n" \
  540. "\tCR85 : 0x%I64x\n" \
  541. "\tCR86 : 0x%I64x\n" \
  542. "\tCR87 : 0x%I64x\n" \
  543. "\tCR88 : 0x%I64x\n" \
  544. "\tCR89 : 0x%I64x\n" \
  545. "\tCR90 : 0x%I64x\n" \
  546. "\tCR91 : 0x%I64x\n" \
  547. "\tCR92 : 0x%I64x\n" \
  548. "\tCR93 : 0x%I64x\n" \
  549. "\tCR94 : 0x%I64x\n" \
  550. "\tCR95 : 0x%I64x\n" \
  551. "\tCR96 : 0x%I64x\n" \
  552. "\tCR97 : 0x%I64x\n" \
  553. "\tCR98 : 0x%I64x\n" \
  554. "\tCR99 : 0x%I64x\n" \
  555. "\tCR100 : 0x%I64x\n" \
  556. "\tCR101 : 0x%I64x\n" \
  557. "\tCR102 : 0x%I64x\n" \
  558. "\tCR103 : 0x%I64x\n" \
  559. "\tCR104 : 0x%I64x\n" \
  560. "\tCR105 : 0x%I64x\n" \
  561. "\tCR106 : 0x%I64x\n" \
  562. "\tCR107 : 0x%I64x\n" \
  563. "\tCR108 : 0x%I64x\n" \
  564. "\tCR109 : 0x%I64x\n" \
  565. "\tCR110 : 0x%I64x\n" \
  566. "\tCR111 : 0x%I64x\n" \
  567. "\tCR112 : 0x%I64x\n" \
  568. "\tCR113 : 0x%I64x\n" \
  569. "\tCR114 : 0x%I64x\n" \
  570. "\tCR115 : 0x%I64x\n" \
  571. "\tCR116 : 0x%I64x\n" \
  572. "\tCR117 : 0x%I64x\n" \
  573. "\tCR118 : 0x%I64x\n" \
  574. "\tCR119 : 0x%I64x\n" \
  575. "\tCR120 : 0x%I64x\n" \
  576. "\tCR121 : 0x%I64x\n" \
  577. "\tCR122 : 0x%I64x\n" \
  578. "\tCR123 : 0x%I64x\n" \
  579. "\tCR124 : 0x%I64x\n" \
  580. "\tCR125 : 0x%I64x\n" \
  581. "\tCR126 : 0x%I64x\n" \
  582. "\tCR127 : 0x%I64x\n"
  583. VOID
  584. DisplayProcessorControlRegisters(
  585. ULONG64 Pcrs
  586. )
  587. {
  588. ULONG pcrsSize;
  589. pcrsSize = GetTypeSize("hal!_PROCESSOR_CONTROL_REGISTERS");
  590. dprintf("\tProcessor Control Registers File @ 0x%I64x\n", Pcrs );
  591. if ( pcrsSize ) {
  592. CHAR cmd[MAX_PATH];
  593. sprintf(cmd, "dt -o -r hal!_PROCESSOR_CONTROL_REGISTERS 0x%I64x", Pcrs);
  594. ExecCommand(cmd);
  595. }
  596. else {
  597. PROCESSOR_CONTROL_REGISTERS_IA64 controlRegisters;
  598. ULONG bytesRead = 0;
  599. pcrsSize = sizeof(controlRegisters);
  600. ReadMemory( Pcrs, &controlRegisters, pcrsSize, &bytesRead );
  601. if ( bytesRead >= pcrsSize ) {
  602. dprintf( PROCESSOR_CONTROL_REGISTERS_FORMAT_IA64,
  603. controlRegisters.DCR,
  604. controlRegisters.ITM,
  605. controlRegisters.IVA,
  606. controlRegisters.CR3,
  607. controlRegisters.CR4,
  608. controlRegisters.CR5,
  609. controlRegisters.CR6,
  610. controlRegisters.CR7,
  611. controlRegisters.PTA,
  612. controlRegisters.GPTA,
  613. controlRegisters.CR10,
  614. controlRegisters.CR11,
  615. controlRegisters.CR12,
  616. controlRegisters.CR13,
  617. controlRegisters.CR14,
  618. controlRegisters.CR15,
  619. controlRegisters.IPSR,
  620. controlRegisters.ISR,
  621. controlRegisters.CR18,
  622. controlRegisters.IIP,
  623. controlRegisters.IFA,
  624. controlRegisters.ITIR,
  625. controlRegisters.IFS,
  626. controlRegisters.IIM,
  627. controlRegisters.IHA,
  628. controlRegisters.CR26,
  629. controlRegisters.CR27,
  630. controlRegisters.CR28,
  631. controlRegisters.CR29,
  632. controlRegisters.CR30,
  633. controlRegisters.CR31,
  634. controlRegisters.CR32,
  635. controlRegisters.CR33,
  636. controlRegisters.CR34,
  637. controlRegisters.CR35,
  638. controlRegisters.CR36,
  639. controlRegisters.CR37,
  640. controlRegisters.CR38,
  641. controlRegisters.CR39,
  642. controlRegisters.CR40,
  643. controlRegisters.CR41,
  644. controlRegisters.CR42,
  645. controlRegisters.CR43,
  646. controlRegisters.CR44,
  647. controlRegisters.CR45,
  648. controlRegisters.CR46,
  649. controlRegisters.CR47,
  650. controlRegisters.CR48,
  651. controlRegisters.CR49,
  652. controlRegisters.CR50,
  653. controlRegisters.CR51,
  654. controlRegisters.CR52,
  655. controlRegisters.CR53,
  656. controlRegisters.CR54,
  657. controlRegisters.CR55,
  658. controlRegisters.CR56,
  659. controlRegisters.CR57,
  660. controlRegisters.CR58,
  661. controlRegisters.CR59,
  662. controlRegisters.CR60,
  663. controlRegisters.CR61,
  664. controlRegisters.CR62,
  665. controlRegisters.CR63,
  666. controlRegisters.LID,
  667. controlRegisters.IVR,
  668. controlRegisters.TPR,
  669. controlRegisters.EOI,
  670. controlRegisters.IRR0,
  671. controlRegisters.IRR1,
  672. controlRegisters.IRR2,
  673. controlRegisters.IRR3,
  674. controlRegisters.ITV,
  675. controlRegisters.PMV,
  676. controlRegisters.CMCV,
  677. controlRegisters.CR75,
  678. controlRegisters.CR76,
  679. controlRegisters.CR77,
  680. controlRegisters.CR78,
  681. controlRegisters.CR79,
  682. controlRegisters.LRR0,
  683. controlRegisters.LRR1,
  684. controlRegisters.CR82,
  685. controlRegisters.CR83,
  686. controlRegisters.CR84,
  687. controlRegisters.CR85,
  688. controlRegisters.CR86,
  689. controlRegisters.CR87,
  690. controlRegisters.CR88,
  691. controlRegisters.CR89,
  692. controlRegisters.CR90,
  693. controlRegisters.CR91,
  694. controlRegisters.CR92,
  695. controlRegisters.CR93,
  696. controlRegisters.CR94,
  697. controlRegisters.CR95,
  698. controlRegisters.CR96,
  699. controlRegisters.CR97,
  700. controlRegisters.CR98,
  701. controlRegisters.CR99,
  702. controlRegisters.CR100,
  703. controlRegisters.CR101,
  704. controlRegisters.CR102,
  705. controlRegisters.CR103,
  706. controlRegisters.CR104,
  707. controlRegisters.CR105,
  708. controlRegisters.CR106,
  709. controlRegisters.CR107,
  710. controlRegisters.CR108,
  711. controlRegisters.CR109,
  712. controlRegisters.CR110,
  713. controlRegisters.CR111,
  714. controlRegisters.CR112,
  715. controlRegisters.CR113,
  716. controlRegisters.CR114,
  717. controlRegisters.CR115,
  718. controlRegisters.CR116,
  719. controlRegisters.CR117,
  720. controlRegisters.CR118,
  721. controlRegisters.CR119,
  722. controlRegisters.CR120,
  723. controlRegisters.CR121,
  724. controlRegisters.CR122,
  725. controlRegisters.CR123,
  726. controlRegisters.CR124,
  727. controlRegisters.CR125,
  728. controlRegisters.CR126,
  729. controlRegisters.CR127
  730. );
  731. }
  732. else {
  733. dprintf("Reading _PROCESSOR_CONTROL_REGISTERS directly from memory failed @ 0x%I64x.\n", Pcrs );
  734. }
  735. }
  736. return;
  737. } // DisplayProcessorControlRegisters()
  738. DECLARE_API( pcrs )
  739. /*++
  740. Routine Description:
  741. Dumps memory address as an IA64 Processor Control Registers file.
  742. Arguments:
  743. args - Supplies the address in hex.
  744. Return Value:
  745. None
  746. --*/
  747. {
  748. ULONG64 pcrsValue;
  749. ULONG result;
  750. char *header;
  751. pcrsValue = GetExpression(args);
  752. if (TargetMachine != IMAGE_FILE_MACHINE_IA64)
  753. {
  754. dprintf("!pcrs not implemented for this architecture.\n");
  755. }
  756. else
  757. {
  758. if ( pcrsValue ) {
  759. DisplayProcessorControlRegisters( pcrsValue );
  760. }
  761. else {
  762. dprintf("usage: pcrs <address>\n");
  763. }
  764. }
  765. return S_OK;
  766. } // !pcrs
  767. #define PROCESSOR_APPLICATION_REGISTERS_FORMAT_IA64 \
  768. "\tKR0 : 0x%I64x\n" \
  769. "\tKR1 : 0x%I64x\n" \
  770. "\tKR2 : 0x%I64x\n" \
  771. "\tKR3 : 0x%I64x\n" \
  772. "\tKR4 : 0x%I64x\n" \
  773. "\tKR5 : 0x%I64x\n" \
  774. "\tKR6 : 0x%I64x\n" \
  775. "\tKR7 : 0x%I64x\n" \
  776. "\tAR8 : 0x%I64x\n" \
  777. "\tAR9 : 0x%I64x\n" \
  778. "\tAR10 : 0x%I64x\n" \
  779. "\tAR11 : 0x%I64x\n" \
  780. "\tAR12 : 0x%I64x\n" \
  781. "\tAR13 : 0x%I64x\n" \
  782. "\tAR14 : 0x%I64x\n" \
  783. "\tAR15 : 0x%I64x\n" \
  784. "\tRSC : 0x%I64x\n" \
  785. "\tBSP : 0x%I64x\n" \
  786. "\tBSPSTORE : 0x%I64x\n" \
  787. "\tRNAT : 0x%I64x\n" \
  788. "\tAR20 : 0x%I64x\n" \
  789. "\tFCR : 0x%I64x\n" \
  790. "\tAR22 : 0x%I64x\n" \
  791. "\tAR23 : 0x%I64x\n" \
  792. "\tEFLAG : 0x%I64x\n" \
  793. "\tCSD : 0x%I64x\n" \
  794. "\tSSD : 0x%I64x\n" \
  795. "\tCFLG : 0x%I64x\n" \
  796. "\tFSR : 0x%I64x\n" \
  797. "\tFIR : 0x%I64x\n" \
  798. "\tFDR : 0x%I64x\n" \
  799. "\tAR31 : 0x%I64x\n" \
  800. "\tCCV : 0x%I64x\n" \
  801. "\tAR33 : 0x%I64x\n" \
  802. "\tAR34 : 0x%I64x\n" \
  803. "\tAR35 : 0x%I64x\n" \
  804. "\tUNAT : 0x%I64x\n" \
  805. "\tAR37 : 0x%I64x\n" \
  806. "\tAR38 : 0x%I64x\n" \
  807. "\tAR39 : 0x%I64x\n" \
  808. "\tFPSR : 0x%I64x\n" \
  809. "\tAR41 : 0x%I64x\n" \
  810. "\tAR42 : 0x%I64x\n" \
  811. "\tAR43 : 0x%I64x\n" \
  812. "\tITC : 0x%I64x\n" \
  813. "\tAR45 : 0x%I64x\n" \
  814. "\tAR46 : 0x%I64x\n" \
  815. "\tAR47 : 0x%I64x\n" \
  816. "\tAR48 : 0x%I64x\n" \
  817. "\tAR49 : 0x%I64x\n" \
  818. "\tAR50 : 0x%I64x\n" \
  819. "\tAR51 : 0x%I64x\n" \
  820. "\tAR52 : 0x%I64x\n" \
  821. "\tAR53 : 0x%I64x\n" \
  822. "\tAR54 : 0x%I64x\n" \
  823. "\tAR55 : 0x%I64x\n" \
  824. "\tAR56 : 0x%I64x\n" \
  825. "\tAR57 : 0x%I64x\n" \
  826. "\tAR58 : 0x%I64x\n" \
  827. "\tAR59 : 0x%I64x\n" \
  828. "\tAR60 : 0x%I64x\n" \
  829. "\tAR61 : 0x%I64x\n" \
  830. "\tAR62 : 0x%I64x\n" \
  831. "\tAR63 : 0x%I64x\n" \
  832. "\tPFS : 0x%I64x\n" \
  833. "\tLC : 0x%I64x\n" \
  834. "\tEC : 0x%I64x\n" \
  835. "\tAR67 : 0x%I64x\n" \
  836. "\tAR68 : 0x%I64x\n" \
  837. "\tAR69 : 0x%I64x\n" \
  838. "\tAR70 : 0x%I64x\n" \
  839. "\tAR71 : 0x%I64x\n" \
  840. "\tAR72 : 0x%I64x\n" \
  841. "\tAR73 : 0x%I64x\n" \
  842. "\tAR74 : 0x%I64x\n" \
  843. "\tAR75 : 0x%I64x\n" \
  844. "\tAR76 : 0x%I64x\n" \
  845. "\tAR77 : 0x%I64x\n" \
  846. "\tAR78 : 0x%I64x\n" \
  847. "\tAR79 : 0x%I64x\n" \
  848. "\tAR80 : 0x%I64x\n" \
  849. "\tAR81 : 0x%I64x\n" \
  850. "\tAR82 : 0x%I64x\n" \
  851. "\tAR83 : 0x%I64x\n" \
  852. "\tAR84 : 0x%I64x\n" \
  853. "\tAR85 : 0x%I64x\n" \
  854. "\tAR86 : 0x%I64x\n" \
  855. "\tAR87 : 0x%I64x\n" \
  856. "\tAR88 : 0x%I64x\n" \
  857. "\tAR89 : 0x%I64x\n" \
  858. "\tAR90 : 0x%I64x\n" \
  859. "\tAR91 : 0x%I64x\n" \
  860. "\tAR92 : 0x%I64x\n" \
  861. "\tAR93 : 0x%I64x\n" \
  862. "\tAR94 : 0x%I64x\n" \
  863. "\tAR95 : 0x%I64x\n" \
  864. "\tAR96 : 0x%I64x\n" \
  865. "\tAR97 : 0x%I64x\n" \
  866. "\tAR98 : 0x%I64x\n" \
  867. "\tAR99 : 0x%I64x\n" \
  868. "\tAR100 : 0x%I64x\n" \
  869. "\tAR101 : 0x%I64x\n" \
  870. "\tAR102 : 0x%I64x\n" \
  871. "\tAR103 : 0x%I64x\n" \
  872. "\tAR104 : 0x%I64x\n" \
  873. "\tAR105 : 0x%I64x\n" \
  874. "\tAR106 : 0x%I64x\n" \
  875. "\tAR107 : 0x%I64x\n" \
  876. "\tAR108 : 0x%I64x\n" \
  877. "\tAR109 : 0x%I64x\n" \
  878. "\tAR110 : 0x%I64x\n" \
  879. "\tAR111 : 0x%I64x\n" \
  880. "\tAR112 : 0x%I64x\n" \
  881. "\tAR113 : 0x%I64x\n" \
  882. "\tAR114 : 0x%I64x\n" \
  883. "\tAR115 : 0x%I64x\n" \
  884. "\tAR116 : 0x%I64x\n" \
  885. "\tAR117 : 0x%I64x\n" \
  886. "\tAR118 : 0x%I64x\n" \
  887. "\tAR119 : 0x%I64x\n" \
  888. "\tAR120 : 0x%I64x\n" \
  889. "\tAR121 : 0x%I64x\n" \
  890. "\tAR122 : 0x%I64x\n" \
  891. "\tAR123 : 0x%I64x\n" \
  892. "\tAR124 : 0x%I64x\n" \
  893. "\tAR125 : 0x%I64x\n" \
  894. "\tAR126 : 0x%I64x\n" \
  895. "\tAR127 : 0x%I64x\n"
  896. VOID
  897. DisplayProcessorApplicationRegisters(
  898. ULONG64 Pars
  899. )
  900. {
  901. ULONG parsSize;
  902. parsSize = GetTypeSize("hal!_PROCESSOR_APPLICATION_REGISTERS");
  903. dprintf("\tProcessor Application Registers File @ 0x%I64x\n", Pars );
  904. if ( parsSize ) {
  905. CHAR cmd[MAX_PATH];
  906. sprintf(cmd, "dt -o -r hal!_PROCESSOR_APPLICATION_REGISTERS 0x%I64x", Pars);
  907. ExecCommand(cmd);
  908. }
  909. else {
  910. PROCESSOR_APPLICATION_REGISTERS_IA64 applicationRegisters;
  911. ULONG bytesRead = 0;
  912. parsSize = sizeof(applicationRegisters);
  913. ReadMemory( Pars, &applicationRegisters, parsSize, &bytesRead );
  914. if ( bytesRead >= parsSize ) {
  915. dprintf( PROCESSOR_APPLICATION_REGISTERS_FORMAT_IA64,
  916. applicationRegisters.KR0,
  917. applicationRegisters.KR1,
  918. applicationRegisters.KR2,
  919. applicationRegisters.KR3,
  920. applicationRegisters.KR4,
  921. applicationRegisters.KR5,
  922. applicationRegisters.KR6,
  923. applicationRegisters.KR7,
  924. applicationRegisters.AR8,
  925. applicationRegisters.AR9,
  926. applicationRegisters.AR10,
  927. applicationRegisters.AR11,
  928. applicationRegisters.AR12,
  929. applicationRegisters.AR13,
  930. applicationRegisters.AR14,
  931. applicationRegisters.AR15,
  932. applicationRegisters.RSC,
  933. applicationRegisters.BSP,
  934. applicationRegisters.BSPSTORE,
  935. applicationRegisters.RNAT,
  936. applicationRegisters.AR20,
  937. applicationRegisters.FCR,
  938. applicationRegisters.AR22,
  939. applicationRegisters.AR23,
  940. applicationRegisters.EFLAG,
  941. applicationRegisters.CSD,
  942. applicationRegisters.SSD,
  943. applicationRegisters.CFLG,
  944. applicationRegisters.FSR,
  945. applicationRegisters.FIR,
  946. applicationRegisters.FDR,
  947. applicationRegisters.AR31,
  948. applicationRegisters.CCV,
  949. applicationRegisters.AR33,
  950. applicationRegisters.AR34,
  951. applicationRegisters.AR35,
  952. applicationRegisters.UNAT,
  953. applicationRegisters.AR37,
  954. applicationRegisters.AR38,
  955. applicationRegisters.AR39,
  956. applicationRegisters.FPSR,
  957. applicationRegisters.AR41,
  958. applicationRegisters.AR42,
  959. applicationRegisters.AR43,
  960. applicationRegisters.ITC,
  961. applicationRegisters.AR45,
  962. applicationRegisters.AR46,
  963. applicationRegisters.AR47,
  964. applicationRegisters.AR48,
  965. applicationRegisters.AR49,
  966. applicationRegisters.AR50,
  967. applicationRegisters.AR51,
  968. applicationRegisters.AR52,
  969. applicationRegisters.AR53,
  970. applicationRegisters.AR54,
  971. applicationRegisters.AR55,
  972. applicationRegisters.AR56,
  973. applicationRegisters.AR57,
  974. applicationRegisters.AR58,
  975. applicationRegisters.AR59,
  976. applicationRegisters.AR60,
  977. applicationRegisters.AR61,
  978. applicationRegisters.AR62,
  979. applicationRegisters.AR63,
  980. applicationRegisters.PFS,
  981. applicationRegisters.LC,
  982. applicationRegisters.EC,
  983. applicationRegisters.AR67,
  984. applicationRegisters.AR68,
  985. applicationRegisters.AR69,
  986. applicationRegisters.AR70,
  987. applicationRegisters.AR71,
  988. applicationRegisters.AR72,
  989. applicationRegisters.AR73,
  990. applicationRegisters.AR74,
  991. applicationRegisters.AR75,
  992. applicationRegisters.AR76,
  993. applicationRegisters.AR77,
  994. applicationRegisters.AR78,
  995. applicationRegisters.AR79,
  996. applicationRegisters.AR80,
  997. applicationRegisters.AR81,
  998. applicationRegisters.AR82,
  999. applicationRegisters.AR83,
  1000. applicationRegisters.AR84,
  1001. applicationRegisters.AR85,
  1002. applicationRegisters.AR86,
  1003. applicationRegisters.AR87,
  1004. applicationRegisters.AR88,
  1005. applicationRegisters.AR89,
  1006. applicationRegisters.AR90,
  1007. applicationRegisters.AR91,
  1008. applicationRegisters.AR92,
  1009. applicationRegisters.AR93,
  1010. applicationRegisters.AR94,
  1011. applicationRegisters.AR95,
  1012. applicationRegisters.AR96,
  1013. applicationRegisters.AR97,
  1014. applicationRegisters.AR98,
  1015. applicationRegisters.AR99,
  1016. applicationRegisters.AR100,
  1017. applicationRegisters.AR101,
  1018. applicationRegisters.AR102,
  1019. applicationRegisters.AR103,
  1020. applicationRegisters.AR104,
  1021. applicationRegisters.AR105,
  1022. applicationRegisters.AR106,
  1023. applicationRegisters.AR107,
  1024. applicationRegisters.AR108,
  1025. applicationRegisters.AR109,
  1026. applicationRegisters.AR110,
  1027. applicationRegisters.AR111,
  1028. applicationRegisters.AR112,
  1029. applicationRegisters.AR113,
  1030. applicationRegisters.AR114,
  1031. applicationRegisters.AR115,
  1032. applicationRegisters.AR116,
  1033. applicationRegisters.AR117,
  1034. applicationRegisters.AR118,
  1035. applicationRegisters.AR119,
  1036. applicationRegisters.AR120,
  1037. applicationRegisters.AR121,
  1038. applicationRegisters.AR122,
  1039. applicationRegisters.AR123,
  1040. applicationRegisters.AR124,
  1041. applicationRegisters.AR125,
  1042. applicationRegisters.AR126,
  1043. applicationRegisters.AR127
  1044. );
  1045. }
  1046. else {
  1047. dprintf("Reading _PROCESSOR_APPLICATION_REGISTERS directly from memory failed @ 0x%I64x.\n", Pars );
  1048. }
  1049. }
  1050. return;
  1051. } // DisplayProcessorApplicationRegisters()
  1052. DECLARE_API( pars )
  1053. /*++
  1054. Routine Description:
  1055. Dumps memory address as an IA64 Processor Control Registers file.
  1056. Arguments:
  1057. args - Supplies the address in hex.
  1058. Return Value:
  1059. None
  1060. --*/
  1061. {
  1062. ULONG64 parsValue;
  1063. ULONG result;
  1064. char *header;
  1065. parsValue = GetExpression(args);
  1066. if (TargetMachine != IMAGE_FILE_MACHINE_IA64)
  1067. {
  1068. dprintf("!pars not implemented for this architecture.\n");
  1069. }
  1070. else
  1071. {
  1072. if ( parsValue ) {
  1073. DisplayProcessorApplicationRegisters( parsValue );
  1074. }
  1075. else {
  1076. dprintf("usage: pars <address>\n");
  1077. }
  1078. }
  1079. return S_OK;
  1080. } // !pars