]> git.proxmox.com Git - mirror_edk2.git/blob - OldMdePkg/Include/Library/PalCallLib.h
added INTERRUPT_BLOCK_TOKEN and IO_BLOCK_TOKEN
[mirror_edk2.git] / OldMdePkg / Include / Library / PalCallLib.h
1 /** @file
2 PAL Call Services
3
4 Copyright (c) 2006 -2007, Intel Corporation All rights
5 reserved. This program and the accompanying materials are
6 licensed and made available under the terms and conditions of
7 the BSD License which accompanies this distribution. The full
8 text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 Module Name: PalCallLib.h
15
16 **/
17
18 #ifndef __PAL_CALL_LIB_H__
19 #define __PAL_CALL_LIB_H__
20
21 #define PAL_SUCCESS 0x0
22
23 //
24 // CacheType of PAL_CACHE_FLUSH.
25 //
26 #define PAL_CACHE_FLUSH_INSTRUCTION_ALL 1
27 #define PAL_CACHE_FLUSH_DATA_ALL 2
28 #define PAL_CACHE_FLUSH_ALL 3
29 #define PAL_CACHE_FLUSH_SYNC_TO_DATA 4
30
31
32 //
33 // Bitmask of Opearation of PAL_CACHE_FLUSH.
34 //
35 #define PAL_CACHE_FLUSH_INVALIDATE_LINES BIT0
36 #define PAL_CACHE_FLUSH_NO_INVALIDATE_LINES 0
37 #define PAL_CACHE_FLUSH_POLL_INTERRUPT BIT1
38 #define PAL_CACHE_FLUSH_NO_INTERRUPT 0
39
40 /**
41
42 PAL Procedure - PAL_CACHE_FLUSH.
43
44 Flush the instruction or data caches. It is required by IPF.
45 The PAL procedure supports the Static Registers calling
46 convention. It could be called at virtual mode and physical
47 mode.
48
49 @param Index Index of PAL_CACHE_FLUSH within the
50 list of PAL procedures.
51
52 @param CacheType Unsigned 64-bit integer indicating
53 which cache to flush.
54
55 @param Operation Formatted bit vector indicating the
56 operation of this call.
57
58 @param ProgressIndicator Unsigned 64-bit integer specifying
59 the starting position of the flush
60 operation.
61
62 @return R9 Unsigned 64-bit integer specifying the vector
63 number of the pending interrupt.
64
65 @return R10 Unsigned 64-bit integer specifying the
66 starting position of the flush operation.
67
68 @return R11 Unsigned 64-bit integer specifying the vector
69 number of the pending interrupt.
70
71 @return Status 2 - Call completed without error, but a PMI
72 was taken during the execution of this
73 procedure.
74
75 @return Status 1 - Call has not completed flushing due to
76 a pending interrupt.
77
78 @return Status 0 - Call completed without error
79
80 @return Status -2 - Invalid argument
81
82 @return Status -3 - Call completed with error
83
84 **/
85 #define PAL_CACHE_FLUSH 1
86
87
88 //
89 // Attributes of PAL_CACHE_CONFIG_INFO1
90 //
91 #define PAL_CACHE_ATTR_WT 0
92 #define PAL_CACHE_ATTR_WB 1
93
94 //
95 // PAL_CACHE_CONFIG_INFO1.StoreHint
96 //
97 #define PAL_CACHE_STORE_TEMPORAL 0
98 #define PAL_CACHE_STORE_NONE_TEMPORAL 3
99
100 //
101 // PAL_CACHE_CONFIG_INFO1.StoreHint
102 //
103 #define PAL_CACHE_STORE_TEMPORAL_LVL_1 0
104 #define PAL_CACHE_STORE_NONE_TEMPORAL_LVL_ALL 3
105
106 //
107 // PAL_CACHE_CONFIG_INFO1.StoreHint
108 //
109 #define PAL_CACHE_LOAD_TEMPORAL_LVL_1 0
110 #define PAL_CACHE_LOAD_NONE_TEMPORAL_LVL_1 1
111 #define PAL_CACHE_LOAD_NONE_TEMPORAL_LVL_ALL 3
112
113 //
114 // Detail the characteristics of a given processor controlled
115 // cache in the cache hierarchy.
116 //
117 typedef struct {
118 UINT64 IsUnified : 1;
119 UINT64 Attributes : 2;
120 UINT64 Associativity:8;
121 UINT64 LineSize:8;
122 UINT64 Stride:8;
123 UINT64 StoreLatency:8;
124 UINT64 StoreHint:8;
125 UINT64 LoadHint:8;
126 } PAL_CACHE_INFO_RETURN1;
127
128 //
129 // Detail the characteristics of a given processor controlled
130 // cache in the cache hierarchy.
131 //
132 typedef struct {
133 UINT64 CacheSize:32;
134 UINT64 AliasBoundary:8;
135 UINT64 TagLsBits:8;
136 UINT64 TagMsBits:8;
137 } PAL_CACHE_INFO_RETURN2;
138
139 /**
140
141 PAL Procedure - PAL_CACHE_INFO.
142
143 Return detailed instruction or data cache information. It is
144 required by IPF. The PAL procedure supports the Static
145 Registers calling convention. It could be called at virtual
146 mode and physical mode.
147
148 @param Index Index of PAL_CACHE_INFO within the list of
149 PAL procedures.
150
151 @param CacheLevel Unsigned 64-bit integer specifying the
152 level in the cache hierarchy for which
153 information is requested. This value must
154 be between 0 and one less than the value
155 returned in the cache_levels return value
156 from PAL_CACHE_SUMMARY.
157
158 @param CacheType Unsigned 64-bit integer with a value of 1
159 for instruction cache and 2 for data or
160 unified cache. All other values are
161 reserved.
162
163 @param Reserved Should be 0.
164
165
166 @return R9 Detail the characteristics of a given
167 processor controlled cache in the cache
168 hierarchy. See PAL_CACHE_INFO_RETURN1.
169
170 @return R10 Detail the characteristics of a given
171 processor controlled cache in the cache
172 hierarchy. See PAL_CACHE_INFO_RETURN2.
173
174 @return R11 Reserved with 0.
175
176
177 @return Status 0 - Call completed without error
178
179 @return Status -2 - Invalid argument
180
181 @return Status -3 - Call completed with error
182
183 **/
184 #define PAL_CACHE_INFO 2
185
186
187
188 //
189 // Level of PAL_CACHE_INIT.
190 //
191 #define PAL_CACHE_INIT_ALL 0xffffffffffffffffULL
192
193 //
194 // CacheType
195 //
196 #define PAL_CACHE_INIT_TYPE_INSTRUCTION 0x1
197 #define PAL_CACHE_INIT_TYPE_DATA 0x2
198 #define PAL_CACHE_INIT_TYPE_INSTRUCTION_AND_DATA 0x3
199
200 //
201 // Restrict of PAL_CACHE_INIT.
202 //
203 #define PAL_CACHE_INIT_NO_RESTRICT 0
204 #define PAL_CACHE_INIT_RESTRICTED 1
205
206 /**
207
208 PAL Procedure - PAL_CACHE_INIT.
209
210 Initialize the instruction or data caches. It is required by
211 IPF. The PAL procedure supports the Static Registers calling
212 convention. It could be called at physical mode.
213
214 @param Index Index of PAL_CACHE_INIT within the list of PAL
215 procedures.
216
217 @param Level Unsigned 64-bit integer containing the level of
218 cache to initialize. If the cache level can be
219 initialized independently, only that level will
220 be initialized. Otherwise
221 implementation-dependent side-effects will
222 occur.
223
224 @param CacheType Unsigned 64-bit integer with a value of 1 to
225 initialize the instruction cache, 2 to
226 initialize the data cache, or 3 to
227 initialize both. All other values are
228 reserved.
229
230 @param Restrict Unsigned 64-bit integer with a value of 0 or
231 1. All other values are reserved. If
232 restrict is 1 and initializing the specified
233 level and cache_type of the cache would
234 cause side-effects, PAL_CACHE_INIT will
235 return -4 instead of initializing the cache.
236
237
238 @return Status 0 - Call completed without error
239
240 @return Status -2 - Invalid argument
241
242 @return Status -3 - Call completed with error.
243
244 @return Status -4 - Call could not initialize the specified
245 level and cache_type of the cache without
246 side-effects and restrict was 1.
247
248 **/
249 #define PAL_CACHE_INIT 3
250
251
252 //
253 // PAL_CACHE_PROTECTION.Method.
254 //
255 #define PAL_CACHE_PROTECTION_NONE_PROTECT 0
256 #define PAL_CACHE_PROTECTION_ODD_PROTECT 1
257 #define PAL_CACHE_PROTECTION_EVEN_PROTECT 2
258 #define PAL_CACHE_PROTECTION_ECC_PROTECT 3
259
260
261
262 //
263 // PAL_CACHE_PROTECTION.TagOrData.
264 //
265 #define PAL_CACHE_PROTECTION_PROTECT_DATA 0
266 #define PAL_CACHE_PROTECTION_PROTECT_TAG 1
267 #define PAL_CACHE_PROTECTION_PROTECT_TAG_ANDTHEN_DATA 2
268 #define PAL_CACHE_PROTECTION_PROTECT_DATA_ANDTHEN_TAG 3
269
270 //
271 // 32-bit protection information structures.
272 //
273 typedef struct {
274 UINT32 DataBits:8;
275 UINT32 TagProtLsb:6;
276 UINT32 TagProtMsb:6;
277 UINT32 ProtBits:6;
278 UINT32 Method:4;
279 UINT32 TagOrData:2;
280 } PAL_CACHE_PROTECTION;
281
282 /**
283
284 PAL Procedure - PAL_CACHE_PROT_INFO.
285
286 Return instruction or data cache protection information. It is
287 required by IPF. The PAL procedure supports the Static
288 Registers calling convention. It could be called at physical
289 mode and Virtual mode.
290
291 @param Index Index of PAL_CACHE_PROT_INFO within the list of
292 PAL procedures.
293
294 @param CacheLevel Unsigned 64-bit integer specifying the level
295 in the cache hierarchy for which information
296 is requested. This value must be between 0
297 and one less than the value returned in the
298 cache_levels return value from
299 PAL_CACHE_SUMMARY.
300
301 @param CacheType Unsigned 64-bit integer with a value of 1
302 for instruction cache and 2 for data or
303 unified cache. All other values are
304 reserved.
305
306 @return R9 Detail the characteristics of a given
307 processor controlled cache in the cache
308 hierarchy. See PAL_CACHE_PROTECTION[0..1].
309
310 @return R10 Detail the characteristics of a given
311 processor controlled cache in the cache
312 hierarchy. See PAL_CACHE_PROTECTION[2..3].
313
314 @return R11 Detail the characteristics of a given
315 processor controlled cache in the cache
316 hierarchy. See PAL_CACHE_PROTECTION[4..5].
317
318
319 @return Status 0 - Call completed without error
320
321 @return Status -2 - Invalid argument
322
323 @return Status -3 - Call completed with error.
324
325 **/
326 #define PAL_CACHE_PROT_INFO 38
327
328 /**
329
330 @param ThreadId The thread identifier of the logical
331 processor for which information is being
332 returned. This value will be unique on a per
333 core basis.
334
335 @param CoreId The core identifier of the logical processor
336 for which information is being returned.
337 This value will be unique on a per physical
338 processor package basis.
339
340 **/
341 typedef struct {
342 UINT64 ThreadId : 16;
343 UINT64 Reserved1: 16;
344 UINT64 CoreId: 16;
345 UINT64 Reserved2: 16;
346 } PAL_PCOC_N_CACHE_INFO1;
347
348 /**
349
350 @param LogicalAddress Logical address: geographical address
351 of the logical processor for which
352 information is being returned. This is
353 the same value that is returned by the
354 PAL_FIXED_ADDR procedure when it is
355 called on the logical processor.
356
357 **/
358 typedef struct {
359 UINT64 LogicalAddress : 16;
360 UINT64 Reserved1: 16;
361 UINT64 Reserved2: 32;
362 } PAL_PCOC_N_CACHE_INFO2;
363
364 /**
365
366 PAL Procedure - PAL_CACHE_SHARED_INFO.
367
368 Returns information on which logical processors share caches.
369 It is optional. The PAL procedure supports the Static
370 Registers calling convention. It could be called at physical
371 mode and Virtual mode.
372
373 @param Index Index of PAL_CACHE_SHARED_INFO within the list
374 of PAL procedures.
375
376 @param CacheLevel Unsigned 64-bit integer specifying the
377 level in the cache hierarchy for which
378 information is requested. This value must
379 be between 0 and one less than the value
380 returned in the cache_levels return value
381 from PAL_CACHE_SUMMARY.
382
383 @param CacheType Unsigned 64-bit integer with a value of 1
384 for instruction cache and 2 for data or
385 unified cache. All other values are
386 reserved.
387
388 @param ProcNumber Unsigned 64-bit integer that specifies for
389 which logical processor information is
390 being requested. This input argument must
391 be zero for the first call to this
392 procedure and can be a maximum value of
393 one less than the number of logical
394 processors sharing this cache, which is
395 returned by the num_shared return value.
396
397 @return R9 Unsigned integer that returns the number of
398 logical processors that share the processor
399 cache level and type, for which information was
400 requested.
401
402 @return R10 The format of PAL_PCOC_N_CACHE_INFO1.
403
404 @return R11 The format of PAL_PCOC_N_CACHE_INFO2.
405
406 @return Status 0 - Call completed without error
407
408 @return Status -1 - Unimplemented procedure
409
410 @return Status -2 - Invalid argument
411
412 @return Status -3 - Call completed with error.
413
414 **/
415 #define PAL_CACHE_SHARED_INFO 43
416
417
418 /**
419
420 PAL Procedure - PAL_CACHE_SUMMARY.
421
422 Return a summary of the cache hierarchy. It is required by
423 IPF. The PAL procedure supports the Static Registers calling
424 convention. It could be called at physical mode and Virtual
425 mode.
426
427 @param Index Index of PAL_CACHE_SUMMARY within the list of
428 PAL procedures.
429
430
431 @return R9 CacheLevels Unsigned 64-bit integer denoting the
432 number of levels of cache
433 implemented by the processor.
434 Strictly, this is the number of
435 levels for which the cache
436 controller is integrated into the
437 processor (the cache SRAMs may be
438 external to the processor).
439
440 @return R10 UniqueCaches Unsigned 64-bit integer denoting the
441 number of unique caches implemented
442 by the processor. This has a maximum
443 of 2*cache_levels, but may be less
444 if any of the levels in the cache
445 hierarchy are unified caches or do
446 not have both instruction and data
447 caches.
448
449 @return Status 0 - Call completed without error
450
451 @return Status -2 - Invalid argument
452
453 @return Status -3 - Call completed with error.
454
455 **/
456 #define PAL_CACHE_SUMMARY 4
457
458
459 //
460 // Virtual Memory Attributes implemented by processor.
461 //
462 #define PAL_MEMORY_ATTR_WB 0
463 #define PAL_MEMORY_ATTR_WC 6
464 #define PAL_MEMORY_ATTR_UC 4
465 #define PAL_MEMORY_ATTR_UCE 5
466 #define PAL_MEMORY_ATTR_NATPAGE 7
467
468 /**
469
470 PAL Procedure - PAL_MEM_ATTRIB.
471
472 Return a list of supported memory attributes.. It is required
473 by IPF. The PAL procedure supports the Static Registers calling
474 convention. It could be called at physical mode and Virtual
475 mode.
476
477 @param Index Index of PAL_MEM_ATTRIB within the list of PAL
478 procedures.
479
480
481 @return R9 Attributes 8-bit vector of memory attributes
482 implemented by processor. See Virtual
483 Memory Attributes above.
484
485 @return Status 0 - Call completed without error
486
487 @return Status -2 - Invalid argument
488
489 @return Status -3 - Call completed with error.
490
491 **/
492
493 #define PAL_MEM_ATTRIB 5
494
495 /**
496
497 PAL Procedure - PAL_PREFETCH_VISIBILITY.
498
499 Used in architected sequence to transition pages from a
500 cacheable, speculative attribute to an uncacheable attribute.
501 It is required by IPF. The PAL procedure supports the Static
502 Registers calling convention. It could be called at physical
503 mode and Virtual mode.
504
505 @param Index Index of PAL_PREFETCH_VISIBILITY within the list
506 of PAL procedures.
507
508 @param TransitionType Unsigned integer specifying the type
509 of memory attribute transition that is
510 being performed.
511
512 @return Status 1 Call completed without error; this
513 call is not necessary on remote
514 processors.
515
516 @return Status 0 - Call completed without error
517
518 @return Status -2 - Invalid argument
519
520 @return Status -3 - Call completed with error.
521
522 **/
523 #define PAL_PREFETCH_VISIBILITY 41
524
525 /**
526
527 PAL Procedure - PAL_PTCE_INFO.
528
529 Return information needed for ptc.e instruction to purge
530 entire TC. It is required by IPF. The PAL procedure supports
531 the Static Registers calling convention. It could be called at
532 physical mode and Virtual mode.
533
534 @param Index Index of PAL_PTCE_INFO within the list
535 of PAL procedures.
536
537 @return R9 Unsigned 64-bit integer denoting the beginning
538 address to be used by the first PTCE instruction
539 in the purge loop.
540
541 @return R10 Two unsigned 32-bit integers denoting the loop
542 counts of the outer (loop 1) and inner (loop 2)
543 purge loops. count1 (loop 1) is contained in bits
544 63:32 of the parameter, and count2 (loop 2) is
545 contained in bits 31:0 of the parameter.
546
547 @return R11 Two unsigned 32-bit integers denoting the loop
548 strides of the outer (loop 1) and inner (loop 2)
549 purge loops. stride1 (loop 1) is contained in bits
550 63:32 of the parameter, and stride2 (loop 2) is
551 contained in bits 31:0 of the parameter.
552
553 @return Status 0 - Call completed without error
554
555 @return Status -2 - Invalid argument
556
557 @return Status -3 - Call completed with error.
558
559 **/
560 #define PAL_PTCE_INFO 6
561
562
563
564 /**
565
566 @param NumberSets Unsigned 8-bit integer denoting the number
567 of hash sets for the specified level
568 (1=fully associative)
569
570 @param NumberWays Unsigned 8-bit integer denoting the
571 associativity of the specified level
572 (1=direct).
573
574 @param NumberEntries Unsigned 16-bit integer denoting the
575 number of entries in the specified TC.
576
577
578 @param PageSizeIsOptimized Flag denoting whether the
579 specified level is optimized for
580 the region's preferred page size
581 (1=optimized) tc_pages indicates
582 which page sizes are usable by
583 this translation cache.
584
585 @param TcIsUnified Flag denoting whether the specified TC is
586 unified (1=unified).
587
588 @param EntriesReduction Flag denoting whether installed
589 translation registers will reduce
590 the number of entries within the
591 specified TC.
592
593 **/
594 typedef struct {
595 UINT64 NumberSets:8;
596 UINT64 NumberWays:8;
597 UINT64 NumberEntries:16;
598 UINT64 PageSizeIsOptimized:1;
599 UINT64 TcIsUnified:1;
600 UINT64 EntriesReduction:1;
601 } PAL_TC_INFO;
602
603 /**
604
605 PAL Procedure - PAL_VM_INFO.
606
607 Return detailed information about virtual memory features
608 supported in the processor. It is required by IPF. The PAL
609 procedure supports the Static Registers calling convention. It
610 could be called at physical mode and Virtual mode.
611
612 @param Index Index of PAL_VM_INFO within the list
613 of PAL procedures.
614
615 @param TcLevel Unsigned 64-bit integer specifying the level
616 in the TLB hierarchy for which information is
617 required. This value must be between 0 and one
618 less than the value returned in the
619 vm_info_1.num_tc_levels return value from
620 PAL_VM_SUMMARY.
621
622 @param TcType Unsigned 64-bit integer with a value of 1 for
623 instruction translation cache and 2 for data
624 or unified translation cache. All other values
625 are reserved.
626
627 @return R9 8-byte formatted value returning information
628 about the specified TC. See PAL_TC_INFO above.
629
630 @return R10 64-bit vector containing a bit for each page
631 size supported in the specified TC, where bit
632 position n indicates a page size of 2**n.
633
634 @return Status 0 - Call completed without error
635
636 @return Status -2 - Invalid argument
637
638 @return Status -3 - Call completed with error.
639
640 **/
641 #define PAL_VM_INFO 7
642
643
644 /**
645
646 PAL Procedure - PAL_VM_PAGE_SIZE.
647
648 Return virtual memory TC and hardware walker page sizes
649 supported in the processor. It is required by IPF. The PAL
650 procedure supports the Static Registers calling convention. It
651 could be called at physical mode and Virtual mode.
652
653 @param Index Index of PAL_VM_PAGE_SIZE within the list
654 of PAL procedures.
655
656
657 @return R9 64-bit vector containing a bit for each
658 architected page size that is supported for
659 TLB insertions and region registers.
660
661 @return R10 64-bit vector containing a bit for each
662 architected page size supported for TLB purge
663 operations.
664
665 @return Status 0 - Call completed without error
666
667 @return Status -2 - Invalid argument
668
669 @return Status -3 - Call completed with error.
670
671 **/
672 #define PAL_VM_PAGE_SIZE 34
673
674 /**
675
676 @param WalkerPresent 1-bit flag indicating whether a hardware
677 TLB walker is implemented (1 = walker
678 present).
679
680 @param WidthOfPhysicalAddress Unsigned 7-bit integer
681 denoting the number of bits of
682 physical address implemented.
683
684 @param WidthOfKey Unsigned 8-bit integer denoting the number
685 of bits mplemented in the PKR.key field.
686
687 @param MaxPkrIndex Unsigned 8-bit integer denoting the
688 maximum PKR index (number of PKRs-1).
689
690 @param HashTagId Unsigned 8-bit integer which uniquely
691 identifies the processor hash and tag
692 algorithm.
693
694 @param MaxDtrIndex Unsigned 8 bit integer denoting the
695 maximum data translation register index
696 (number of dtr entries - 1).
697
698 @param MaxItrIndex Unsigned 8 bit integer denoting the
699 maximum instruction translation register
700 index (number of itr entries - 1).
701
702 @param NumberOfUniqueTc Unsigned 8-bit integer denoting the
703 number of unique TCs implemented.
704 This is a maximum of
705 2*num_tc_levels.
706
707 @param NumberOfTcLevels Unsigned 8-bit integer denoting the
708 number of TC levels.
709
710 **/
711 typedef struct {
712 UINT64 WalkerPresent:1;
713 UINT64 WidthOfPhysicalAddress: 7;
714 UINT64 WidthOfKey:8;
715 UINT64 MaxPkrIndex:8;
716 UINT64 HashTagId:8;
717 UINT64 MaxDtrIndex:8;
718 UINT64 MaxItrIndex:8;
719 UINT64 NumberOfUniqueTc:8;
720 UINT64 NumberOfTcLevels:8;
721 } PAL_VM_INFO1;
722
723 /**
724
725 @param WidthOfVirtualAddress Unsigned 8-bit integer denoting
726 is the total number of virtual
727 address bits - 1.
728
729 @param WidthOfRid Unsigned 8-bit integer denoting the number
730 of bits implemented in the RR.rid field.
731
732 @param MaxPurgedTlbs Unsigned 16 bit integer denoting the
733 maximum number of concurrent outstanding
734 TLB purges allowed by the processor. A
735 value of 0 indicates one outstanding
736 purge allowed. A value of 216-1
737 indicates no limit on outstanding
738 purges. All other values indicate the
739 actual number of concurrent outstanding
740 purges allowed.
741
742 **/
743 typedef struct {
744 UINT64 WidthOfVirtualAddress:8;
745 UINT64 WidthOfRid:8;
746 UINT64 MaxPurgedTlbs:16;
747 UINT64 Reserved:32;
748 } PAL_VM_INFO2;
749
750 /**
751
752 PAL Procedure - PAL_VM_SUMMARY.
753
754 Return summary information about virtual memory features
755 supported in the processor. It is required by IPF. The PAL
756 procedure supports the Static Registers calling convention. It
757 could be called at physical mode and Virtual mode.
758
759 @param Index Index of PAL_VM_SUMMARY within the list
760 of PAL procedures.
761
762
763 @return R9 8-byte formatted value returning global virtual
764 memory information. See PAL_VM_INFO1 above.
765
766 @return R10 8-byte formatted value returning global virtual
767 memory information. See PAL_VM_INFO2 above.
768
769 @return Status 0 - Call completed without error
770
771 @return Status -2 - Invalid argument
772
773 @return Status -3 - Call completed with error.
774
775 **/
776 #define PAL_VM_SUMMARY 8
777
778
779 //
780 // Bit mask of TR_valid flag.
781 //
782 #define PAL_TR_ACCESS_RIGHT_IS_VALID BIT0
783 #define PAL_TR_PRIVILEGE_LEVEL_IS_VALID BIT1
784 #define PAL_TR_DIRTY_IS_VALID BIT2
785 #define PAL_TR_MEMORY_ATTR_IS_VALID BIT3
786
787
788 /**
789
790 PAL Procedure - PAL_VM_TR_READ.
791
792 Read contents of a translation register. It is required by
793 IPF. The PAL procedure supports the Stacked Register calling
794 convention. It could be called at physical mode.
795
796 @param Index Index of PAL_VM_TR_READ within the list
797 of PAL procedures.
798
799 @param RegNumber Unsigned 64-bit number denoting which TR to
800 read.
801
802 @param TrType Unsigned 64-bit number denoting whether to
803 read an ITR (0) or DTR (1). All other values
804 are reserved.
805
806 @param TrBuffer 64-bit pointer to the 32-byte memory buffer in
807 which translation data is returned.
808
809 @return R9 Formatted bit vector denoting which fields are
810 valid. See TR_valid above.
811
812 @return Status 0 - Call completed without error
813
814 @return Status -2 - Invalid argument
815
816 @return Status -3 - Call completed with error.
817
818 **/
819 #define PAL_VM_TR_READ 261
820
821
822
823
824 //
825 // Bit Mask of Processor Bus Fesatures .
826 //
827
828 /**
829
830 When 0, bus data errors are detected and single bit errors are
831 corrected. When 1, no error detection or correction is done.
832
833 **/
834 #define PAL_BUS_DISABLE_DATA_ERROR_SIGNALLING BIT63
835
836
837 /**
838
839 When 0, bus address errors are signalled on the bus. When 1,
840 no bus errors are signalled on the bus. If Disable Bus Address
841 Error Checking is 1, this bit is ignored.
842
843 **/
844 #define PAL_BUS_DISABLE_ADDRESS_ERROR_SIGNALLING BIT62
845
846
847
848
849 /**
850
851 When 0, bus errors are detected, single bit errors are
852 corrected., and a CMCI or MCA is generated internally to the
853 processor. When 1, no bus address errors are detected or
854 corrected.
855
856 **/
857 #define PAL_BUS_DISABLE_ADDRESS_ERROR_CHECK BIT61
858
859
860 /**
861
862 When 0, bus protocol errors (BINIT#) are signaled by the
863 processor on the bus. When 1, bus protocol errors (BINIT#) are
864 not signaled on the bus. If Disable Bus Initialization Event
865 Checking is 1, this bit is ignored.
866
867 **/
868 #define PAL_BUS_DISABLE_INITIALIZATION_EVENT_SIGNALLING BIT60
869
870
871 /**
872
873 When 0, bus protocol errors (BINIT#) are detected and sampled
874 and an MCA is generated internally to the processor. When 1,
875 the processor will ignore bus protocol error conditions
876 (BINIT#).
877
878 **/
879 #define PAL_BUS_DISABLE_INITIALIZATION_EVENT_CHECK BIT59
880
881
882
883 /**
884
885 When 0, BERR# is signalled if a bus error is detected. When 1,
886 bus errors are not signalled on the bus.
887
888 **/
889 #define PAL_BUS_DISABLE_ERROR_SIGNALLING BIT58
890
891
892
893
894 /**
895
896 When 0, BERR# is signalled when internal processor requestor
897 initiated bus errors are detected. When 1, internal requester
898 bus errors are not signalled on the bus.
899
900 **/
901 #define PAL_BUS_DISABLE__INTERNAL_ERROR_SIGNALLING BIT57
902
903
904 /**
905
906 When 0, the processor takes an MCA if BERR# is asserted. When
907 1, the processor ignores the BERR# signal.
908
909 **/
910 #define PAL_BUS_DISABLE_ERROR_CHECK BIT56
911
912
913 /**
914
915 When 0, the processor asserts BINIT# if it detects a parity
916 error on the signals which identify the transactions to which
917 this is a response. When 1, the processor ignores parity on
918 these signals.
919
920 **/
921 #define PAL_BUS_DISABLE_RSP_ERROR_CHECK BIT55
922
923
924 /**
925
926 When 0, the in-order transaction queue is limited only by the
927 number of hardware entries. When 1, the processor's in-order
928 transactions queue is limited to one entry.
929
930 **/
931 #define PAL_BUS_DISABLE_TRANSACTION_QUEUE BIT54
932
933 /**
934
935 Enable a bus cache line replacement transaction when a cache
936 line in the exclusive state is replaced from the highest level
937 processor cache and is not present in the lower level processor
938 caches. When 0, no bus cache line replacement transaction will
939 be seen on the bus. When 1, bus cache line replacement
940 transactions will be seen on the bus when the above condition is
941 detected.
942
943 **/
944 #define PAL_BUS_ENABLE_EXCLUSIVE_CACHE_LINE_REPLACEMENT BIT53
945
946
947 /**
948
949 Enable a bus cache line replacement transaction when a cache
950 line in the shared or exclusive state is replaced from the
951 highest level processor cache and is not present in the lower
952 level processor caches.
953 When 0, no bus cache line replacement transaction will be seen
954 on the bus. When 1, bus cache line replacement transactions
955 will be seen on the bus when the above condition is detected.
956
957 **/
958 #define PAL_BUS_ENABLE_SHARED_CACHE_LINE_REPLACEMENT BIT52
959
960
961
962 /**
963
964 When 0, the data bus is configured at the 2x data transfer
965 rate.When 1, the data bus is configured at the 1x data
966 transfer rate, 30 Opt. Req. Disable Bus Lock Mask. When 0, the
967 processor executes locked transactions atomically. When 1, the
968 processor masks the bus lock signal and executes locked
969 transactions as a non-atomic series of transactions.
970
971 **/
972 #define PAL_BUS_ENABLE_HALF_TRANSFER BIT30
973
974 /**
975
976 When 0, the processor will deassert bus request when finished
977 with each transaction. When 1, the processor will continue to
978 assert bus request after it has finished, if it was the last
979 agent to own the bus and if there are no other pending
980 requests.
981
982 **/
983 #define PAL_BUS_REQUEST_BUS_PARKING BIT29
984
985
986 /**
987
988 PAL Procedure - PAL_BUS_GET_FEATURES.
989
990 Return configurable processor bus interface features and their
991 current settings. It is required by IPF. The PAL procedure
992 supports the Stacked Register calling convention. It could be
993 called at physical mode.
994
995 @param Index Index of PAL_BUS_GET_FEATURES within the list
996 of PAL procedures.
997
998 @return R9 64-bit vector of features implemented.
999 (1=implemented, 0=not implemented)
1000
1001 @return R10 64-bit vector of current feature settings.
1002
1003 @return R11 64-bit vector of features controllable by
1004 software. (1=controllable, 0= not controllable)
1005
1006 @return Status 0 - Call completed without error
1007
1008 @return Status -2 - Invalid argument
1009
1010 @return Status -3 - Call completed with error.
1011
1012 **/
1013 #define PAL_BUS_GET_FEATURES 9
1014
1015 /**
1016
1017 PAL Procedure - PAL_BUS_SET_FEATURES.
1018
1019 Enable or disable configurable features in processor bus
1020 interface. It is required by IPF. It is required by IPF. The PAL procedure
1021 supports the Static Registers calling convention. It could be
1022 called at physical mode.
1023
1024 @param Index Index of PAL_BUS_SET_FEATURES within the list
1025 of PAL procedures.
1026
1027 @param FeatureSelect 64-bit vector denoting desired state of
1028 each feature (1=select, 0=non-select).
1029
1030 @return Status 0 - Call completed without error
1031
1032 @return Status -2 - Invalid argument
1033
1034 @return Status -3 - Call completed with error.
1035
1036 **/
1037 #define PAL_BUS_SET_FEATURES 10
1038
1039
1040 /**
1041
1042 PAL Procedure - PAL_DEBUG_INFO.
1043
1044 Return the number of instruction and data breakpoint
1045 registers. It is required by IPF. It is required by IPF. The
1046 PAL procedure supports the Static Registers calling
1047 convention. It could be called at physical mode and virtual
1048 mode.
1049
1050 @param Index Index of PAL_DEBUG_INFO within the list of PAL
1051 procedures.
1052
1053 @return R9 Unsigned 64-bit integer denoting the number of
1054 pairs of instruction debug registers implemented
1055 by the processor.
1056
1057 @return R10 Unsigned 64-bit integer denoting the number of
1058 pairs of data debug registers implemented by the
1059 processor.
1060
1061 @return Status 0 - Call completed without error
1062
1063 @return Status -2 - Invalid argument
1064
1065 @return Status -3 - Call completed with error.
1066
1067 **/
1068 #define PAL_DEBUG_INFO 11
1069
1070 /**
1071
1072 PAL Procedure - PAL_FIXED_ADDR.
1073
1074 Return the fixed component of a processor¡¯s directed address.
1075 It is required by IPF. It is required by IPF. The PAL
1076 procedure supports the Static Registers calling convention. It
1077 could be called at physical mode and virtual mode.
1078
1079 @param Index Index of PAL_FIXED_ADDR within the list of PAL
1080 procedures.
1081
1082 @return R9 Fixed geographical address of this processor.
1083
1084
1085 @return Status 0 - Call completed without error
1086
1087 @return Status -2 - Invalid argument
1088
1089 @return Status -3 - Call completed with error.
1090
1091 **/
1092 #define PAL_FIXED_ADDR 12
1093
1094 /**
1095
1096 PAL Procedure - PAL_FREQ_BASE.
1097
1098 Return the frequency of the output clock for use by the
1099 platform, if generated by the processor. It is optinal. The
1100 PAL procedure supports the Static Registers calling
1101 convention. It could be called at physical mode and virtual
1102 mode.
1103
1104 @param Index Index of PAL_FREQ_BASE within the list of PAL
1105 procedures.
1106
1107 @return R9 Base frequency of the platform if generated by the
1108 processor chip.
1109
1110
1111 @return Status 0 - Call completed without error
1112
1113 @return Status -1 - Unimplemented procedure
1114
1115 @return Status -2 - Invalid argument
1116
1117 @return Status -3 - Call completed with error.
1118
1119 **/
1120 #define PAL_FREQ_BASE 13
1121
1122
1123 /**
1124
1125 PAL Procedure - PAL_FREQ_RATIOS.
1126
1127 Return ratio of processor, bus, and interval time counter to
1128 processor input clock or output clock for platform use, if
1129 generated by the processor. It is required by IPF. The PAL
1130 procedure supports the Static Registers calling convention. It
1131 could be called at physical mode and virtual mode.
1132
1133 @param Index Index of PAL_FREQ_RATIOS within the list of PAL
1134 procedures.
1135
1136 @return R9 Ratio of the processor frequency to the input
1137 clock of the processor, if the platform clock is
1138 generated externally or to the output clock to the
1139 platform, if the platform clock is generated by
1140 the processor.
1141
1142 @return R10 Ratio of the bus frequency to the input clock of
1143 the processor, if the platform clock is generated
1144 externally or to the output clock to the platform,
1145 if the platform clock is generated by the
1146 processor.
1147
1148 @return R11 Ratio of the interval timer counter rate to input
1149 clock of the processor, if the platform clock is
1150 generated externally or to the output clock to the
1151 platform, if the platform clock is generated by
1152 the processor.
1153
1154 @return Status 0 - Call completed without error
1155
1156 @return Status -2 - Invalid argument
1157
1158 @return Status -3 - Call completed with error.
1159
1160 **/
1161 #define PAL_FREQ_RATIOS 14
1162
1163 /**
1164
1165 @param NumberOfLogicalProcessors Total number of logical
1166 processors on this physical
1167 processor package that are
1168 enabled.
1169
1170 @param ThreadsPerCore Number of threads per core.
1171
1172 @param CoresPerProcessor Total number of cores on this
1173 physical processor package.
1174
1175 @param PhysicalProcessorPackageId Physical processor package
1176 identifier which was
1177 assigned at reset by the
1178 platform or bus
1179 controller. This value may
1180 or may not be unique
1181 across the entire platform
1182 since it depends on the
1183 platform vendor's policy.
1184 **/
1185 typedef struct {
1186 UINT64 NumberOfLogicalProcessors:16;
1187 UINT64 ThreadsPerCore:8;
1188 UINT64 Reserved1:8;
1189 UINT64 CoresPerProcessor;
1190 UINT64 Reserved2:8;
1191 UINT64 PhysicalProcessorPackageId:8;
1192 UINT64 Reserved3:8;
1193 } PAL_LOGICAL_PROCESSPR_OVERVIEW;
1194
1195 /**
1196
1197 @param ThreadId The thread identifier of the logical
1198 processor for which information is being
1199 returned. This value will be unique on a per
1200 core basis.
1201
1202 @param CoreId The core identifier of the logical processor
1203 for which information is being returned.
1204 This value will be unique on a per physical
1205 processor package basis.
1206
1207 **/
1208 typedef struct {
1209 UINT64 ThreadId:16;
1210 UINT64 Reserved1:16;
1211 UINT64 CoreId:16;
1212 UINT64 Reserved2:16;
1213 } PAL_LOGICAL_PROCESSORN_INFO1;
1214
1215
1216 /**
1217
1218 @param LogicalAddress Geographical address of the logical
1219 processor for which information is being
1220 returned. This is the same value that is
1221 returned by the PAL_FIXED_ADDR procedure
1222 when it is called on the logical
1223 processor.
1224
1225
1226 **/
1227 typedef struct {
1228 UINT64 LogicalAddress:16;
1229 UINT64 Reserved:48;
1230 } PAL_LOGICAL_PROCESSORN_INFO2;
1231
1232 /**
1233
1234 PAL Procedure - PAL_LOGICAL_TO_PHYSICAL.
1235
1236 Return information on which logical processors map to a
1237 physical processor die. It is optinal. The PAL procedure
1238 supports the Static Registers calling convention. It could be
1239 called at physical mode and virtual mode.
1240
1241 @param Index Index of PAL_LOGICAL_TO_PHYSICAL within the list of PAL
1242 procedures.
1243
1244 @param ProcessorNumber Signed 64-bit integer that specifies
1245 for which logical processor
1246 information is being requested. When
1247 this input argument is -1, information
1248 is returned about the logical
1249 processor on which the procedure call
1250 is made. This input argument must be
1251 in the range of 1 up to one less than
1252 the number of logical processors
1253 returned by num_log in the
1254 log_overview return value.
1255
1256
1257 @return R9 The format of PAL_LOGICAL_PROCESSPR_OVERVIEW.
1258
1259 @return R10 The format of PAL_LOGICAL_PROCESSORN_INFO1.
1260
1261 @return R11 The format of PAL_LOGICAL_PROCESSORN_INFO2.
1262
1263
1264 @return Status 0 - Call completed without error
1265
1266 @return Status -1 - Unimplemented procedure
1267
1268 @return Status -2 - Invalid argument
1269
1270 @return Status -3 - Call completed with error.
1271
1272 **/
1273 #define PAL_LOGICAL_TO_PHYSICAL 42
1274
1275
1276 /**
1277
1278 @param NumberOfPmcPairs Unsigned 8-bit number defining the
1279 number of generic PMC/PMD pairs.
1280
1281 @param WidthOfCounter Unsigned 8-bit number in the range
1282 0:60 defining the number of
1283 implemented counter bits.
1284
1285 @param TypeOfCycleCounting Unsigned 8-bit number defining the
1286 event type for counting processor
1287 cycles.
1288
1289
1290 @param TypeOfRetiredInstructionBundle Retired Unsigned 8-bit
1291 number defining the
1292 event type for retired
1293 instruction bundles.
1294
1295 **/
1296 typedef struct {
1297 UINT64 NumberOfPmcPairs:8;
1298 UINT64 WidthOfCounter:8;
1299 UINT64 TypeOfCycleCounting:8;
1300 UINT64 TypeOfRetiredInstructionBundle:8;
1301 UINT64 Reserved:32;
1302 } PAL_PERFORMANCE_INFO;
1303
1304 /**
1305
1306 PAL Procedure - PAL_PERF_MON_INFO.
1307
1308 Return the number and type of performance monitors. It is
1309 required by IPF. The PAL procedure supports the Static
1310 Registers calling convention. It could be called at physical
1311 mode and virtual mode.
1312
1313 @param Index Index of PAL_PERF_MON_INFO within the list of
1314 PAL procedures.
1315
1316 @param PerformanceBuffer An address to an 8-byte aligned
1317 128-byte memory buffer.
1318
1319
1320 @return R9 Information about the performance monitors
1321 implemented. See PAL_PERFORMANCE_INFO;
1322
1323 @return Status 0 - Call completed without error
1324
1325 @return Status -2 - Invalid argument
1326
1327 @return Status -3 - Call completed with error.
1328
1329 **/
1330 #define PAL_PERF_MON_INFO 15
1331
1332 #define PAL_PLATFORM_ADDR_INTERRUPT_BLOCK_TOKEN 0x0
1333 #define PAL_PLATFORM_ADDR_IO_BLOCK_TOKEN 0x1
1334
1335 /**
1336
1337 PAL Procedure - PAL_PLATFORM_ADDR.
1338
1339 Specify processor interrupt block address and I/O port space
1340 address. It is required by IPF. The PAL procedure supports the
1341 Static Registers calling convention. It could be called at
1342 physical mode and virtual mode.
1343
1344 @param Index Index of PAL_PLATFORM_ADDR within the list of
1345 PAL procedures.
1346
1347 @param Type Unsigned 64-bit integer specifying the type of
1348 block. 0 indicates that the processor interrupt
1349 block pointer should be initialized. 1 indicates
1350 that the processor I/O block pointer should be
1351 initialized.
1352
1353 @param Address Unsigned 64-bit integer specifying the address
1354 to which the processor I/O block or interrupt
1355 block shall be set. The address must specify
1356 an implemented physical address on the
1357 processor model, bit 63 is ignored.
1358
1359
1360 @return Status 0 - Call completed without error
1361
1362 @return Status -1 - Unimplemented procedure.
1363
1364 @return Status -2 - Invalid argument
1365
1366 @return Status -3 - Call completed with error.
1367
1368 **/
1369 #define PAL_PLATFORM_ADDR 16
1370
1371
1372 /**
1373
1374 @param EnableBerrPromotion Bit63. Enable BERR promotion. When
1375 1, the Bus Error (BERR) signal is
1376 promoted to the Bus Initialization
1377 (BINIT) signal, and the BINIT pin
1378 is asserted on the occurrence of
1379 each Bus Error. Setting this bit
1380 has no effect if BINIT signalling
1381 is disabled. (See
1382 PAL_BUS_GET/SET_FEATURES)
1383
1384 @param EnableMcaPromotion Bit62, Enable MCA promotion. When
1385 1, machine check aborts (MCAs) are
1386 promoted to the Bus Error signal,
1387 and the BERR pin is assert on each
1388 occurrence of an MCA. Setting this
1389 bit has no effect if BERR
1390 signalling is disabled. (See
1391 PAL_BUS_GET/SET_FEATURES)
1392
1393 @param EnableMcaToBinitPromotion Bit61, Enable MCA to BINIT
1394 promotion. When 1, machine
1395 check aborts (MCAs) are
1396 promoted to the Bus
1397 Initialization signal, and
1398 the BINIT pin is assert on
1399 each occurrence of an MCA.
1400 Setting this bit has no
1401 effect if BINIT signalling
1402 is disabled. (See
1403 PAL_BUS_GET/SET_FEATURES)
1404
1405 @param EnableCmciPromotion Bit60, Enable CMCI promotion When
1406 1, Corrected Machine Check
1407 Interrupts (CMCI) are promoted to
1408 MCAs. They are also further
1409 promoted to BERR if bit 39, Enable
1410 MCA promotion, is also set and
1411 they are promoted to BINIT if bit
1412 38, Enable MCA to BINIT promotion,
1413 is also set. This bit has no
1414 effect if MCA signalling is
1415 disabled (see
1416 PAL_BUS_GET/SET_FEATURES)
1417
1418 @param DisableCache Bit59, Disable Cache. When 0, the
1419 processor performs cast outs on
1420 cacheable pages and issues and responds
1421 to coherency requests normally. When 1,
1422 the processor performs a memory access
1423 for each reference regardless of cache
1424 contents and issues no coherence
1425 requests and responds as if the line
1426 were not present. Cache contents cannot
1427 be relied upon when the cache is
1428 disabled. WARNING: Semaphore
1429 instructions may not be atomic or may
1430 cause Unsupported Data Reference faults
1431 if caches are disabled.
1432
1433 @param DisableCoherency Bit58, Disable Coherency. When 0,
1434 the processor uses normal coherency
1435 requests and responses. When 1, the
1436 processor answers all requests as if
1437 the line were not present.
1438
1439 @param DisableDPM Bit57, Disable Dynamic Power Management
1440 (DPM). When 0, the hardware may reduce
1441 power consumption by removing the clock
1442 input from idle functional units. When 1,
1443 all functional units will receive clock
1444 input, even when idle.
1445
1446 @param DisableBinitWithTimeout Bit56, Disable a BINIT on
1447 internal processor time-out.
1448 When 0, the processor may
1449 generate a BINIT on an
1450 internal processor time-out.
1451 When 1, the processor will not
1452 generate a BINIT on an
1453 internal processor time-out.
1454 The event is silently ignored.
1455
1456
1457 @param EnableEnvNotification Bit55, Enable external
1458 notification when the processor
1459 detects hardware errors caused
1460 by environmental factors that
1461 could cause loss of
1462 deterministic behavior of the
1463 processor. When 1, this bit will
1464 enable external notification,
1465 when 0 external notification is
1466 not provided. The type of
1467 external notification of these
1468 errors is processor-dependent. A
1469 loss of processor deterministic
1470 behavior is considered to have
1471 occurred if these
1472 environmentally induced errors
1473 cause the processor to deviate
1474 from its normal execution and
1475 eventually causes different
1476 behavior which can be observed
1477 at the processor bus pins.
1478 Processor errors that do not
1479 have this effects (i.e.,
1480 software induced machine checks)
1481 may or may not be promoted
1482 depending on the processor
1483 implementation.
1484
1485 @param EnableVmsw Bit54, Enable the use of the vmsw
1486 instruction. When 0, the vmsw instruction
1487 causes a Virtualization fault when
1488 executed at the most privileged level.
1489 When 1, this bit will enable normal
1490 operation of the vmsw instruction.
1491
1492 @param EnableMcaOnDataPoisoning Bit53, Enable MCA signaling
1493 on data-poisoning event
1494 detection. When 0, a CMCI
1495 will be signaled on error
1496 detection. When 1, an MCA
1497 will be signaled on error
1498 detection. If this feature
1499 is not supported, then the
1500 corresponding argument is
1501 ignored when calling
1502 PAL_PROC_SET_FEATURES. Note
1503 that the functionality of
1504 this bit is independent of
1505 the setting in bit 60
1506 (Enable CMCI promotion), and
1507 that the bit 60 setting does
1508 not affect CMCI signaling
1509 for data-poisoning related
1510 events. Volume 2: Processor
1511 Abstraction Layer 2:431
1512 PAL_PROC_GET_FEATURES
1513
1514 @param DisablePState Bit52, Disable P-states. When 1, the PAL
1515 P-state procedures (PAL_PSTATE_INFO,
1516 PAL_SET_PSTATE, PAL_GET_PSTATE) will
1517 return with a status of -1
1518 (Unimplemented procedure).
1519
1520 @param DisableBranchPrediction Bit47, Disable Dynamic branch
1521 prediction. When 0, the
1522 processor may predict branch
1523 targets and speculatively
1524 execute, but may not commit
1525 results. When 1, the processor
1526 must wait until branch targets
1527 are known to execute.
1528
1529 @param DisableDynamicInsCachePrefetch Bit46, Disable
1530 DynamicInstruction Cache
1531 Prefetch. When 0, the
1532 processor may prefetch
1533 into the caches any
1534 instruction which has
1535 not been executed, but
1536 whose execution is
1537 likely. When 1,
1538 instructions may not be
1539 fetched until needed or
1540 hinted for execution.
1541 (Prefetch for a hinted
1542 branch is allowed even
1543 when dynamic instruction
1544 cache prefetch is
1545 disabled.)
1546
1547 @param DisableDynamicDataCachePrefetch Bit45, Disable Dynamic
1548 Data Cache Prefetch.
1549 When 0, the processor
1550 may prefetch into the
1551 caches any data which
1552 has not been accessed
1553 by instruction
1554 execution, but which
1555 is likely to be
1556 accessed. When 1, no
1557 data may be fetched
1558 until it is needed for
1559 instruction execution
1560 or is fetched by an
1561 lfetch instruction.
1562
1563 @param DisableSpontaneousDeferral Bit44, Disable Spontaneous
1564 Deferral. When 1, the
1565 processor may optionally
1566 defer speculative loads
1567 that do not encounter any
1568 exception conditions, but
1569 that trigger other
1570 implementation-dependent
1571 conditions (e.g., cache
1572 miss). When 0, spontaneous
1573 deferral is disabled.
1574
1575 @param DisableDynamicPrediction Bit43, Disable Dynamic
1576 Predicate Prediction. When
1577 0, the processor may predict
1578 predicate results and
1579 execute speculatively, but
1580 may not commit results until
1581 the actual predicates are
1582 known. When 1, the processor
1583 shall not execute predicated
1584 instructions until the
1585 actual predicates are known.
1586
1587 @param NoXr1ThroughXr3 Bit42, No XR1 through XR3 implemented.
1588 Denotes whether XR1 XR3 are
1589 implemented for machine check
1590 recovery. This feature may only be
1591 interrogated by PAL_PROC_GET_FEATURES.
1592 It may not be enabled or disabled by
1593 PAL_PROC_SET_FEATURES. The
1594 corresponding argument is ignored.
1595
1596 @param NoXipXpsrXfs Bit41, No XIP, XPSR, and XFS
1597 implemented. Denotes whether XIP, XPSR,
1598 and XFS are implemented for machine
1599 check recovery. This feature may only be
1600 interrogated by PAL_PROC_GET_FEATURES.
1601 It may not be enabled or disabled by
1602 PAL_PROC_SET_FEATURES. The corresponding
1603 argument is ignored.
1604
1605 @param NoVM Bit40, No Virtual Machine features implemented.
1606 Denotes whether PSR.vm is implemented. This
1607 feature may only be interrogated by
1608 PAL_PROC_GET_FEATURES. It may not be enabled or
1609 disabled by PAL_PROC_SET_FEATURES. The
1610 corresponding argument is ignored.
1611
1612 @param NoVariablePState Bit39, No Variable P-state
1613 performance: A value of 1, indicates
1614 that a processor implements
1615 techniques to optimize performance
1616 for the given P-state power budget
1617 by dynamically varying the
1618 frequency, such that maximum
1619 performance is achieved for the
1620 power budget. A value of 0,
1621 indicates that P-states have no
1622 frequency variation or very small
1623 frequency variations for their given
1624 power budget. This feature may only
1625 be interrogated by
1626 PAL_PROC_GET_FEATURES. it may not be
1627 enabled or disabled by
1628 PAL_PROC_SET_FEATURES. The
1629 corresponding argument is ignored.
1630
1631
1632 @param NoSimpleImpInUndefinedIns Bit38, No Simple
1633 implementation of
1634 unimplemented instruction
1635 addresses. Denotes how an
1636 unimplemented instruction
1637 address is recorded in IIP
1638 on an Unimplemented
1639 Instruction Address trap or
1640 fault. When 1, the full
1641 unimplemented address is
1642 recorded in IIP; when 0, the
1643 address is sign extended
1644 (virtual addresses) or zero
1645 extended (physical
1646 addresses). This feature may
1647 only be interrogated by
1648 PAL_PROC_GET_FEATURES. It
1649 may not be enabled or
1650 disabled by
1651 PAL_PROC_SET_FEATURES. The
1652 corresponding argument is
1653 ignored.
1654
1655 @param NoPresentPmi Bit37, No INIT, PMI, and LINT pins
1656 present. Denotes the absence of INIT,
1657 PMI, LINT0 and LINT1 pins on the
1658 processor. When 1, the pins are absent.
1659 When 0, the pins are present. This
1660 feature may only be interrogated by
1661 PAL_PROC_GET_FEATURES. It may not be
1662 enabled or disabled by
1663 PAL_PROC_SET_FEATURES. The corresponding
1664 argument is ignored.
1665
1666 @param FaultInUndefinedIns Bit36, No Unimplemented
1667 instruction address reported as
1668 fault. Denotes how the processor
1669 reports the detection of
1670 unimplemented instruction
1671 addresses. When 1, the processor
1672 reports an Unimplemented
1673 Instruction Address fault on the
1674 unimplemented address; when 0, it
1675 reports an Unimplemented
1676 Instruction Address trap on the
1677 previous instruction in program
1678 order. This feature may only be
1679 interrogated by
1680 PAL_PROC_GET_FEATURES. It may not
1681 be enabled or disabled by
1682 PAL_PROC_SET_FEATURES. The
1683 corresponding argument is
1684 ignored.
1685
1686 **/
1687 typedef struct {
1688 UINT64 Reserved1:36;
1689 UINT64 FaultInUndefinedIns:1;
1690 UINT64 NoPresentPmi:1;
1691 UINT64 NoSimpleImpInUndefinedIns:1;
1692 UINT64 NoVariablePState:1;
1693 UINT64 NoVM:1;
1694 UINT64 NoXipXpsrXfs:1;
1695 UINT64 NoXr1ThroughXr3:1;
1696 UINT64 DisableDynamicPrediction:1;
1697 UINT64 DisableSpontaneousDeferral:1;
1698 UINT64 DisableDynamicDataCachePrefetch:1;
1699 UINT64 DisableDynamicInsCachePrefetch:1;
1700 UINT64 DisableBranchPrediction:1;
1701 UINT64 Reserved2:4;
1702 UINT64 DisablePState:1;
1703 UINT64 EnableMcaOnDataPoisoning:1;
1704 UINT64 EnableVmsw:1;
1705 UINT64 EnableEnvNotification:1;
1706 UINT64 DisableBinitWithTimeout:1;
1707 UINT64 DisableDPM:1;
1708 UINT64 DisableCoherency:1;
1709 UINT64 DisableCache:1;
1710 UINT64 EnableCmciPromotion:1;
1711 UINT64 EnableMcaToBinitPromotion:1;
1712 UINT64 EnableMcaPromotion:1;
1713 UINT64 EnableBerrPromotion:1;
1714 } PAL_PROCESSOR_FEATURES;
1715
1716 /**
1717
1718 PAL Procedure - PAL_PROC_GET_FEATURES.
1719
1720 Return configurable processor features and their current
1721 setting. It is required by IPF. The PAL procedure supports the
1722 Static Registers calling convention. It could be called at
1723 physical mode and virtual mode.
1724
1725 @param Index Index of PAL_PROC_GET_FEATURES within the list of
1726 PAL procedures.
1727
1728 @param Reserved Reserved parameter.
1729
1730 @param FeatureSet Feature set information is being requested
1731 for.
1732
1733
1734 @return R9 64-bit vector of features implemented. See
1735 PAL_PROCESSOR_FEATURES.
1736
1737 @return R10 64-bit vector of current feature settings. See
1738 PAL_PROCESSOR_FEATURES.
1739
1740 @return R11 64-bit vector of features controllable by
1741 software.
1742
1743 @return Status 1 - Call completed without error; The
1744 feature_set passed is not supported but a
1745 feature_set of a larger value is supported.
1746
1747 @return Status 0 - Call completed without error
1748
1749 @return Status -2 - Invalid argument
1750
1751 @return Status -3 - Call completed with error.
1752
1753 @return Status -8 - feature_set passed is beyond the maximum
1754 feature_set supported
1755
1756 **/
1757 #define PAL_PROC_GET_FEATURES 17
1758
1759
1760 /**
1761
1762 PAL Procedure - PAL_PROC_SET_FEATURES.
1763
1764 Enable or disable configurable processor features. It is
1765 required by IPF. The PAL procedure supports the Static
1766 Registers calling convention. It could be called at physical
1767 mode.
1768
1769 @param Index Index of PAL_PROC_SET_FEATURES within the list of
1770 PAL procedures.
1771
1772 @param FeatureSelect 64-bit vector denoting desired state of
1773 each feature (1=select, 0=non-select).
1774
1775 @param FeatureSet Feature set to apply changes to. See
1776 PAL_PROC_GET_FEATURES for more information
1777 on feature sets.
1778
1779
1780
1781 @return Status 1 - Call completed without error; The
1782 feature_set passed is not supported but a
1783 feature_set of a larger value is supported
1784
1785 @return Status 0 - Call completed without error
1786
1787 @return Status -2 - Invalid argument
1788
1789 @return Status -3 - Call completed with error.
1790
1791 @return Status -8 - feature_set passed is beyond the maximum
1792 feature_set supported
1793
1794 **/
1795 #define PAL_PROC_SET_FEATURES 18
1796
1797
1798 //
1799 // Value of PAL_REGISTER_INFO.InfoRequest.
1800 //
1801 #define PAL_APPLICATION_REGISTER_IMPLEMENTED 0
1802 #define PAL_APPLICATION_REGISTER_READABLE 1
1803 #define PAL_CONTROL_REGISTER_IMPLEMENTED 2
1804 #define PAL_CONTROL_REGISTER_READABLE 3
1805
1806
1807 /**
1808
1809 PAL Procedure - PAL_REGISTER_INFO.
1810
1811 Return AR and CR register information. It is required by IPF.
1812 The PAL procedure supports the Static Registers calling
1813 convention. It could be called at physical mode and virtual
1814 mode.
1815
1816 @param Index Index of PAL_REGISTER_INFO within the list of
1817 PAL procedures.
1818
1819 @param InfoRequest Unsigned 64-bit integer denoting what
1820 register information is requested. See
1821 PAL_REGISTER_INFO.InfoRequest above.
1822
1823 @return R9 64-bit vector denoting information for registers
1824 0-63. Bit 0 is register 0, bit 63 is register 63.
1825
1826 @return R10 64-bit vector denoting information for registers
1827 64-127. Bit 0 is register 64, bit 63 is register
1828 127.
1829
1830
1831 @return Status 0 - Call completed without error
1832
1833 @return Status -2 - Invalid argument
1834
1835 @return Status -3 - Call completed with error.
1836
1837
1838 **/
1839 #define PAL_REGISTER_INFO 39
1840
1841 /**
1842
1843 PAL Procedure - PAL_RSE_INFO.
1844
1845 Return RSE information. It is required by IPF. The PAL
1846 procedure supports the Static Registers calling convention. It
1847 could be called at physical mode and virtual mode.
1848
1849 @param Index Index of PAL_RSE_INFO within the list of
1850 PAL procedures.
1851
1852 @param InfoRequest Unsigned 64-bit integer denoting what
1853 register information is requested. See
1854 PAL_REGISTER_INFO.InfoRequest above.
1855
1856 @return R9 Number of physical stacked general registers.
1857
1858 @return R10 RSE hints supported by processor.
1859
1860 @return Status 0 - Call completed without error
1861
1862 @return Status -2 - Invalid argument
1863
1864 @return Status -3 - Call completed with error.
1865
1866
1867 **/
1868 #define PAL_RSE_INFO 19
1869
1870 /**
1871
1872 @param VersionOfPalB Is a 16-bit binary coded decimal (BCD)
1873 number that provides identification
1874 information about the PAL_B firmware.
1875
1876 @param PalVendor Is an unsigned 8-bit integer indicating the
1877 vendor of the PAL code.
1878
1879 @param VersionOfPalB Is a 16-bit binary coded decimal (BCD)
1880 number that provides identification
1881 information about the PAL_A firmware. In
1882 the split PAL_A model, this return value
1883 is the version number of the
1884 processor-specific PAL_A. The generic
1885 PAL_A version is not returned by this
1886 procedure in the split PAL_A model.
1887
1888 **/
1889 typedef struct {
1890 UINT64 VersionOfPalB:16;
1891 UINT64 Reserved1:8;
1892 UINT64 PalVendor:8;
1893 UINT64 VersionOfPalA:16;
1894 UINT64 Reserved2:16;
1895 } PAL_VERSION_INFO;
1896
1897 /**
1898
1899 PAL Procedure - PAL_VERSION.
1900
1901 Return version of PAL code. It is required by IPF. The PAL
1902 procedure supports the Static Registers calling convention. It
1903 could be called at physical mode and virtual mode.
1904
1905 @param Index Index of PAL_VERSION within the list of
1906 PAL procedures.
1907
1908 @param InfoRequest Unsigned 64-bit integer denoting what
1909 register information is requested. See
1910 PAL_REGISTER_INFO.InfoRequest above.
1911
1912 @return R9 8-byte formatted value returning the minimum PAL
1913 version needed for proper operation of the
1914 processor. See PAL_VERSION_INFO above.
1915
1916 @return R10 8-byte formatted value returning the current PAL
1917 version running on the processor. See
1918 PAL_VERSION_INFO above.
1919
1920 @return Status 0 - Call completed without error
1921
1922 @return Status -2 - Invalid argument
1923
1924 @return Status -3 - Call completed with error.
1925
1926
1927 **/
1928 #define PAL_VERSION 20
1929
1930
1931
1932 //
1933 // Vectors of PAL_MC_CLEAR_LOG.pending
1934 //
1935 #define PAL_MC_PENDING BIT0
1936 #define PAL_INIT_PENDING BIT1
1937
1938 /**
1939
1940 PAL Procedure - PAL_MC_CLEAR_LOG.
1941
1942 Clear all error information from processor error logging
1943 registers. It is required by IPF. The PAL procedure supports
1944 the Static Registers calling convention. It could be called at
1945 physical mode and virtual mode.
1946
1947 @param Index Index of PAL_MC_CLEAR_LOG within the list of
1948 PAL procedures.
1949
1950
1951 @return R9 64-bit vector denoting whether an event is
1952 pending. See PAL_MC_CLEAR_LOG.pending above.
1953
1954
1955 @return Status 0 - Call completed without error
1956
1957 @return Status -2 - Invalid argument
1958
1959 @return Status -3 - Call completed with error.
1960
1961
1962 **/
1963 #define PAL_MC_CLEAR_LOG 21
1964
1965 /**
1966
1967 PAL Procedure - PAL_MC_DRAIN.
1968
1969 Ensure that all operations that could cause an MCA have
1970 completed. It is required by IPF. The PAL procedure supports
1971 the Static Registers calling convention. It could be called at
1972 physical mode and virtual mode.
1973
1974 @param Index Index of PAL_MC_DRAIN within the list of PAL
1975 procedures.
1976
1977
1978 @return Status 0 - Call completed without error
1979
1980 @return Status -2 - Invalid argument
1981
1982 @return Status -3 - Call completed with error.
1983
1984
1985 **/
1986 #define PAL_MC_DRAIN 22
1987
1988
1989 /**
1990
1991 PAL Procedure - PAL_MC_DYNAMIC_STATE.
1992
1993 Return Processor Dynamic State for logging by SAL. It is
1994 optional. The PAL procedure supports the Static Registers
1995 calling convention. It could be called at physical mode.
1996
1997 @param Index Index of PAL_MC_DYNAMIC_STATE within the list of PAL
1998 procedures.
1999
2000 @param Offset Offset of the next 8 bytes of Dynamic Processor
2001 State to return. (multiple of 8).
2002
2003 @return R9 Unsigned 64-bit integer denoting bytes of Dynamic
2004 Processor State returned.
2005
2006 @return R10 Next 8 bytes of Dynamic Processor State.
2007
2008 @return Status 0 - Call completed without error
2009
2010 @return Status -1 - Unimplemented procedure.
2011
2012 @return Status -2 - Invalid argument
2013
2014 @return Status -3 - Call completed with error.
2015
2016
2017 **/
2018 #define PAL_MC_DYNAMIC_STATE 24
2019
2020
2021
2022 //
2023 // Values of PAL_MC_ERROR_INFO.InfoIndex.
2024 //
2025 #define PAL_PROCESSOR_ERROR_MAP 0
2026 #define PAL_PROCESSOR_STATE_PARAM 1
2027 #define PAL_STRUCTURE_SPECIFIC_ERROR 2
2028
2029 /**
2030
2031 @param CoreId Bit3:0, Processor core ID (default is 0 for
2032 processors with a single core)
2033
2034 @param ThreadId Bit7:4, Logical thread ID (default is 0 for
2035 processors that execute a single thread)
2036
2037 @param InfoOfInsCache Bit11:8, Error information is
2038 available for 1st, 2nd, 3rd, and 4th
2039 level instruction caches.
2040
2041 @param InfoOfDataCache Bit15:12, Error information is
2042 available for 1st, 2nd, 3rd, and 4th
2043 level data/unified caches.
2044
2045 @param InfoOfInsTlb Bit19:16 Error information is available
2046 for 1st, 2nd, 3rd, and 4th level
2047 instruction TLB.
2048
2049 @param InfoOfDataTlb Bit23:20, Error information is available
2050 for 1st, 2nd, 3rd, and 4th level
2051 data/unified TLB
2052
2053 @param InfoOfProcessorBus Bit27:24 Error information is
2054 available for the 1st, 2nd, 3rd,
2055 and 4th level processor bus
2056 hierarchy.
2057
2058 @param InfoOfRegisterFile Bit31:28 Error information is
2059 available on register file
2060 structures.
2061
2062 @param InfoOfMicroArch Bit47:32, Error information is
2063 available on micro-architectural
2064 structures.
2065
2066 **/
2067 typedef struct {
2068 UINT64 CoreId:4;
2069 UINT64 ThreadId:4;
2070 UINT64 InfoOfInsCache:4;
2071 UINT64 InfoOfDataCache:4;
2072 UINT64 InfoOfInsTlb:4;
2073 UINT64 InfoOfDataTlb:4;
2074 UINT64 InfoOfProcessorBus:4;
2075 UINT64 InfoOfRegisterFile:4;
2076 UINT64 InfoOfMicroArch:4;
2077 UINT64 Reserved:16;
2078 } PAL_MC_ERROR_INFO_LEVEL_INDEX;
2079
2080 //
2081 // Value of PAL_MC_ERROR_INFO.ErrorTypeIndex
2082 //
2083 #define PAL_ERR_INFO_BY_LEVEL_INDEX 0
2084 #define PAL_ERR_INFO_TARGET_ADDRESS 1
2085 #define PAL_ERR_INFO_REQUESTER_IDENTIFIER 2
2086 #define PAL_ERR_INFO_REPONSER_INDENTIFIER 3
2087 #define PAL_ERR_INFO_PRECISE_INSTRUCTION_POINTER 4
2088
2089 /**
2090
2091 @param Operation Bit3:0, Type of cache operation that caused
2092 the machine check: 0 - unknown or internal
2093 error 1 - load 2 - store 3 - instruction
2094 fetch or instruction prefetch 4 - data
2095 prefetch (both hardware and software) 5 -
2096 snoop (coherency check) 6 - cast out
2097 (explicit or implicit write-back of a cache
2098 line) 7 - move in (cache line fill)
2099
2100 @param FailedCacheLevel Bit5:4 Level of cache where the
2101 error occurred. A value of 0
2102 indicates the first level of cache.
2103
2104 @param FailedInDataPart Bit8, Failure located in the data
2105 part of the cache line.
2106
2107 @param FailedInTagPart Bit9, Failure located in the tag part
2108 of the cache line.
2109
2110 @param FailedInDataCache Bit10, Failure located in the data
2111 cache
2112
2113 @param FailedInInsCache Bit11, Failure located in the
2114 instruction cache.
2115
2116
2117 @param Mesi Bit14:12, 0 - cache line is invalid. 1 - cache
2118 line is held shared. 2 - cache line is held
2119 exclusive. 3 - cache line is modified. All other
2120 values are reserved.
2121
2122 @param MesiIsValid Bit15, The mesi field in the cache_check
2123 parameter is valid.
2124
2125 @param FailedWay Bit20:16, Failure located in the way of
2126 the cache indicated by this value.
2127
2128 @param WayIndexIsValid Bit21, The way and index field in the
2129 cache_check parameter is valid.
2130
2131 @param MultipleBitsError Bit23, A multiple-bit error was
2132 detected, and data was poisoned for
2133 the corresponding cache line during
2134 castout.
2135
2136 @param IndexOfCacheLineError Bit51:32, Index of the cache
2137 line where the error occurred.
2138
2139 @param InstructionSet Bit54, Instruction set. If this value
2140 is set to zero, the instruction that
2141 generated the machine check was an
2142 Intel Itanium instruction. If this bit
2143 is set to one, the instruction that
2144 generated the machine check was IA-32
2145 instruction.
2146
2147 @param InstructionSetIsValid Bit55, The is field in the
2148 cache_check parameter is valid.
2149
2150 @param PrivilegeLevel Bit57:56, Privilege level. The
2151 privilege level of the instruction
2152 bundle responsible for generating the
2153 machine check.
2154
2155 @param PrivilegeLevelIsValide Bit58, The pl field of the
2156 cache_check parameter is
2157 valid.
2158
2159 @param McCorrected Bit59, Machine check corrected: This bit
2160 is set to one to indicate that the machine
2161 check has been corrected.
2162
2163 @param TargetAddressIsValid Bit60, Target address is valid:
2164 This bit is set to one to
2165 indicate that a valid target
2166 address has been logged.
2167
2168 @param RequesterIdentifier Bit61, Requester identifier: This
2169 bit is set to one to indicate that
2170 a valid requester identifier has
2171 been logged.
2172
2173 @param ResponserIdentifier Bit62, Responder identifier: This
2174 bit is set to one to indicate that
2175 a valid responder identifier has
2176 been logged.
2177
2178 @param PreciseInsPointer Bit63, Precise instruction pointer.
2179 This bit is set to one to indicate
2180 that a valid precise instruction
2181 pointer has been logged.
2182
2183 **/
2184 typedef struct {
2185 UINT64 Operation:4;
2186 UINT64 FailedCacheLevel:2;
2187 UINT64 Reserved1:2;
2188 UINT64 FailedInDataPart:1;
2189 UINT64 FailedInTagPart:1;
2190 UINT64 FailedInDataCache:1;
2191 UINT64 FailedInInsCache:1;
2192 UINT64 Mesi:3;
2193 UINT64 MesiIsValid:1;
2194 UINT64 FailedWay:5;
2195 UINT64 WayIndexIsValid:1;
2196
2197 UINT64 Reserved2:1;
2198 UINT64 MultipleBitsError:1;
2199 UINT64 Reserved3:8;
2200 UINT64 IndexOfCacheLineError:20;
2201 UINT64 Reserved4:2;
2202 UINT64 InstructionSet:1;
2203 UINT64 InstructionSetIsValid:1;
2204
2205 UINT64 PrivilegeLevel:2;
2206 UINT64 PrivilegeLevelIsValide:1;
2207
2208 UINT64 McCorrected:1;
2209
2210 UINT64 TargetAddressIsValid:1;
2211 UINT64 RequesterIdentifier:1;
2212 UINT64 ResponserIdentifier:1;
2213 UINT64 PreciseInsPointer:1;
2214
2215 } PAL_CACHE_CHECK_INFO;
2216
2217 /**
2218
2219 @param FailedSlot Bit7:0, Slot number of the translation
2220 register where the failure occurred.
2221
2222 @param FailedSlotIsValid Bit8, The tr_slot field in the
2223 TLB_check parameter is valid.
2224
2225 @param TlbLevel Bit11:10, The level of the TLB where the
2226 error occurred. A value of 0 indicates the
2227 first level of TLB
2228
2229 @param FailedInDataTr Bit16, Error occurred in the data
2230 translation registers.
2231
2232 @param FailedInInsTr Bit17, Error occurred in the instruction
2233 translation registers
2234
2235 @param FailedInDataTc Bit18, Error occurred in data
2236 translation cache.
2237
2238 @param FailedInInsTc Bit19, Error occurred in the instruction
2239 translation cache.
2240
2241 @param FailedOperation Bit23:20, Type of cache operation that
2242 caused the machine check: 0 - unknown
2243 1 - TLB access due to load instruction
2244 2 - TLB access due to store
2245 instruction 3 - TLB access due to
2246 instruction fetch or instruction
2247 prefetch 4 - TLB access due to data
2248 prefetch (both hardware and software)
2249 5 - TLB shoot down access 6 - TLB
2250 probe instruction (probe, tpa) 7 -
2251 move in (VHPT fill) 8 - purge (insert
2252 operation that purges entries or a TLB
2253 purge instruction) All other values
2254 are reserved.
2255
2256 @param InstructionSet Bit54, Instruction set. If this value
2257 is set to zero, the instruction that
2258 generated the machine check was an
2259 Intel Itanium instruction. If this bit
2260 is set to one, the instruction that
2261 generated the machine check was IA-32
2262 instruction.
2263
2264 @param InstructionSetIsValid Bit55, The is field in the
2265 TLB_check parameter is valid.
2266
2267 @param PrivelegeLevel Bit57:56, Privilege level. The
2268 privilege level of the instruction
2269 bundle responsible for generating the
2270 machine check.
2271
2272 @param PrivelegeLevelIsValid Bit58, The pl field of the
2273 TLB_check parameter is valid.
2274
2275 @param McCorrected Bit59, Machine check corrected: This bit
2276 is set to one to indicate that the machine
2277 check has been corrected.
2278
2279 @param TargetAddressIsValid Bit60, Target address is valid:
2280 This bit is set to one to
2281 indicate that a valid target
2282 address has been logged.
2283
2284 @param RequesterIdentifier Bit61 Requester identifier: This
2285 bit is set to one to indicate that
2286 a valid requester identifier has
2287 been logged.
2288
2289 @param ResponserIdentifier Bit62, Responder identifier: This
2290 bit is set to one to indicate that
2291 a valid responder identifier has
2292 been logged.
2293
2294 @param PreciseInsPointer Bit63 Precise instruction pointer.
2295 This bit is set to one to indicate
2296 that a valid precise instruction
2297 pointer has been logged.
2298 **/
2299 typedef struct {
2300 UINT64 FailedSlot:8;
2301 UINT64 FailedSlotIsValid:1;
2302 UINT64 Reserved1 :1;
2303 UINT64 TlbLevel:2;
2304 UINT64 Reserved2 :4;
2305 UINT64 FailedInDataTr:1;
2306 UINT64 FailedInInsTr:1;
2307 UINT64 FailedInDataTc:1;
2308 UINT64 FailedInInsTc:1;
2309 UINT64 FailedOperation:4;
2310 UINT64 Reserved3:30;
2311 UINT64 InstructionSet:1;
2312 UINT64 InstructionSetIsValid:1;
2313 UINT64 PrivelegeLevel:2;
2314 UINT64 PrivelegeLevelIsValid:1;
2315 UINT64 McCorrected:1;
2316 UINT64 TargetAddressIsValid:1;
2317 UINT64 RequesterIdentifier:1;
2318 UINT64 ResponserIdentifier:1;
2319 UINT64 PreciseInsPointer:1;
2320 } PAL_TLB_CHECK_INFO;
2321
2322 /**
2323
2324 PAL Procedure - PAL_MC_ERROR_INFO.
2325
2326 Return Processor Machine Check Information and Processor
2327 Static State for logging by SAL. It is required by IPF. The
2328 PAL procedure supports the Static Registers calling
2329 convention. It could be called at physical and virtual mode.
2330
2331 @param Index Index of PAL_MC_ERROR_INFO within the list of PAL
2332 procedures.
2333
2334 @param InfoIndex Unsigned 64-bit integer identifying the
2335 error information that is being requested.
2336 See PAL_MC_ERROR_INFO.InfoIndex.
2337
2338 @param LevelIndex 8-byte formatted value identifying the
2339 structure to return error information
2340 on. See PAL_MC_ERROR_INFO_LEVEL_INDEX.
2341
2342 @param ErrorTypeIndex Unsigned 64-bit integer denoting the
2343 type of error information that is
2344 being requested for the structure
2345 identified in LevelIndex.
2346
2347
2348 @return R9 Error information returned. The format of this
2349 value is dependant on the input values passed.
2350
2351 @return R10 If this value is zero, all the error information
2352 specified by err_type_index has been returned. If
2353 this value is one, more structure-specific error
2354 information is available and the caller needs to
2355 make this procedure call again with level_index
2356 unchanged and err_type_index, incremented.
2357
2358
2359 @return Status 0 - Call completed without error
2360
2361 @return Status -2 - Invalid argument
2362
2363 @return Status -3 - Call completed with error.
2364
2365 @return Status -6 - Argument was valid, but no error
2366 information was available
2367
2368
2369 **/
2370 #define PAL_MC_ERROR_INFO 25
2371
2372 /**
2373
2374 PAL Procedure - PAL_MC_EXPECTED.
2375
2376 Set/Reset Expected Machine Check Indicator. It is required by
2377 IPF. The PAL procedure supports the Static Registers calling
2378 convention. It could be called at physical mode.
2379
2380 @param Index Index of PAL_MC_EXPECTED within the list of PAL
2381 procedures.
2382
2383 @param Expected Unsigned integer with a value of 0 or 1 to
2384 set or reset the hardware resource
2385 PALE_CHECK examines for expected machine
2386 checks.
2387
2388
2389 @return R9 Unsigned integer denoting whether a machine check
2390 was previously expected.
2391
2392
2393 @return Status 0 - Call completed without error
2394
2395 @return Status -2 - Invalid argument
2396
2397 @return Status -3 - Call completed with error.
2398
2399 **/
2400 #define PAL_MC_EXPECTED 23
2401
2402 /**
2403
2404 PAL Procedure - PAL_MC_REGISTER_MEM.
2405
2406 Register min-state save area with PAL for machine checks and
2407 inits. It is required by IPF. The PAL procedure supports the
2408 Static Registers calling convention. It could be called at
2409 physical mode.
2410
2411 @param Index Index of PAL_MC_REGISTER_MEM within the list of PAL
2412 procedures.
2413
2414 @param Address Physical address of the buffer to be
2415 registered with PAL.
2416
2417
2418
2419 @return Status 0 - Call completed without error
2420
2421 @return Status -2 - Invalid argument
2422
2423 @return Status -3 - Call completed with error.
2424
2425 **/
2426 #define PAL_MC_REGISTER_MEM 27
2427
2428 /**
2429
2430 PAL Procedure - PAL_MC_RESUME.
2431
2432 Restore minimal architected state and return to interrupted
2433 process. It is required by IPF. The PAL procedure supports the
2434 Static Registers calling convention. It could be called at
2435 physical mode.
2436
2437 @param Index Index of PAL_MC_RESUME within the list of PAL
2438 procedures.
2439
2440 @param SetCmci Unsigned 64 bit integer denoting whether to
2441 set the CMC interrupt. A value of 0 indicates
2442 not to set the interrupt, a value of 1
2443 indicated to set the interrupt, and all other
2444 values are reserved.
2445
2446 @param SavePtr Physical address of min-state save area used
2447 to used to restore processor state.
2448
2449 @param NewContext Unsigned 64-bit integer denoting whether
2450 the caller is returning to a new context.
2451 A value of 0 indicates the caller is
2452 returning to the interrupted context, a
2453 value of 1 indicates that the caller is
2454 returning to a new context.
2455
2456
2457
2458 @return Status -2 - Invalid argument
2459
2460 @return Status -3 - Call completed with error.
2461
2462 **/
2463 #define PAL_MC_RESUME 26
2464
2465 /**
2466
2467 PAL Procedure - PAL_HALT.
2468
2469 Enter the low-power HALT state or an implementation-dependent
2470 low-power state. It is optinal. The PAL procedure supports the
2471 Static Registers calling convention. It could be called at
2472 physical mode.
2473
2474 @param Index Index of PAL_HALT within the list of PAL
2475 procedures.
2476
2477 @param HaltState Unsigned 64-bit integer denoting low power
2478 state requested.
2479
2480 @param IoDetailPtr 8-byte aligned physical address pointer to
2481 information on the type of I/O
2482 (load/store) requested.
2483
2484
2485 @return R9 Value returned if a load instruction is requested
2486 in the io_detail_ptr
2487
2488
2489 @return Status 0 - Call completed without error
2490
2491 @return Status -1 - Unimplemented procedure
2492
2493 @return Status -2 - Invalid argument
2494
2495 @return Status -3 - Call completed with error.
2496
2497 **/
2498 #define PAL_HALT 28
2499
2500
2501 /**
2502
2503 PAL Procedure - PAL_HALT_INFO.
2504
2505 Return the low power capabilities of the processor. It is
2506 required by IPF. The PAL procedure supports the
2507 Stacked Registers calling convention. It could be called at
2508 physical and virtual mode.
2509
2510 @param Index Index of PAL_HALT_INFO within the list of PAL
2511 procedures.
2512
2513 @param PowerBuffer 64-bit pointer to a 64-byte buffer aligned
2514 on an 8-byte boundary.
2515
2516
2517
2518 @return Status 0 - Call completed without error
2519
2520 @return Status -2 - Invalid argument
2521
2522 @return Status -3 - Call completed with error.
2523
2524 **/
2525 #define PAL_HALT_INFO 257
2526
2527
2528 /**
2529
2530 PAL Procedure - PAL_HALT_LIGHT.
2531
2532 Enter the low power LIGHT HALT state. It is required by
2533 IPF. The PAL procedure supports the Static Registers calling
2534 convention. It could be called at physical and virtual mode.
2535
2536 @param Index Index of PAL_HALT_LIGHT within the list of PAL
2537 procedures.
2538
2539
2540 @return Status 0 - Call completed without error
2541
2542 @return Status -2 - Invalid argument
2543
2544 @return Status -3 - Call completed with error.
2545
2546 **/
2547 #define PAL_HALT_LIGHT 29
2548
2549 /**
2550
2551 PAL Procedure - PAL_CACHE_LINE_INIT.
2552
2553 Initialize tags and data of a cache line for processor
2554 testing. It is required by IPF. The PAL procedure supports the
2555 Static Registers calling convention. It could be called at
2556 physical and virtual mode.
2557
2558 @param Index Index of PAL_CACHE_LINE_INIT within the list of PAL
2559 procedures.
2560
2561 @param Address Unsigned 64-bit integer value denoting the
2562 physical address from which the physical page
2563 number is to be generated. The address must be
2564 an implemented physical address, bit 63 must
2565 be zero.
2566
2567 @param DataValue 64-bit data value which is used to
2568 initialize the cache line.
2569
2570
2571 @return Status 0 - Call completed without error
2572
2573 @return Status -2 - Invalid argument
2574
2575 @return Status -3 - Call completed with error.
2576
2577 **/
2578 #define PAL_CACHE_LINE_INIT 31
2579
2580 /**
2581
2582 PAL Procedure - PAL_CACHE_READ.
2583
2584 Read tag and data of a cache line for diagnostic testing. It
2585 is optional. The PAL procedure supports the
2586 Satcked Registers calling convention. It could be called at
2587 physical mode.
2588
2589 @param Index Index of PAL_CACHE_READ within the list of PAL
2590 procedures.
2591
2592 @param LineId 8-byte formatted value describing where in the
2593 cache to read the data.
2594
2595 @param Address 64-bit 8-byte aligned physical address from
2596 which to read the data. The address must be an
2597 implemented physical address on the processor
2598 model with bit 63 set to zero.
2599
2600 @return R9 Right-justified value returned from the cache
2601 line.
2602
2603 @return R10 The number of bits returned in data.
2604
2605 @return R11 The status of the cache line.
2606
2607
2608
2609 @return Status 1 - The word at address was found in the
2610 cache, but the line was invalid.
2611
2612 @return Status 0 - Call completed without error
2613
2614 @return Status -2 - Invalid argument
2615
2616 @return Status -3 - Call completed with error.
2617
2618 @return Status -5 - The word at address was not found in the
2619 cache.
2620
2621 @return Status -7 - The operation requested is not supported
2622 for this cache_type and level.
2623
2624 **/
2625 #define PAL_CACHE_READ 259
2626
2627
2628 /**
2629
2630 Write tag and data of a cache for diagnostic testing. It is
2631 optional. The PAL procedure supports the Satcked Registers
2632 calling convention. It could be called at physical mode.
2633
2634 @param Index Index of PAL_CACHE_WRITE within the list of PAL
2635 procedures.
2636
2637 @param LineId 8-byte formatted value describing where in the
2638 cache to write the data.
2639
2640 @param Address 64-bit 8-byte aligned physical address at
2641 which the data should be written. The address
2642 must be an implemented physical address on the
2643 processor model with bit 63 set to 0.
2644
2645 @param Data Unsigned 64-bit integer value to write into
2646 the specified part of the cache.
2647
2648
2649 @return Status 0 - Call completed without error
2650
2651 @return Status -2 - Invalid argument
2652
2653 @return Status -3 - Call completed with error.
2654
2655
2656 @return Status -7 - The operation requested is not supported
2657 for this cache_type and level.
2658
2659 **/
2660 #define PAL_CACHE_WRITE 260
2661
2662 /**
2663
2664 PAL Procedure - PAL_TEST_INFO.
2665
2666 Returns alignment and size requirements needed for the memory
2667 buffer passed to the PAL_TEST_PROC procedure as well as
2668 information on self-test control words for the processor self
2669 tests. It is required by IPF. The PAL procedure supports the
2670 Static Registers calling convention. It could be called at
2671 physical mode.
2672
2673 @param Index Index of PAL_TEST_INFO within the list of PAL
2674 procedures.
2675
2676 @param TestPhase Unsigned integer that specifies which phase
2677 of the processor self-test information is
2678 being requested on. A value of 0 indicates
2679 the phase two of the processor self-test and
2680 a value of 1 indicates phase one of the
2681 processor self-test. All other values are
2682 reserved.
2683
2684 @return R9 Unsigned 64-bit integer denoting the number of
2685 bytes of main memory needed to perform the second
2686 phase of processor self-test.
2687
2688 @return R10 Unsigned 64-bit integer denoting the alignment
2689 required for the memory buffer.
2690
2691 @return R11 48-bit wide bit-field indicating if control of
2692 the processor self-tests is supported and which
2693 bits of the test_control field are defined for
2694 use.
2695
2696
2697 @return Status 0 - Call completed without error
2698
2699 @return Status -2 - Invalid argument
2700
2701 @return Status -3 - Call completed with error.
2702
2703
2704 **/
2705 #define PAL_TEST_INFO 37
2706
2707 /**
2708
2709 @param BufferSize Indicates the size in bytes of the memory
2710 buffer that is passed to this procedure.
2711 BufferSize must be greater than or equal in
2712 size to the bytes_needed return value from
2713 PAL_TEST_INFO, otherwise this procedure will
2714 return with an invalid argument return
2715 value.
2716
2717 @param TestPhase Defines which phase of the processor
2718 self-tests are requested to be run. A value
2719 of zero indicates to run phase two of the
2720 processor self-tests. Phase two of the
2721 processor self-tests are ones that require
2722 external memory to execute correctly. A
2723 value of one indicates to run phase one of
2724 the processor self-tests. Phase one of the
2725 processor self-tests are tests run during
2726 PALE_RESET and do not depend on external
2727 memory to run correctly. When the caller
2728 requests to have phase one of the processor
2729 self-test run via this procedure call, a
2730 memory buffer may be needed to save and
2731 restore state as required by the PAL calling
2732 conventions. The procedure PAL_TEST_INFO
2733 informs the caller about the requirements of
2734 the memory buffer.
2735
2736 **/
2737 typedef struct {
2738 UINT64 BufferSize:56;
2739 UINT64 TestPhase:8;
2740 } PAL_TEST_INFO_INFO;
2741
2742 /**
2743
2744 @param TestControl This is an ordered implementation-specific
2745 control word that allows the user control
2746 over the length and runtime of the
2747 processor self-tests. This control word is
2748 ordered from the longest running tests up
2749 to the shortest running tests with bit 0
2750 controlling the longest running test. PAL
2751 may not implement all 47-bits of the
2752 test_control word. PAL communicates if a
2753 bit provides control by placing a zero in
2754 that bit. If a bit provides no control,
2755 PAL will place a one in it. PAL will have
2756 two sets of test_control bits for the two
2757 phases of the processor self-test. PAL
2758 provides information about implemented
2759 test_control bits at the hand-off from PAL
2760 to SAL for the firmware recovery check.
2761 These test_control bits provide control
2762 for phase one of processor self-test. It
2763 also provides this information via the PAL
2764 procedure call PAL_TEST_INFO for both the
2765 phase one and phase two processor tests
2766 depending on which information the caller
2767 is requesting. PAL interprets these bits
2768 as input parameters on two occasions. The
2769 first time is when SAL passes control back
2770 to PAL after the firmware recovery check.
2771 The second time is when a call to
2772 PAL_TEST_PROC is made. When PAL interprets
2773 these bits it will only interpret
2774 implemented test_control bits and will
2775 ignore the values located in the
2776 unimplemented test_control bits. PAL
2777 interprets the implemented bits such that
2778 if a bit contains a zero, this indicates
2779 to run the test. If a bit contains a one,
2780 this indicates to PAL to skip the test. If
2781 the cs bit indicates that control is not
2782 available, the test_control bits will be
2783 ignored or generate an illegal argument in
2784 procedure calls if the caller sets these
2785 bits.
2786
2787 @param ControlSupport This bit defines if an implementation
2788 supports control of the PAL self-tests
2789 via the self-test control word. If
2790 this bit is 0, the implementation does
2791 not support control of the processor
2792 self-tests via the self-test control
2793 word. If this bit is 1, the
2794 implementation does support control of
2795 the processor self-tests via the
2796 self-test control word. If control is
2797 not supported, GR37 will be ignored at
2798 the hand-off between SAL and PAL after
2799 the firmware recovery check and the
2800 PAL procedures related to the
2801 processor self-tests may return
2802 illegal arguments if a user tries to
2803 use the self-test control features.
2804
2805 **/
2806 typedef struct {
2807 UINT64 TestControl:47;
2808 UINT64 ControlSupport:1;
2809 UINT64 Reserved:16;
2810 } PAL_SELF_TEST_CONTROL;
2811
2812 /**
2813
2814 @param Attributes Specifies the memory attributes that are
2815 allowed to be used with the memory buffer
2816 passed to this procedure. The attributes
2817 parameter is a vector where each bit
2818 represents one of the virtual memory
2819 attributes defined by the architecture.See
2820 MEMORY_AATRIBUTES. The caller is required
2821 to support the cacheable attribute for the
2822 memory buffer, otherwise an invalid
2823 argument will be returned.
2824
2825
2826 @param TestControl Is the self-test control word
2827 corresponding to the test_phase passed.
2828 This test_control directs the coverage and
2829 runtime of the processor self-tests
2830 specified by the test_phase input
2831 argument. Information on if this
2832 feature is implemented and the number of
2833 bits supported can be obtained by the
2834 PAL_TEST_INFO procedure call. If this
2835 feature is implemented by the processor,
2836 the caller can selectively skip parts of
2837 the processor self-test by setting
2838 test_control bits to a one. If a bit has a
2839 zero, this test will be run. The values in
2840 the unimplemented bits are ignored. If
2841 PAL_TEST_INFO indicated that the self-test
2842 control word is not implemented, this
2843 procedure will return with an invalid
2844 argument status if the caller sets any of
2845 the test_control bits. See
2846 PAL_SELF_TEST_CONTROL.
2847 **/
2848 typedef struct {
2849 UINT64 Attributes:8;
2850 UINT64 Reserved:8;
2851 UINT64 TestControl:48;
2852 } PAL_TEST_CONTROL;
2853
2854 /**
2855
2856 PAL Procedure - PAL_TEST_PROC.
2857
2858 Perform late processor self test. It is required by IPF. The
2859 PAL procedure supports the Static Registers calling
2860 convention. It could be called at physical mode.
2861
2862 @param Index Index of PAL_TEST_PROC within the list of PAL
2863 procedures.
2864
2865 @param TestAddress 64-bit physical address of main memory
2866 area to be used by processor self-test.
2867 The memory region passed must be
2868 cacheable, bit 63 must be zero.
2869
2870 @param TestInfo Input argument specifying the size of the
2871 memory buffer passed and the phase of the
2872 processor self-test that should be run. See
2873 PAL_TEST_INFO.
2874
2875 @param TestParam Input argument specifying the self-test
2876 control word and the allowable memory
2877 attributes that can be used with the memory
2878 buffer. See PAL_TEST_CONTROL.
2879
2880 @return R9 Formatted 8-byte value denoting the state of the
2881 processor after self-test
2882
2883
2884
2885 @return Status 1 - Call completed without error, but hardware
2886 failures occurred during self-test.
2887
2888 @return Status 0 - Call completed without error
2889
2890 @return Status -2 - Invalid argument
2891
2892 @return Status -3 - Call completed with error.
2893
2894
2895 **/
2896 #define PAL_TEST_PROC 258
2897
2898 /**
2899
2900 @param NumberOfInterruptControllers Number of interrupt
2901 controllers currently
2902 enabled on the system.
2903
2904 @param NumberOfProcessors Number of processors currently
2905 enabled on the system.
2906
2907 **/
2908 typedef struct {
2909 UINT32 NumberOfInterruptControllers;
2910 UINT32 NumberOfProcessors;
2911 } PAL_PLATFORM_INFO;
2912
2913 /**
2914
2915 PAL Procedure - PAL_COPY_INFO.
2916
2917 Return information needed to relocate PAL procedures and PAL
2918 PMI code to memory. It is required by IPF. The PAL procedure
2919 supports the Static Registers calling convention. It could be
2920 called at physical mode.
2921
2922 @param Index Index of PAL_COPY_INFO within the list of PAL
2923 procedures.
2924
2925 @param CopyType Unsigned integer denoting type of procedures
2926 for which copy information is requested.
2927
2928 @param PlatformInfo 8-byte formatted value describing the
2929 number of processors and the number of
2930 interrupt controllers currently enabled
2931 on the system. See PAL_PLATFORM_INFO.
2932
2933
2934 @param McaProcStateInfo Unsigned integer denoting the number
2935 of bytes that SAL needs for the
2936 min-state save area for each
2937 processor.
2938
2939
2940
2941 @return R9 Unsigned integer denoting the number of bytes of
2942 PAL information that must be copied to main
2943 memory.
2944
2945 @return R10 Unsigned integer denoting the starting alignment
2946 of the data to be copied.
2947
2948 @return Status 0 - Call completed without error
2949
2950 @return Status -2 - Invalid argument
2951
2952 @return Status -3 - Call completed with error.
2953
2954
2955 **/
2956 #define PAL_COPY_INFO 30
2957
2958 /**
2959
2960 PAL Procedure - PAL_COPY_PAL.
2961
2962 Relocate PAL procedures and PAL PMI code to memory. It is
2963 required by IPF. The PAL procedure supports the Stacked
2964 Registers calling convention. It could be called at physical
2965 mode.
2966
2967 @param Index Index of PAL_COPY_PAL within the list of PAL
2968 procedures.
2969
2970 @param TargetAddress Physical address of a memory buffer to
2971 copy relocatable PAL procedures and PAL
2972 PMI code.
2973
2974 @param AllocSize Unsigned integer denoting the size of the
2975 buffer passed by SAL for the copy operation.
2976
2977
2978 @param CopyOption Unsigned integer indicating whether
2979 relocatable PAL code and PAL PMI code
2980 should be copied from firmware address
2981 space to main memory.
2982
2983
2984 @return R9 Unsigned integer denoting the offset of PAL_PROC
2985 in the relocatable segment copied.
2986
2987 @return Status 0 - Call completed without error
2988
2989 @return Status -2 - Invalid argument
2990
2991 @return Status -3 - Call completed with error.
2992
2993
2994 **/
2995 #define PAL_COPY_PAL 256
2996
2997 /**
2998
2999 PAL Procedure - PAL_ENTER_IA_32_ENV.
3000
3001 Enter IA-32 System environment. It is optional. The PAL
3002 procedure supports the Static Registers calling convention.
3003 It could be called at physical mode.
3004
3005 Note: Since this is a special call, it does not follow the PAL
3006 static register calling convention. GR28 contains the index of
3007 PAL_ENTER_IA_32_ENV within the list of PAL procedures. All other
3008 input arguments including GR29-GR31 are setup by SAL to values
3009 as required by the IA-32 operating system defined in Table
3010 11-67. The registers that are designated as preserved, scratch,
3011 input arguments and procedure return values by the static
3012 procedure calling convention are not followed by this call. For
3013 instance, GR5 and GR6 need not be preserved since these are
3014 regarded as scratch by the IA-32 operating system. Note: In an
3015 MP system, this call must be COMPLETED on the first CPU to enter
3016 the IA-32 System Environment (may or may not be the BSP) prior
3017 to being called on the remaining processors in the MP system.
3018
3019 @param Index GR28 contains the index of the
3020 PAL_ENTER_IA_32_ENV call within the list of PAL
3021 procedures.
3022
3023
3024 @return Status The status is returned in GR4.
3025 -1 - Un-implemented procedure 0 JMPE detected
3026 at privilege level
3027
3028 0 - 1 SAL allocated buffer for IA-32 System
3029 Environment operation is too small
3030
3031 2 - IA-32 Firmware Checksum Error
3032
3033 3 - SAL allocated buffer for IA-32 System
3034 Environment operation is not properly aligned
3035
3036 4 - Error in SAL MP Info Table
3037
3038 5 - Error in SAL Memory Descriptor Table
3039
3040 6 - Error in SAL System Table
3041
3042 7 - Inconsistent IA-32 state
3043
3044 8 - IA-32 Firmware Internal Error
3045
3046 9 - IA-32 Soft Reset (Note: remaining register
3047 state is undefined for this termination
3048 reason)
3049
3050 10 - Machine Check Error
3051
3052 11 - Error in SAL I/O Intercept Table
3053
3054 12 - Processor exit due to other processor in
3055 MP system terminating the IA32 system
3056 environment. (Note: remaining register state
3057 is undefined for this termination reason.)
3058
3059 13 - Itanium architecture-based state
3060 corruption by either SAL PMI handler or I/O
3061 Intercept callback function.
3062
3063
3064 **/
3065 #define PAL_ENTER_IA_32_ENV 33
3066
3067 /**
3068
3069 PAL Procedure - PAL_PMI_ENTRYPOINT.
3070
3071 Register PMI memory entrypoints with processor. It is required
3072 by IPF. The PAL procedure supports the Stacked Registers
3073 calling convention. It could be called at physical mode.
3074
3075 @param Index Index of PAL_PMI_ENTRYPOINT within the list of
3076 PAL procedures.
3077
3078 @param SalPmiEntry 256-byte aligned physical address of SAL
3079 PMI entrypoint in memory.
3080
3081
3082 @return Status 0 - Call completed without error
3083
3084 @return Status -2 - Invalid argument
3085
3086 @return Status -3 - Call completed with error.
3087
3088
3089 **/
3090 #define PAL_PMI_ENTRYPOINT 32
3091
3092
3093 /**
3094
3095 The ASCII brand identification string will be copied to the
3096 address specified in the address input argument. The processor
3097 brand identification string is defined to be a maximum of 128
3098 characters long; 127 bytes will contain characters and the 128th
3099 byte is defined to be NULL (0). A processor may return less than
3100 the 127 ASCII characters as long as the string is null
3101 terminated. The string length will be placed in the brand_info
3102 return argument.
3103
3104 **/
3105 #define PAL_BRAND_INFO_ID_REQUEST 0
3106
3107 /**
3108
3109 PAL Procedure - PAL_BRAND_INFO.
3110
3111 Provides processor branding information. It is optional by
3112 IPF. The PAL procedure supports the Stacked Registers calling
3113 convention. It could be called at physical and Virtual mode.
3114
3115
3116 @param Index Index of PAL_BRAND_INFO within the list of PAL
3117 procedures.
3118
3119 @param InfoRequest Unsigned 64-bit integer specifying the
3120 information that is being requested. (See
3121 PAL_BRAND_INFO_ID_REQUEST)
3122
3123 @param Address Unsigned 64-bit integer specifying the
3124 address of the 128-byte block to which the
3125 processor brand string shall be written.
3126
3127
3128 @reture R9 Brand information returned. The format of this
3129 value is dependent on the input values passed.
3130
3131
3132 @return Status 0 - Call completed without error
3133
3134 @return Status -1 - Unimplemented procedure
3135
3136 @return Status -2 - Invalid argument
3137
3138 @return Status -3 - Call completed with error.
3139
3140 @return Status -6 - Input argument is not implemented.
3141
3142 **/
3143 #define PAL_BRAND_INFO 274
3144
3145 /**
3146
3147 PAL Procedure - PAL_GET_HW_POLICY.
3148
3149 Returns the current hardware resource sharing policy of the
3150 processor. It is optional by IPF. The PAL procedure supports
3151 the Static Registers calling convention. It could be called at
3152 physical and Virtual mode.
3153
3154
3155 @param Index Index of PAL_GET_HW_POLICY within the list of PAL
3156 procedures.
3157
3158 @param ProcessorNumber Unsigned 64-bit integer that specifies
3159 for which logical processor
3160 information is being requested. This
3161 input argument must be zero for the
3162 first call to this procedure and can
3163 be a maximum value of one less than
3164 the number of logical processors
3165 impacted by the hardware resource
3166 sharing policy, which is returned by
3167 the R10 return value.
3168
3169
3170 @reture R9 Unsigned 64-bit integer representing the current
3171 hardware resource sharing policy.
3172
3173 @return R10 Unsigned 64-bit integer that returns the number
3174 of logical processors impacted by the policy
3175 input argument.
3176
3177 @return R11 Unsigned 64-bit integer containing the logical
3178 address of one of the logical processors
3179 impacted by policy modification.
3180
3181
3182 @return Status 0 - Call completed without error
3183
3184 @return Status -1 - Unimplemented procedure
3185
3186 @return Status -2 - Invalid argument
3187
3188 @return Status -3 - Call completed with error.
3189
3190 @return Status -9 - Call requires PAL memory buffer.
3191
3192 **/
3193 #define PAL_GET_HW_POLICY 48
3194
3195
3196 //
3197 // Value of PAL_SET_HW_POLICY.Policy
3198 //
3199 #define PAL_SET_HW_POLICY_PERFORMANCE 0
3200 #define PAL_SET_HW_POLICY_FAIRNESS 1
3201 #define PAL_SET_HW_POLICY_HIGH_PRIORITY 2
3202 #define PAL_SET_HW_POLICY_EXCLUSIVE_HIGH_PRIORITY 3
3203
3204 /**
3205
3206 PAL Procedure - PAL_SET_HW_POLICY.
3207
3208 Sets the current hardware resource sharing policy of the
3209 processor. It is optional by IPF. The PAL procedure supports
3210 the Static Registers calling convention. It could be called at
3211 physical and Virtual mode.
3212
3213
3214 @param Index Index of PAL_SET_HW_POLICY within the list of PAL
3215 procedures.
3216
3217 @param Policy Unsigned 64-bit integer specifying the hardware
3218 resource sharing policy the caller is setting.
3219 See Value of PAL_SET_HW_POLICY.Policy above.
3220
3221
3222 @return Status 1 - Call completed successfully but could not
3223 change the hardware policy since a
3224 competing logical processor is set in
3225 exclusive high priority.
3226
3227 @return Status 0 - Call completed without error
3228
3229 @return Status -1 - Unimplemented procedure
3230
3231 @return Status -2 - Invalid argument
3232
3233 @return Status -3 - Call completed with error.
3234
3235 @return Status -9 - Call requires PAL memory buffer.
3236
3237 **/
3238 #define PAL_SET_HW_POLICY 49
3239
3240
3241 /**
3242
3243 @param Mode Bit2:0, Indicates the mode of operation for this
3244 procedure: 0 - Query mode 1 ¨C Error inject mode
3245 (err_inj should also be specified) 2 - Cancel
3246 outstanding trigger. All other fields in
3247 PAL_MC_ERROR_TYPE_INFO,
3248 PAL_MC_ERROR_STRUCTURE_INFO and
3249 PAL_MC_ERROR_DATA_BUFFER are ignored. All other
3250 values are reserved.
3251
3252 @param ErrorInjection Bit5:3, indicates the mode of error
3253 injection: 0 - Error inject only (no
3254 error consumption) 1 - Error inject
3255 and consume All other values are
3256 reserved.
3257
3258
3259 @param ErrorSeverity Bit7:6, indicates the severity desired
3260 for error injection/query. Definitions
3261 of the different error severity types
3262 0 - Corrected error 1 - Recoverable
3263 error 2 - Fatal error 3 - Reserved
3264
3265
3266 @param ErrorStructure Bit12:8, Indicates the structure
3267 identification for error
3268 injection/query: 0 - Any structure
3269 (cannot be used during query mode).
3270 When selected, the structure type used
3271 for error injection is determined by
3272 PAL. 1 - Cache 2 - TLB 3 - Register
3273 file 4 - Bus/System interconnect 5-15
3274 - Reserved 16-31 - Processor
3275 specific error injection
3276 capabilities.ErrorDataBuffer is used
3277 to specify error types. Please refer
3278 to the processor specific
3279 documentation for additional details.
3280
3281 @param StructureHierarchy Bit15:13, Indicates the structure
3282 hierarchy for error
3283 injection/query: 0 - Any level of
3284 hierarchy (cannot be used during
3285 query mode). When selected, the
3286 structure hierarchy used for error
3287 injection is determined by PAL. 1
3288 - Error structure hierarchy
3289 level-1 2 - Error structure
3290 hierarchy level-2 3 - Error
3291 structure hierarchy level-3 4 -
3292 Error structure hierarchy level-4
3293 All other values are reserved.
3294 Reserved 63:16 Reserved
3295
3296 **/
3297 typedef struct {
3298 UINT64 Mode:3;
3299 UINT64 ErrorInjection:3;
3300 UINT64 ErrorSeverity:2;
3301 UINT64 ErrorStructure:5;
3302 UINT64 StructureHierarchy:3;
3303 UINT64 Reserved:48;
3304 } PAL_MC_ERROR_TYPE_INFO;
3305
3306 /**
3307
3308 @param StructInfoIsValid Bit0 When 1, indicates that the
3309 structure information fields
3310 (c_t,cl_p,cl_id) are valid and
3311 should be used for error injection.
3312 When 0, the structure information
3313 fields are ignored, and the values
3314 of these fields used for error
3315 injection are
3316 implementation-specific.
3317
3318 @param CacheType Bit2:1 Indicates which cache should be used
3319 for error injection: 0 - Reserved 1 -
3320 Instruction cache 2 - Data or unified cache
3321 3 - Reserved
3322
3323
3324 @param PortionOfCacheLine Bit5:3 Indicates the portion of the
3325 cache line where the error should
3326 be injected: 0 - Reserved 1 - Tag
3327 2 - Data 3 - mesi All other
3328 values are reserved.
3329
3330 @param Mechanism Bit8:6 Indicates which mechanism is used to
3331 identify the cache line to be used for error
3332 injection: 0 - Reserved 1 - Virtual address
3333 provided in the inj_addr field of the buffer
3334 pointed to by err_data_buffer should be used
3335 to identify the cache line for error
3336 injection. 2 - Physical address provided in
3337 the inj_addr field of the buffer pointed to
3338 by err_data_buffershould be used to identify
3339 the cache line for error injection. 3 - way
3340 and index fields provided in err_data_buffer
3341 should be used to identify the cache line
3342 for error injection. All other values are
3343 reserved.
3344
3345 @param DataPoisonOfCacheLine Bit9 When 1, indicates that a
3346 multiple bit, non-correctable
3347 error should be injected in the
3348 cache line specified by cl_id.
3349 If this injected error is not
3350 consumed, it may eventually
3351 cause a data-poisoning event
3352 resulting in a corrected error
3353 signal, when the associated
3354 cache line is cast out (implicit
3355 or explicit write-back of the
3356 cache line). The error severity
3357 specified by err_sev in
3358 err_type_info must be set to 0
3359 (corrected error) when this bit
3360 is set.
3361
3362
3363 @param TrigerInfoIsValid Bit32 When 1, indicates that the
3364 trigger information fields (trigger,
3365 trigger_pl) are valid and should be
3366 used for error injection. When 0,
3367 the trigger information fields are
3368 ignored and error injection is
3369 performed immediately.
3370
3371 @param Triger Bit36:33 Indicates the operation type to be
3372 used as the error trigger condition. The
3373 address corresponding to the trigger is
3374 specified in the trigger_addr field of the
3375 buffer pointed to by err_data_buffer: 0 -
3376 Instruction memory access. The trigger match
3377 conditions for this operation type are similar
3378 to the IBR address breakpoint match conditions
3379 1 - Data memory access. The trigger match
3380 conditions for this operation type are similar
3381 to the DBR address breakpoint match conditions
3382 All other values are reserved.
3383
3384 @param PrivilegeOfTriger Bit39:37 Indicates the privilege
3385 level of the context during which
3386 the error should be injected: 0 -
3387 privilege level 0 1 - privilege
3388 level 1 2 - privilege level 2 3 -
3389 privilege level 3 All other values
3390 are reserved. If the implementation
3391 does not support privilege level
3392 qualifier for triggers (i.e. if
3393 trigger_pl is 0 in the capabilities
3394 vector), this field is ignored and
3395 triggers can be taken at any
3396 privilege level.
3397
3398 **/
3399 typedef struct {
3400 UINT64 StructInfoIsValid:1;
3401 UINT64 CacheType:2;
3402 UINT64 PortionOfCacheLine:3;
3403 UINT64 Mechanism:3;
3404 UINT64 DataPoisonOfCacheLine:1;
3405 UINT64 Reserved1:22;
3406 UINT64 TrigerInfoIsValid:1;
3407 UINT64 Triger:4;
3408 UINT64 PrivilegeOfTriger:3;
3409 UINT64 Reserved2:24;
3410 } PAL_MC_ERROR_STRUCT_INFO;
3411
3412 /**
3413
3414 Buffer Pointed to by err_data_buffer ¨C TLB
3415
3416 **/
3417 typedef struct {
3418 UINT64 TrigerAddress;
3419 UINT64 VirtualPageNumber:52;
3420 UINT64 Reserved1:8;
3421 UINT64 RegionId:24;
3422 UINT64 Reserved2:40;
3423 } PAL_MC_ERROR_DATA_BUFFER_TLB;
3424
3425 /**
3426
3427 PAL Procedure - PAL_MC_ERROR_INJECT.
3428
3429 Injects the requested processor error or returns information
3430 on the supported injection capabilities for this particular
3431 processor implementation. It is optional by IPF. The PAL
3432 procedure supports the Stacked Registers calling convention.
3433 It could be called at physical and Virtual mode.
3434
3435
3436 @param Index Index of PAL_MC_ERROR_INJECT within the list of PAL
3437 procedures.
3438
3439 @param ErrorTypeInfo Unsigned 64-bit integer specifying the
3440 first level error information which
3441 identifies the error structure and
3442 corresponding structure hierarchy, and
3443 the error severity.
3444
3445 @param ErrorStructInfo Unsigned 64-bit integer identifying
3446 the optional structure specific
3447 information that provides the second
3448 level details for the requested error.
3449
3450 @param ErrorDataBuffer 64-bit physical address of a buffer
3451 providing additional parameters for
3452 the requested error. The address of
3453 this buffer must be 8-byte aligned.
3454
3455 @return R9 64-bit vector specifying the supported error
3456 injection capabilities for the input argument
3457 combination of struct_hier, err_struct and
3458 err_sev fields in ErrorTypeInfo.
3459
3460 @return R10 64-bit vector specifying the architectural
3461 resources that are used by the procedure.
3462
3463
3464 @return Status 0 - Call completed without error
3465
3466 @return Status -1 - Unimplemented procedure
3467
3468 @return Status -2 - Invalid argument
3469
3470 @return Status -3 - Call completed with error.
3471
3472 @return Status -4 - Call completed with error; the requested
3473 error could not be injected due to failure in
3474 locating the target location in the specified
3475 structure.
3476
3477 @return Status -5 - Argument was valid, but requested error
3478 injection capability is not supported.
3479
3480 @return Status -9 - Call requires PAL memory buffer.
3481
3482 **/
3483 #define PAL_MC_ERROR_INJECT 276
3484
3485
3486 //
3487 // Types of PAL_GET_PSTATE.Type
3488 //
3489 #define PAL_GET_PSTATE_RECENT 0
3490 #define PAL_GET_PSTATE_AVERAGE_NEW_START 1
3491 #define PAL_GET_PSTATE_AVERAGE 2
3492 #define PAL_GET_PSTATE_NOW 3
3493
3494 /**
3495
3496 PAL Procedure - PAL_GET_PSTATE.
3497
3498 Returns the performance index of the processor. It is optional
3499 by IPF. The PAL procedure supports the Stacked Registers
3500 calling convention. It could be called at physical and Virtual
3501 mode.
3502
3503
3504 @param Index Index of PAL_GET_PSTATE within the list of PAL
3505 procedures.
3506
3507 @param Type Type of performance_index value to be returned
3508 by this procedure.See PAL_GET_PSTATE.Type above.
3509
3510
3511 @return R9 Unsigned integer denoting the processor
3512 performance for the time duration since the last
3513 PAL_GET_PSTATE procedure call was made. The
3514 value returned is between 0 and 100, and is
3515 relative to the performance index of the highest
3516 available P-state.
3517
3518 @return Status 1 - Call completed without error, but accuracy
3519 of performance index has been impacted by a
3520 thermal throttling event, or a
3521 hardware-initiated event.
3522
3523 @return Status 0 - Call completed without error
3524
3525 @return Status -1 - Unimplemented procedure
3526
3527 @return Status -2 - Invalid argument
3528
3529 @return Status -3 - Call completed with error.
3530
3531 @return Status -9 - Call requires PAL memory buffer.
3532
3533 **/
3534 #define PAL_GET_PSTATE 262
3535
3536 /**
3537
3538 Layout of PAL_PSTATE_INFO.PStateBuffer
3539
3540 **/
3541 typedef struct {
3542 UINT32 PerformanceIndex:7;
3543 UINT32 Reserved1:5;
3544 UINT32 TypicalPowerDissipation:20;
3545 UINT32 TransitionLatency1;
3546 UINT32 TransitionLatency2;
3547 UINT32 Reserved2;
3548 } PAL_PSTATE_INFO_BUFFER;
3549
3550
3551 /**
3552
3553 PAL Procedure - PAL_PSTATE_INFO.
3554
3555 Returns information about the P-states supported by the
3556 processor. It is optional by IPF. The PAL procedure supports
3557 the Static Registers calling convention. It could be called
3558 at physical and Virtual mode.
3559
3560
3561 @param Index Index of PAL_PSTATE_INFO within the list of PAL
3562 procedures.
3563
3564 @param PStateBuffer 64-bit pointer to a 256-byte buffer
3565 aligned on an 8-byte boundary. See
3566 PAL_PSTATE_INFO_BUFFER above.
3567
3568
3569 @return R9 Unsigned integer denoting the number of P-states
3570 supported. The maximum value of this field is 16.
3571
3572 @return R10 Dependency domain information
3573
3574
3575 @return Status 0 - Call completed without error
3576
3577 @return Status -1 - Unimplemented procedure
3578
3579 @return Status -2 - Invalid argument
3580
3581 @return Status -3 - Call completed with error.
3582
3583 **/
3584 #define PAL_PSTATE_INFO 44
3585
3586
3587 /**
3588
3589 PAL Procedure - PAL_SET_PSTATE.
3590
3591 To request a processor transition to a given P-state. It is
3592 optional by IPF. The PAL procedure supports the Stacked
3593 Registers calling convention. It could be called at physical
3594 and Virtual mode.
3595
3596
3597 @param Index Index of PAL_SET_PSTATE within the list of PAL
3598 procedures.
3599
3600 @param PState Unsigned integer denoting the processor
3601 P-state being requested.
3602
3603 @param ForcePState Unsigned integer denoting whether the
3604 P-state change should be forced for the
3605 logical processor.
3606
3607
3608
3609
3610
3611 @return Status 1 - Call completed without error, but
3612 transition request was not accepted
3613
3614 @return Status 0 - Call completed without error
3615
3616 @return Status -1 - Unimplemented procedure
3617
3618 @return Status -2 - Invalid argument
3619
3620 @return Status -3 - Call completed with error.
3621
3622 @return Status -9 - Call requires PAL memory buffer.
3623
3624 **/
3625 #define PAL_SET_PSTATE 263
3626
3627 /**
3628
3629 PAL Procedure - PAL_SHUTDOWN.
3630
3631 Put the logical processor into a low power state which can be
3632 exited only by a reset event. It is optional by IPF. The PAL
3633 procedure supports the Static Registers calling convention. It
3634 could be called at physical mode.
3635
3636
3637 @param Index Index of PAL_SHUTDOWN within the list of PAL
3638 procedures.
3639
3640 @param NotifyPlatform 8-byte aligned physical address
3641 pointer providing details on how to
3642 optionally notify the platform that
3643 the processor is entering a shutdown
3644 state.
3645
3646 @return Status -1 - Unimplemented procedure
3647
3648 @return Status -2 - Invalid argument
3649
3650 @return Status -3 - Call completed with error.
3651
3652 @return Status -9 - Call requires PAL memory buffer.
3653
3654 **/
3655 #define PAL_SHUTDOWN 45
3656
3657 /**
3658
3659 Layout of PAL_MEMORY_BUFFER.ControlWord
3660
3661 **/
3662 typedef struct {
3663 UINT64 Registration:1;
3664 UINT64 ProbeInterrupt:1;
3665 UINT64 Reserved:62;
3666 } PAL_MEMORY_CONTROL_WORD;
3667
3668 /**
3669
3670 PAL Procedure - PAL_MEMORY_BUFFER.
3671
3672 Provides cacheable memory to PAL for exclusive use during
3673 runtime. It is optional by IPF. The PAL procedure supports the
3674 Static Registers calling convention. It could be called at
3675 physical mode.
3676
3677
3678 @param Index Index of PAL_MEMORY_BUFFER within the list of PAL
3679 procedures.
3680
3681 @param BaseAddress Physical address of the memory buffer
3682 allocated for PAL use.
3683
3684 @param AllocSize Unsigned integer denoting the size of the
3685 memory buffer.
3686
3687 @param ControlWord Formatted bit vector that provides control
3688 options for this procedure. See
3689 PAL_MEMORY_CONTROL_WORD above.
3690
3691 @return R9 Returns the minimum size of the memory buffer
3692 required if the alloc_size input argument was
3693 not large enough.
3694
3695 @return Status 1 - Call has not completed a buffer relocation
3696 due to a pending interrupt
3697
3698 @return Status 0 - Call completed without error
3699
3700 @return Status -1 - Unimplemented procedure
3701
3702 @return Status -2 - Invalid argument
3703
3704 @return Status -3 - Call completed with error.
3705
3706 @return Status -9 - Call requires PAL memory buffer.
3707
3708 **/
3709 #define PAL_MEMORY_BUFFER 277
3710
3711
3712 /**
3713
3714 PAL Procedure - PAL_VP_CREATE.
3715
3716 Initializes a new vpd for the operation of a new virtual
3717 processor in the virtual environment. It is optional by IPF.
3718 The PAL procedure supports the Stacked Registers calling
3719 convention. It could be called at Virtual mode.
3720
3721
3722 @param Index Index of PAL_VP_CREATE within the list of PAL
3723 procedures.
3724
3725 @param Vpd 64-bit host virtual pointer to the Virtual
3726 Processor Descriptor (VPD).
3727
3728 @param HostIva 64-bit host virtual pointer to the host IVT
3729 for the virtual processor
3730
3731 @param OptionalHandler 64-bit non-zero host-virtual pointer
3732 to an optional handler for
3733 virtualization intercepts.
3734
3735
3736 @return Status 0 - Call completed without error
3737
3738 @return Status -1 - Unimplemented procedure
3739
3740 @return Status -2 - Invalid argument
3741
3742 @return Status -3 - Call completed with error.
3743
3744 @return Status -9 - Call requires PAL memory buffer.
3745
3746 **/
3747 #define PAL_VP_CREATE 265
3748
3749 /**
3750
3751 Virtual Environment Information Parameter
3752
3753 **/
3754 typedef struct {
3755 UINT64 Reserved1:8;
3756 UINT64 Opcode:1;
3757 UINT64 Reserved:53;
3758 } PAL_VP_ENV_INFO_RETURN;
3759
3760 /**
3761
3762 PAL Procedure - PAL_VP_ENV_INFO.
3763
3764 Returns the parameters needed to enter a virtual environment.
3765 It is optional by IPF. The PAL procedure supports the Stacked
3766 Registers calling convention. It could be called at Virtual
3767 mode.
3768
3769
3770 @param Index Index of PAL_VP_ENV_INFO within the list of PAL
3771 procedures.
3772
3773 @param Vpd 64-bit host virtual pointer to the Virtual
3774 Processor Descriptor (VPD).
3775
3776 @param HostIva 64-bit host virtual pointer to the host IVT
3777 for the virtual processor
3778
3779 @param OptionalHandler 64-bit non-zero host-virtual pointer
3780 to an optional handler for
3781 virtualization intercepts.
3782 @return R9 Unsigned integer denoting the number of bytes
3783 required by the PAL virtual environment buffer
3784 during PAL_VP_INIT_ENV
3785
3786 @return R10 64-bit vector of virtual environment
3787 information. See PAL_VP_ENV_INFO_RETURN.
3788
3789
3790 @return Status 0 - Call completed without error
3791
3792 @return Status -1 - Unimplemented procedure
3793
3794 @return Status -2 - Invalid argument
3795
3796 @return Status -3 - Call completed with error.
3797
3798 @return Status -9 - Call requires PAL memory buffer.
3799
3800 **/
3801 #define PAL_VP_ENV_INFO 266
3802
3803 /**
3804
3805 PAL Procedure - PAL_VP_EXIT_ENV.
3806
3807 Allows a logical processor to exit a virtual environment.
3808 It is optional by IPF. The PAL procedure supports the Stacked
3809 Registers calling convention. It could be called at Virtual
3810 mode.
3811
3812
3813 @param Index Index of PAL_VP_EXIT_ENV within the list of PAL
3814 procedures.
3815
3816 @param Iva Optional 64-bit host virtual pointer to the IVT
3817 when this procedure is done
3818
3819 @return Status 0 - Call completed without error
3820
3821 @return Status -1 - Unimplemented procedure
3822
3823 @return Status -2 - Invalid argument
3824
3825 @return Status -3 - Call completed with error.
3826
3827 @return Status -9 - Call requires PAL memory buffer.
3828
3829 **/
3830 #define PAL_VP_EXIT_ENV 267
3831
3832
3833
3834 /**
3835
3836 PAL Procedure - PAL_VP_INIT_ENV.
3837
3838 Allows a logical processor to enter a virtual environment. It
3839 is optional by IPF. The PAL procedure supports the Stacked
3840 Registers calling convention. It could be called at Virtual
3841 mode.
3842
3843
3844 @param Index Index of PAL_VP_INIT_ENV within the list of PAL
3845 procedures.
3846
3847 @param ConfigOptions 64-bit vector of global configuration
3848 settings.
3849
3850 @param PhysicalBase Host physical base address of a block of
3851 contiguous physical memory for the PAL
3852 virtual environment buffer 1) This
3853 memory area must be allocated by the VMM
3854 and be 4K aligned. The first logical
3855 processor to enter the environment will
3856 initialize the physical block for
3857 virtualization operations.
3858
3859 @param VirtualBase Host virtual base address of the
3860 corresponding physical memory block for
3861 the PAL virtual environment buffer : The
3862 VMM must maintain the host virtual to host
3863 physical data and instruction translations
3864 in TRs for addresses within the allocated
3865 address space. Logical processors in this
3866 virtual environment will use this address
3867 when transitioning to virtual mode
3868 operations.
3869
3870 @return R9 Virtualization Service Address ¨C VSA specifies
3871 the virtual base address of the PAL
3872 virtualization services in this virtual
3873 environment.
3874
3875
3876 @return Status 0 - Call completed without error
3877
3878 @return Status -1 - Unimplemented procedure
3879
3880 @return Status -2 - Invalid argument
3881
3882 @return Status -3 - Call completed with error.
3883
3884 @return Status -9 - Call requires PAL memory buffer.
3885
3886 **/
3887 #define PAL_VP_INIT_ENV 268
3888
3889
3890 /**
3891
3892 PAL Procedure - PAL_VP_REGISTER.
3893
3894 Register a different host IVT and/or a different optional
3895 virtualization intercept handler for the virtual processor
3896 specified by vpd. It is optional by IPF. The PAL procedure
3897 supports the Stacked Registers calling convention. It could be
3898 called at Virtual mode.
3899
3900
3901 @param Index Index of PAL_VP_REGISTER within the list of PAL
3902 procedures.
3903
3904 @param Vpd 64-bit host virtual pointer to the Virtual
3905 Processor Descriptor (VPD) host_iva 64-bit host
3906 virtual pointer to the host IVT for the virtual
3907 processor
3908
3909 @param OptionalHandler 64-bit non-zero host-virtual pointer
3910 to an optional handler for
3911 virtualization intercepts.
3912
3913
3914 @return Status 0 - Call completed without error
3915
3916 @return Status -1 - Unimplemented procedure
3917
3918 @return Status -2 - Invalid argument
3919
3920 @return Status -3 - Call completed with error.
3921
3922 @return Status -9 - Call requires PAL memory buffer.
3923
3924 **/
3925 #define PAL_VP_REGISTER 269
3926
3927
3928 /**
3929
3930 PAL Procedure - PAL_VP_RESTORE.
3931
3932 Restores virtual processor state for the specified vpd on the
3933 logical processor. It is optional by IPF. The PAL procedure
3934 supports the Stacked Registers calling convention. It could be
3935 called at Virtual mode.
3936
3937
3938 @param Index Index of PAL_VP_RESTORE within the list of PAL
3939 procedures.
3940
3941 @param Vpd 64-bit host virtual pointer to the Virtual
3942 Processor Descriptor (VPD) host_iva 64-bit host
3943 virtual pointer to the host IVT for the virtual
3944 processor
3945
3946 @param PalVector Vector specifies PAL procedure
3947 implementation-specific state to be
3948 restored.
3949
3950
3951 @return Status 0 - Call completed without error
3952
3953 @return Status -1 - Unimplemented procedure
3954
3955 @return Status -2 - Invalid argument
3956
3957 @return Status -3 - Call completed with error.
3958
3959 @return Status -9 - Call requires PAL memory buffer.
3960
3961 **/
3962 #define PAL_VP_RESTORE 270
3963
3964 /**
3965
3966 PAL Procedure - PAL_VP_SAVE.
3967
3968 Saves virtual processor state for the specified vpd on the
3969 logical processor. It is optional by IPF. The PAL procedure
3970 supports the Stacked Registers calling convention. It could be
3971 called at Virtual mode.
3972
3973
3974 @param Index Index of PAL_VP_SAVE within the list of PAL
3975 procedures.
3976
3977 @param Vpd 64-bit host virtual pointer to the Virtual
3978 Processor Descriptor (VPD) host_iva 64-bit host
3979 virtual pointer to the host IVT for the virtual
3980 processor
3981
3982 @param PalVector Vector specifies PAL procedure
3983 implementation-specific state to be
3984 restored.
3985
3986
3987 @return Status 0 - Call completed without error
3988
3989 @return Status -1 - Unimplemented procedure
3990
3991 @return Status -2 - Invalid argument
3992
3993 @return Status -3 - Call completed with error.
3994
3995 @return Status -9 - Call requires PAL memory buffer.
3996
3997 **/
3998 #define PAL_VP_SAVE 271
3999
4000
4001 /**
4002
4003 PAL Procedure - PAL_VP_TERMINATE.
4004
4005 Terminates operation for the specified virtual processor. It
4006 is optional by IPF. The PAL procedure supports the Stacked
4007 Registers calling convention. It could be called at Virtual
4008 mode.
4009
4010
4011 @param Index Index of PAL_VP_TERMINATE within the list of PAL
4012 procedures.
4013
4014 @param Vpd 64-bit host virtual pointer to the Virtual
4015 Processor Descriptor (VPD)
4016
4017 @param Iva Optional 64-bit host virtual pointer to the IVT
4018 when this procedure is done.
4019
4020 @return Status 0 - Call completed without error
4021
4022 @return Status -1 - Unimplemented procedure
4023
4024 @return Status -2 - Invalid argument
4025
4026 @return Status -3 - Call completed with error.
4027
4028 @return Status -9 - Call requires PAL memory buffer.
4029
4030 **/
4031 #define PAL_VP_TERMINATE 272
4032
4033 /**
4034 Makes a PAL procedure call.
4035
4036 This is a wrapper function to make a PAL procedure call. Based on the Index value,
4037 this API will make static or stacked PAL call. Architected procedures may be designated
4038 as required or optional. If a PAL procedure is specified as optional, a unique return
4039 code of 0xFFFFFFFFFFFFFFFF is returned in the Status field of the PAL_CALL_RETURN structure.
4040 This indicates that the procedure is not present in this PAL implementation. It is the
4041 caller¡¯s responsibility to check for this return code after calling any optional PAL
4042 procedure. No parameter checking is performed on the 4 input parameters, but there are
4043 some common rules that the caller should follow when making a PAL call. Any address
4044 passed to PAL as buffers for return parameters must be 8-byte aligned. Unaligned addresses
4045 may cause undefined results. For those parameters defined as reserved or some fields
4046 defined as reserved must be zero filled or the invalid argument return value may be
4047 returned or undefined result may occur during the execution of the procedure.
4048 This function is only available on IPF.
4049
4050 @param Index - The PAL procedure Index number.
4051 @param Arg2 - The 2nd parameter for PAL procedure calls.
4052 @param Arg3 - The 3rd parameter for PAL procedure calls.
4053 @param Arg4 - The 4th parameter for PAL procedure calls.
4054
4055 @return structure returned from the PAL Call procedure, including the status and return value.
4056
4057 **/
4058 PAL_CALL_RETURN
4059 EFIAPI
4060 PalCall (
4061 IN UINT64 Index,
4062 IN UINT64 Arg2,
4063 IN UINT64 Arg3,
4064 IN UINT64 Arg4
4065 );
4066
4067 #endif
4068