]> git.proxmox.com Git - mirror_edk2.git/blob - OldMdePkg/Include/Library/PalCallLib.h
169e90a837b19c81ade637b3f6b4ba152b3398f0
[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 /**
1333
1334 PAL Procedure - PAL_PLATFORM_ADDR.
1335
1336 Specify processor interrupt block address and I/O port space
1337 address. It is required by IPF. The PAL procedure supports the
1338 Static Registers calling convention. It could be called at
1339 physical mode and virtual mode.
1340
1341 @param Index Index of PAL_PLATFORM_ADDR within the list of
1342 PAL procedures.
1343
1344 @param Type Unsigned 64-bit integer specifying the type of
1345 block. 0 indicates that the processor interrupt
1346 block pointer should be initialized. 1 indicates
1347 that the processor I/O block pointer should be
1348 initialized.
1349
1350 @param Address Unsigned 64-bit integer specifying the address
1351 to which the processor I/O block or interrupt
1352 block shall be set. The address must specify
1353 an implemented physical address on the
1354 processor model, bit 63 is ignored.
1355
1356
1357 @return Status 0 - Call completed without error
1358
1359 @return Status -1 - Unimplemented procedure.
1360
1361 @return Status -2 - Invalid argument
1362
1363 @return Status -3 - Call completed with error.
1364
1365 **/
1366 #define PAL_PLATFORM_ADDR 16
1367
1368
1369 /**
1370
1371 @param EnableBerrPromotion Bit63. Enable BERR promotion. When
1372 1, the Bus Error (BERR) signal is
1373 promoted to the Bus Initialization
1374 (BINIT) signal, and the BINIT pin
1375 is asserted on the occurrence of
1376 each Bus Error. Setting this bit
1377 has no effect if BINIT signalling
1378 is disabled. (See
1379 PAL_BUS_GET/SET_FEATURES)
1380
1381 @param EnableMcaPromotion Bit62, Enable MCA promotion. When
1382 1, machine check aborts (MCAs) are
1383 promoted to the Bus Error signal,
1384 and the BERR pin is assert on each
1385 occurrence of an MCA. Setting this
1386 bit has no effect if BERR
1387 signalling is disabled. (See
1388 PAL_BUS_GET/SET_FEATURES)
1389
1390 @param EnableMcaToBinitPromotion Bit61, Enable MCA to BINIT
1391 promotion. When 1, machine
1392 check aborts (MCAs) are
1393 promoted to the Bus
1394 Initialization signal, and
1395 the BINIT pin is assert on
1396 each occurrence of an MCA.
1397 Setting this bit has no
1398 effect if BINIT signalling
1399 is disabled. (See
1400 PAL_BUS_GET/SET_FEATURES)
1401
1402 @param EnableCmciPromotion Bit60, Enable CMCI promotion When
1403 1, Corrected Machine Check
1404 Interrupts (CMCI) are promoted to
1405 MCAs. They are also further
1406 promoted to BERR if bit 39, Enable
1407 MCA promotion, is also set and
1408 they are promoted to BINIT if bit
1409 38, Enable MCA to BINIT promotion,
1410 is also set. This bit has no
1411 effect if MCA signalling is
1412 disabled (see
1413 PAL_BUS_GET/SET_FEATURES)
1414
1415 @param DisableCache Bit59, Disable Cache. When 0, the
1416 processor performs cast outs on
1417 cacheable pages and issues and responds
1418 to coherency requests normally. When 1,
1419 the processor performs a memory access
1420 for each reference regardless of cache
1421 contents and issues no coherence
1422 requests and responds as if the line
1423 were not present. Cache contents cannot
1424 be relied upon when the cache is
1425 disabled. WARNING: Semaphore
1426 instructions may not be atomic or may
1427 cause Unsupported Data Reference faults
1428 if caches are disabled.
1429
1430 @param DisableCoherency Bit58, Disable Coherency. When 0,
1431 the processor uses normal coherency
1432 requests and responses. When 1, the
1433 processor answers all requests as if
1434 the line were not present.
1435
1436 @param DisableDPM Bit57, Disable Dynamic Power Management
1437 (DPM). When 0, the hardware may reduce
1438 power consumption by removing the clock
1439 input from idle functional units. When 1,
1440 all functional units will receive clock
1441 input, even when idle.
1442
1443 @param DisableBinitWithTimeout Bit56, Disable a BINIT on
1444 internal processor time-out.
1445 When 0, the processor may
1446 generate a BINIT on an
1447 internal processor time-out.
1448 When 1, the processor will not
1449 generate a BINIT on an
1450 internal processor time-out.
1451 The event is silently ignored.
1452
1453
1454 @param EnableEnvNotification Bit55, Enable external
1455 notification when the processor
1456 detects hardware errors caused
1457 by environmental factors that
1458 could cause loss of
1459 deterministic behavior of the
1460 processor. When 1, this bit will
1461 enable external notification,
1462 when 0 external notification is
1463 not provided. The type of
1464 external notification of these
1465 errors is processor-dependent. A
1466 loss of processor deterministic
1467 behavior is considered to have
1468 occurred if these
1469 environmentally induced errors
1470 cause the processor to deviate
1471 from its normal execution and
1472 eventually causes different
1473 behavior which can be observed
1474 at the processor bus pins.
1475 Processor errors that do not
1476 have this effects (i.e.,
1477 software induced machine checks)
1478 may or may not be promoted
1479 depending on the processor
1480 implementation.
1481
1482 @param EnableVmsw Bit54, Enable the use of the vmsw
1483 instruction. When 0, the vmsw instruction
1484 causes a Virtualization fault when
1485 executed at the most privileged level.
1486 When 1, this bit will enable normal
1487 operation of the vmsw instruction.
1488
1489 @param EnableMcaOnDataPoisoning Bit53, Enable MCA signaling
1490 on data-poisoning event
1491 detection. When 0, a CMCI
1492 will be signaled on error
1493 detection. When 1, an MCA
1494 will be signaled on error
1495 detection. If this feature
1496 is not supported, then the
1497 corresponding argument is
1498 ignored when calling
1499 PAL_PROC_SET_FEATURES. Note
1500 that the functionality of
1501 this bit is independent of
1502 the setting in bit 60
1503 (Enable CMCI promotion), and
1504 that the bit 60 setting does
1505 not affect CMCI signaling
1506 for data-poisoning related
1507 events. Volume 2: Processor
1508 Abstraction Layer 2:431
1509 PAL_PROC_GET_FEATURES
1510
1511 @param DisablePState Bit52, Disable P-states. When 1, the PAL
1512 P-state procedures (PAL_PSTATE_INFO,
1513 PAL_SET_PSTATE, PAL_GET_PSTATE) will
1514 return with a status of -1
1515 (Unimplemented procedure).
1516
1517 @param DisableBranchPrediction Bit47, Disable Dynamic branch
1518 prediction. When 0, the
1519 processor may predict branch
1520 targets and speculatively
1521 execute, but may not commit
1522 results. When 1, the processor
1523 must wait until branch targets
1524 are known to execute.
1525
1526 @param DisableDynamicInsCachePrefetch Bit46, Disable
1527 DynamicInstruction Cache
1528 Prefetch. When 0, the
1529 processor may prefetch
1530 into the caches any
1531 instruction which has
1532 not been executed, but
1533 whose execution is
1534 likely. When 1,
1535 instructions may not be
1536 fetched until needed or
1537 hinted for execution.
1538 (Prefetch for a hinted
1539 branch is allowed even
1540 when dynamic instruction
1541 cache prefetch is
1542 disabled.)
1543
1544 @param DisableDynamicDataCachePrefetch Bit45, Disable Dynamic
1545 Data Cache Prefetch.
1546 When 0, the processor
1547 may prefetch into the
1548 caches any data which
1549 has not been accessed
1550 by instruction
1551 execution, but which
1552 is likely to be
1553 accessed. When 1, no
1554 data may be fetched
1555 until it is needed for
1556 instruction execution
1557 or is fetched by an
1558 lfetch instruction.
1559
1560 @param DisableSpontaneousDeferral Bit44, Disable Spontaneous
1561 Deferral. When 1, the
1562 processor may optionally
1563 defer speculative loads
1564 that do not encounter any
1565 exception conditions, but
1566 that trigger other
1567 implementation-dependent
1568 conditions (e.g., cache
1569 miss). When 0, spontaneous
1570 deferral is disabled.
1571
1572 @param DisableDynamicPrediction Bit43, Disable Dynamic
1573 Predicate Prediction. When
1574 0, the processor may predict
1575 predicate results and
1576 execute speculatively, but
1577 may not commit results until
1578 the actual predicates are
1579 known. When 1, the processor
1580 shall not execute predicated
1581 instructions until the
1582 actual predicates are known.
1583
1584 @param NoXr1ThroughXr3 Bit42, No XR1 through XR3 implemented.
1585 Denotes whether XR1 XR3 are
1586 implemented for machine check
1587 recovery. This feature may only be
1588 interrogated by PAL_PROC_GET_FEATURES.
1589 It may not be enabled or disabled by
1590 PAL_PROC_SET_FEATURES. The
1591 corresponding argument is ignored.
1592
1593 @param NoXipXpsrXfs Bit41, No XIP, XPSR, and XFS
1594 implemented. Denotes whether XIP, XPSR,
1595 and XFS are implemented for machine
1596 check recovery. This feature may only be
1597 interrogated by PAL_PROC_GET_FEATURES.
1598 It may not be enabled or disabled by
1599 PAL_PROC_SET_FEATURES. The corresponding
1600 argument is ignored.
1601
1602 @param NoVM Bit40, No Virtual Machine features implemented.
1603 Denotes whether PSR.vm is implemented. This
1604 feature may only be interrogated by
1605 PAL_PROC_GET_FEATURES. It may not be enabled or
1606 disabled by PAL_PROC_SET_FEATURES. The
1607 corresponding argument is ignored.
1608
1609 @param NoVariablePState Bit39, No Variable P-state
1610 performance: A value of 1, indicates
1611 that a processor implements
1612 techniques to optimize performance
1613 for the given P-state power budget
1614 by dynamically varying the
1615 frequency, such that maximum
1616 performance is achieved for the
1617 power budget. A value of 0,
1618 indicates that P-states have no
1619 frequency variation or very small
1620 frequency variations for their given
1621 power budget. This feature may only
1622 be interrogated by
1623 PAL_PROC_GET_FEATURES. it may not be
1624 enabled or disabled by
1625 PAL_PROC_SET_FEATURES. The
1626 corresponding argument is ignored.
1627
1628
1629 @param NoSimpleImpInUndefinedIns Bit38, No Simple
1630 implementation of
1631 unimplemented instruction
1632 addresses. Denotes how an
1633 unimplemented instruction
1634 address is recorded in IIP
1635 on an Unimplemented
1636 Instruction Address trap or
1637 fault. When 1, the full
1638 unimplemented address is
1639 recorded in IIP; when 0, the
1640 address is sign extended
1641 (virtual addresses) or zero
1642 extended (physical
1643 addresses). This feature may
1644 only be interrogated by
1645 PAL_PROC_GET_FEATURES. It
1646 may not be enabled or
1647 disabled by
1648 PAL_PROC_SET_FEATURES. The
1649 corresponding argument is
1650 ignored.
1651
1652 @param NoPresentPmi Bit37, No INIT, PMI, and LINT pins
1653 present. Denotes the absence of INIT,
1654 PMI, LINT0 and LINT1 pins on the
1655 processor. When 1, the pins are absent.
1656 When 0, the pins are present. This
1657 feature may only be interrogated by
1658 PAL_PROC_GET_FEATURES. It may not be
1659 enabled or disabled by
1660 PAL_PROC_SET_FEATURES. The corresponding
1661 argument is ignored.
1662
1663 @param FaultInUndefinedIns Bit36, No Unimplemented
1664 instruction address reported as
1665 fault. Denotes how the processor
1666 reports the detection of
1667 unimplemented instruction
1668 addresses. When 1, the processor
1669 reports an Unimplemented
1670 Instruction Address fault on the
1671 unimplemented address; when 0, it
1672 reports an Unimplemented
1673 Instruction Address trap on the
1674 previous instruction in program
1675 order. This feature may only be
1676 interrogated by
1677 PAL_PROC_GET_FEATURES. It may not
1678 be enabled or disabled by
1679 PAL_PROC_SET_FEATURES. The
1680 corresponding argument is
1681 ignored.
1682
1683 **/
1684 typedef struct {
1685 UINT64 Reserved1:36;
1686 UINT64 FaultInUndefinedIns:1;
1687 UINT64 NoPresentPmi:1;
1688 UINT64 NoSimpleImpInUndefinedIns:1;
1689 UINT64 NoVariablePState:1;
1690 UINT64 NoVM:1;
1691 UINT64 NoXipXpsrXfs:1;
1692 UINT64 NoXr1ThroughXr3:1;
1693 UINT64 DisableDynamicPrediction:1;
1694 UINT64 DisableSpontaneousDeferral:1;
1695 UINT64 DisableDynamicDataCachePrefetch:1;
1696 UINT64 DisableDynamicInsCachePrefetch:1;
1697 UINT64 DisableBranchPrediction:1;
1698 UINT64 Reserved2:4;
1699 UINT64 DisablePState:1;
1700 UINT64 EnableMcaOnDataPoisoning:1;
1701 UINT64 EnableVmsw:1;
1702 UINT64 EnableEnvNotification:1;
1703 UINT64 DisableBinitWithTimeout:1;
1704 UINT64 DisableDPM:1;
1705 UINT64 DisableCoherency:1;
1706 UINT64 DisableCache:1;
1707 UINT64 EnableCmciPromotion:1;
1708 UINT64 EnableMcaToBinitPromotion:1;
1709 UINT64 EnableMcaPromotion:1;
1710 UINT64 EnableBerrPromotion:1;
1711 } PAL_PROCESSOR_FEATURES;
1712
1713 /**
1714
1715 PAL Procedure - PAL_PROC_GET_FEATURES.
1716
1717 Return configurable processor features and their current
1718 setting. It is required by IPF. The PAL procedure supports the
1719 Static Registers calling convention. It could be called at
1720 physical mode and virtual mode.
1721
1722 @param Index Index of PAL_PROC_GET_FEATURES within the list of
1723 PAL procedures.
1724
1725 @param Reserved Reserved parameter.
1726
1727 @param FeatureSet Feature set information is being requested
1728 for.
1729
1730
1731 @return R9 64-bit vector of features implemented. See
1732 PAL_PROCESSOR_FEATURES.
1733
1734 @return R10 64-bit vector of current feature settings. See
1735 PAL_PROCESSOR_FEATURES.
1736
1737 @return R11 64-bit vector of features controllable by
1738 software.
1739
1740 @return Status 1 - Call completed without error; The
1741 feature_set passed is not supported but a
1742 feature_set of a larger value is supported.
1743
1744 @return Status 0 - Call completed without error
1745
1746 @return Status -2 - Invalid argument
1747
1748 @return Status -3 - Call completed with error.
1749
1750 @return Status -8 - feature_set passed is beyond the maximum
1751 feature_set supported
1752
1753 **/
1754 #define PAL_PROC_GET_FEATURES 17
1755
1756
1757 /**
1758
1759 PAL Procedure - PAL_PROC_SET_FEATURES.
1760
1761 Enable or disable configurable processor features. It is
1762 required by IPF. The PAL procedure supports the Static
1763 Registers calling convention. It could be called at physical
1764 mode.
1765
1766 @param Index Index of PAL_PROC_SET_FEATURES within the list of
1767 PAL procedures.
1768
1769 @param FeatureSelect 64-bit vector denoting desired state of
1770 each feature (1=select, 0=non-select).
1771
1772 @param FeatureSet Feature set to apply changes to. See
1773 PAL_PROC_GET_FEATURES for more information
1774 on feature sets.
1775
1776
1777
1778 @return Status 1 - Call completed without error; The
1779 feature_set passed is not supported but a
1780 feature_set of a larger value is supported
1781
1782 @return Status 0 - Call completed without error
1783
1784 @return Status -2 - Invalid argument
1785
1786 @return Status -3 - Call completed with error.
1787
1788 @return Status -8 - feature_set passed is beyond the maximum
1789 feature_set supported
1790
1791 **/
1792 #define PAL_PROC_SET_FEATURES 18
1793
1794
1795 //
1796 // Value of PAL_REGISTER_INFO.InfoRequest.
1797 //
1798 #define PAL_APPLICATION_REGISTER_IMPLEMENTED 0
1799 #define PAL_APPLICATION_REGISTER_READABLE 1
1800 #define PAL_CONTROL_REGISTER_IMPLEMENTED 2
1801 #define PAL_CONTROL_REGISTER_READABLE 3
1802
1803
1804 /**
1805
1806 PAL Procedure - PAL_REGISTER_INFO.
1807
1808 Return AR and CR register information. It is required by IPF.
1809 The PAL procedure supports the Static Registers calling
1810 convention. It could be called at physical mode and virtual
1811 mode.
1812
1813 @param Index Index of PAL_REGISTER_INFO within the list of
1814 PAL procedures.
1815
1816 @param InfoRequest Unsigned 64-bit integer denoting what
1817 register information is requested. See
1818 PAL_REGISTER_INFO.InfoRequest above.
1819
1820 @return R9 64-bit vector denoting information for registers
1821 0-63. Bit 0 is register 0, bit 63 is register 63.
1822
1823 @return R10 64-bit vector denoting information for registers
1824 64-127. Bit 0 is register 64, bit 63 is register
1825 127.
1826
1827
1828 @return Status 0 - Call completed without error
1829
1830 @return Status -2 - Invalid argument
1831
1832 @return Status -3 - Call completed with error.
1833
1834
1835 **/
1836 #define PAL_REGISTER_INFO 39
1837
1838 /**
1839
1840 PAL Procedure - PAL_RSE_INFO.
1841
1842 Return RSE information. It is required by IPF. The PAL
1843 procedure supports the Static Registers calling convention. It
1844 could be called at physical mode and virtual mode.
1845
1846 @param Index Index of PAL_RSE_INFO within the list of
1847 PAL procedures.
1848
1849 @param InfoRequest Unsigned 64-bit integer denoting what
1850 register information is requested. See
1851 PAL_REGISTER_INFO.InfoRequest above.
1852
1853 @return R9 Number of physical stacked general registers.
1854
1855 @return R10 RSE hints supported by processor.
1856
1857 @return Status 0 - Call completed without error
1858
1859 @return Status -2 - Invalid argument
1860
1861 @return Status -3 - Call completed with error.
1862
1863
1864 **/
1865 #define PAL_RSE_INFO 19
1866
1867 /**
1868
1869 @param VersionOfPalB Is a 16-bit binary coded decimal (BCD)
1870 number that provides identification
1871 information about the PAL_B firmware.
1872
1873 @param PalVendor Is an unsigned 8-bit integer indicating the
1874 vendor of the PAL code.
1875
1876 @param VersionOfPalB Is a 16-bit binary coded decimal (BCD)
1877 number that provides identification
1878 information about the PAL_A firmware. In
1879 the split PAL_A model, this return value
1880 is the version number of the
1881 processor-specific PAL_A. The generic
1882 PAL_A version is not returned by this
1883 procedure in the split PAL_A model.
1884
1885 **/
1886 typedef struct {
1887 UINT64 VersionOfPalB:16;
1888 UINT64 Reserved1:8;
1889 UINT64 PalVendor:8;
1890 UINT64 VersionOfPalA:16;
1891 UINT64 Reserved2:16;
1892 } PAL_VERSION_INFO;
1893
1894 /**
1895
1896 PAL Procedure - PAL_VERSION.
1897
1898 Return version of PAL code. It is required by IPF. The PAL
1899 procedure supports the Static Registers calling convention. It
1900 could be called at physical mode and virtual mode.
1901
1902 @param Index Index of PAL_VERSION within the list of
1903 PAL procedures.
1904
1905 @param InfoRequest Unsigned 64-bit integer denoting what
1906 register information is requested. See
1907 PAL_REGISTER_INFO.InfoRequest above.
1908
1909 @return R9 8-byte formatted value returning the minimum PAL
1910 version needed for proper operation of the
1911 processor. See PAL_VERSION_INFO above.
1912
1913 @return R10 8-byte formatted value returning the current PAL
1914 version running on the processor. See
1915 PAL_VERSION_INFO above.
1916
1917 @return Status 0 - Call completed without error
1918
1919 @return Status -2 - Invalid argument
1920
1921 @return Status -3 - Call completed with error.
1922
1923
1924 **/
1925 #define PAL_VERSION 20
1926
1927
1928
1929 //
1930 // Vectors of PAL_MC_CLEAR_LOG.pending
1931 //
1932 #define PAL_MC_PENDING BIT0
1933 #define PAL_INIT_PENDING BIT1
1934
1935 /**
1936
1937 PAL Procedure - PAL_MC_CLEAR_LOG.
1938
1939 Clear all error information from processor error logging
1940 registers. It is required by IPF. The PAL procedure supports
1941 the Static Registers calling convention. It could be called at
1942 physical mode and virtual mode.
1943
1944 @param Index Index of PAL_MC_CLEAR_LOG within the list of
1945 PAL procedures.
1946
1947
1948 @return R9 64-bit vector denoting whether an event is
1949 pending. See PAL_MC_CLEAR_LOG.pending above.
1950
1951
1952 @return Status 0 - Call completed without error
1953
1954 @return Status -2 - Invalid argument
1955
1956 @return Status -3 - Call completed with error.
1957
1958
1959 **/
1960 #define PAL_MC_CLEAR_LOG 21
1961
1962 /**
1963
1964 PAL Procedure - PAL_MC_DRAIN.
1965
1966 Ensure that all operations that could cause an MCA have
1967 completed. It is required by IPF. The PAL procedure supports
1968 the Static Registers calling convention. It could be called at
1969 physical mode and virtual mode.
1970
1971 @param Index Index of PAL_MC_DRAIN within the list of PAL
1972 procedures.
1973
1974
1975 @return Status 0 - Call completed without error
1976
1977 @return Status -2 - Invalid argument
1978
1979 @return Status -3 - Call completed with error.
1980
1981
1982 **/
1983 #define PAL_MC_DRAIN 22
1984
1985
1986 /**
1987
1988 PAL Procedure - PAL_MC_DYNAMIC_STATE.
1989
1990 Return Processor Dynamic State for logging by SAL. It is
1991 optional. The PAL procedure supports the Static Registers
1992 calling convention. It could be called at physical mode.
1993
1994 @param Index Index of PAL_MC_DYNAMIC_STATE within the list of PAL
1995 procedures.
1996
1997 @param Offset Offset of the next 8 bytes of Dynamic Processor
1998 State to return. (multiple of 8).
1999
2000 @return R9 Unsigned 64-bit integer denoting bytes of Dynamic
2001 Processor State returned.
2002
2003 @return R10 Next 8 bytes of Dynamic Processor State.
2004
2005 @return Status 0 - Call completed without error
2006
2007 @return Status -1 - Unimplemented procedure.
2008
2009 @return Status -2 - Invalid argument
2010
2011 @return Status -3 - Call completed with error.
2012
2013
2014 **/
2015 #define PAL_MC_DYNAMIC_STATE 24
2016
2017
2018
2019 //
2020 // Values of PAL_MC_ERROR_INFO.InfoIndex.
2021 //
2022 #define PAL_PROCESSOR_ERROR_MAP 0
2023 #define PAL_PROCESSOR_STATE_PARAM 1
2024 #define PAL_STRUCTURE_SPECIFIC_ERROR 2
2025
2026 /**
2027
2028 @param CoreId Bit3:0, Processor core ID (default is 0 for
2029 processors with a single core)
2030
2031 @param ThreadId Bit7:4, Logical thread ID (default is 0 for
2032 processors that execute a single thread)
2033
2034 @param InfoOfInsCache Bit11:8, Error information is
2035 available for 1st, 2nd, 3rd, and 4th
2036 level instruction caches.
2037
2038 @param InfoOfDataCache Bit15:12, Error information is
2039 available for 1st, 2nd, 3rd, and 4th
2040 level data/unified caches.
2041
2042 @param InfoOfInsTlb Bit19:16 Error information is available
2043 for 1st, 2nd, 3rd, and 4th level
2044 instruction TLB.
2045
2046 @param InfoOfDataTlb Bit23:20, Error information is available
2047 for 1st, 2nd, 3rd, and 4th level
2048 data/unified TLB
2049
2050 @param InfoOfProcessorBus Bit27:24 Error information is
2051 available for the 1st, 2nd, 3rd,
2052 and 4th level processor bus
2053 hierarchy.
2054
2055 @param InfoOfRegisterFile Bit31:28 Error information is
2056 available on register file
2057 structures.
2058
2059 @param InfoOfMicroArch Bit47:32, Error information is
2060 available on micro-architectural
2061 structures.
2062
2063 **/
2064 typedef struct {
2065 UINT64 CoreId:4;
2066 UINT64 ThreadId:4;
2067 UINT64 InfoOfInsCache:4;
2068 UINT64 InfoOfDataCache:4;
2069 UINT64 InfoOfInsTlb:4;
2070 UINT64 InfoOfDataTlb:4;
2071 UINT64 InfoOfProcessorBus:4;
2072 UINT64 InfoOfRegisterFile:4;
2073 UINT64 InfoOfMicroArch:4;
2074 UINT64 Reserved:16;
2075 } PAL_MC_ERROR_INFO_LEVEL_INDEX;
2076
2077 //
2078 // Value of PAL_MC_ERROR_INFO.ErrorTypeIndex
2079 //
2080 #define PAL_ERR_INFO_BY_LEVEL_INDEX 0
2081 #define PAL_ERR_INFO_TARGET_ADDRESS 1
2082 #define PAL_ERR_INFO_REQUESTER_IDENTIFIER 2
2083 #define PAL_ERR_INFO_REPONSER_INDENTIFIER 3
2084 #define PAL_ERR_INFO_PRECISE_INSTRUCTION_POINTER 4
2085
2086 /**
2087
2088 @param Operation Bit3:0, Type of cache operation that caused
2089 the machine check: 0 - unknown or internal
2090 error 1 - load 2 - store 3 - instruction
2091 fetch or instruction prefetch 4 - data
2092 prefetch (both hardware and software) 5 -
2093 snoop (coherency check) 6 - cast out
2094 (explicit or implicit write-back of a cache
2095 line) 7 - move in (cache line fill)
2096
2097 @param FailedCacheLevel Bit5:4 Level of cache where the
2098 error occurred. A value of 0
2099 indicates the first level of cache.
2100
2101 @param FailedInDataPart Bit8, Failure located in the data
2102 part of the cache line.
2103
2104 @param FailedInTagPart Bit9, Failure located in the tag part
2105 of the cache line.
2106
2107 @param FailedInDataCache Bit10, Failure located in the data
2108 cache
2109
2110 @param FailedInInsCache Bit11, Failure located in the
2111 instruction cache.
2112
2113
2114 @param Mesi Bit14:12, 0 - cache line is invalid. 1 - cache
2115 line is held shared. 2 - cache line is held
2116 exclusive. 3 - cache line is modified. All other
2117 values are reserved.
2118
2119 @param MesiIsValid Bit15, The mesi field in the cache_check
2120 parameter is valid.
2121
2122 @param FailedWay Bit20:16, Failure located in the way of
2123 the cache indicated by this value.
2124
2125 @param WayIndexIsValid Bit21, The way and index field in the
2126 cache_check parameter is valid.
2127
2128 @param MultipleBitsError Bit23, A multiple-bit error was
2129 detected, and data was poisoned for
2130 the corresponding cache line during
2131 castout.
2132
2133 @param IndexOfCacheLineError Bit51:32, Index of the cache
2134 line where the error occurred.
2135
2136 @param InstructionSet Bit54, Instruction set. If this value
2137 is set to zero, the instruction that
2138 generated the machine check was an
2139 Intel Itanium instruction. If this bit
2140 is set to one, the instruction that
2141 generated the machine check was IA-32
2142 instruction.
2143
2144 @param InstructionSetIsValid Bit55, The is field in the
2145 cache_check parameter is valid.
2146
2147 @param PrivilegeLevel Bit57:56, Privilege level. The
2148 privilege level of the instruction
2149 bundle responsible for generating the
2150 machine check.
2151
2152 @param PrivilegeLevelIsValide Bit58, The pl field of the
2153 cache_check parameter is
2154 valid.
2155
2156 @param McCorrected Bit59, Machine check corrected: This bit
2157 is set to one to indicate that the machine
2158 check has been corrected.
2159
2160 @param TargetAddressIsValid Bit60, Target address is valid:
2161 This bit is set to one to
2162 indicate that a valid target
2163 address has been logged.
2164
2165 @param RequesterIdentifier Bit61, Requester identifier: This
2166 bit is set to one to indicate that
2167 a valid requester identifier has
2168 been logged.
2169
2170 @param ResponserIdentifier Bit62, Responder identifier: This
2171 bit is set to one to indicate that
2172 a valid responder identifier has
2173 been logged.
2174
2175 @param PreciseInsPointer Bit63, Precise instruction pointer.
2176 This bit is set to one to indicate
2177 that a valid precise instruction
2178 pointer has been logged.
2179
2180 **/
2181 typedef struct {
2182 UINT64 Operation:4;
2183 UINT64 FailedCacheLevel:2;
2184 UINT64 Reserved1:2;
2185 UINT64 FailedInDataPart:1;
2186 UINT64 FailedInTagPart:1;
2187 UINT64 FailedInDataCache:1;
2188 UINT64 FailedInInsCache:1;
2189 UINT64 Mesi:3;
2190 UINT64 MesiIsValid:1;
2191 UINT64 FailedWay:5;
2192 UINT64 WayIndexIsValid:1;
2193
2194 UINT64 Reserved2:1;
2195 UINT64 MultipleBitsError:1;
2196 UINT64 Reserved3:8;
2197 UINT64 IndexOfCacheLineError:20;
2198 UINT64 Reserved4:2;
2199 UINT64 InstructionSet:1;
2200 UINT64 InstructionSetIsValid:1;
2201
2202 UINT64 PrivilegeLevel:2;
2203 UINT64 PrivilegeLevelIsValide:1;
2204
2205 UINT64 McCorrected:1;
2206
2207 UINT64 TargetAddressIsValid:1;
2208 UINT64 RequesterIdentifier:1;
2209 UINT64 ResponserIdentifier:1;
2210 UINT64 PreciseInsPointer:1;
2211
2212 } PAL_CACHE_CHECK_INFO;
2213
2214 /**
2215
2216 @param FailedSlot Bit7:0, Slot number of the translation
2217 register where the failure occurred.
2218
2219 @param FailedSlotIsValid Bit8, The tr_slot field in the
2220 TLB_check parameter is valid.
2221
2222 @param TlbLevel Bit11:10, The level of the TLB where the
2223 error occurred. A value of 0 indicates the
2224 first level of TLB
2225
2226 @param FailedInDataTr Bit16, Error occurred in the data
2227 translation registers.
2228
2229 @param FailedInInsTr Bit17, Error occurred in the instruction
2230 translation registers
2231
2232 @param FailedInDataTc Bit18, Error occurred in data
2233 translation cache.
2234
2235 @param FailedInInsTc Bit19, Error occurred in the instruction
2236 translation cache.
2237
2238 @param FailedOperation Bit23:20, Type of cache operation that
2239 caused the machine check: 0 - unknown
2240 1 - TLB access due to load instruction
2241 2 - TLB access due to store
2242 instruction 3 - TLB access due to
2243 instruction fetch or instruction
2244 prefetch 4 - TLB access due to data
2245 prefetch (both hardware and software)
2246 5 - TLB shoot down access 6 - TLB
2247 probe instruction (probe, tpa) 7 -
2248 move in (VHPT fill) 8 - purge (insert
2249 operation that purges entries or a TLB
2250 purge instruction) All other values
2251 are reserved.
2252
2253 @param InstructionSet Bit54, Instruction set. If this value
2254 is set to zero, the instruction that
2255 generated the machine check was an
2256 Intel Itanium instruction. If this bit
2257 is set to one, the instruction that
2258 generated the machine check was IA-32
2259 instruction.
2260
2261 @param InstructionSetIsValid Bit55, The is field in the
2262 TLB_check parameter is valid.
2263
2264 @param PrivelegeLevel Bit57:56, Privilege level. The
2265 privilege level of the instruction
2266 bundle responsible for generating the
2267 machine check.
2268
2269 @param PrivelegeLevelIsValid Bit58, The pl field of the
2270 TLB_check parameter is valid.
2271
2272 @param McCorrected Bit59, Machine check corrected: This bit
2273 is set to one to indicate that the machine
2274 check has been corrected.
2275
2276 @param TargetAddressIsValid Bit60, Target address is valid:
2277 This bit is set to one to
2278 indicate that a valid target
2279 address has been logged.
2280
2281 @param RequesterIdentifier Bit61 Requester identifier: This
2282 bit is set to one to indicate that
2283 a valid requester identifier has
2284 been logged.
2285
2286 @param ResponserIdentifier Bit62, Responder identifier: This
2287 bit is set to one to indicate that
2288 a valid responder identifier has
2289 been logged.
2290
2291 @param PreciseInsPointer Bit63 Precise instruction pointer.
2292 This bit is set to one to indicate
2293 that a valid precise instruction
2294 pointer has been logged.
2295 **/
2296 typedef struct {
2297 UINT64 FailedSlot:8;
2298 UINT64 FailedSlotIsValid:1;
2299 UINT64 Reserved1 :1;
2300 UINT64 TlbLevel:2;
2301 UINT64 Reserved2 :4;
2302 UINT64 FailedInDataTr:1;
2303 UINT64 FailedInInsTr:1;
2304 UINT64 FailedInDataTc:1;
2305 UINT64 FailedInInsTc:1;
2306 UINT64 FailedOperation:4;
2307 UINT64 Reserved3:30;
2308 UINT64 InstructionSet:1;
2309 UINT64 InstructionSetIsValid:1;
2310 UINT64 PrivelegeLevel:2;
2311 UINT64 PrivelegeLevelIsValid:1;
2312 UINT64 McCorrected:1;
2313 UINT64 TargetAddressIsValid:1;
2314 UINT64 RequesterIdentifier:1;
2315 UINT64 ResponserIdentifier:1;
2316 UINT64 PreciseInsPointer:1;
2317 } PAL_TLB_CHECK_INFO;
2318
2319 /**
2320
2321 PAL Procedure - PAL_MC_ERROR_INFO.
2322
2323 Return Processor Machine Check Information and Processor
2324 Static State for logging by SAL. It is required by IPF. The
2325 PAL procedure supports the Static Registers calling
2326 convention. It could be called at physical and virtual mode.
2327
2328 @param Index Index of PAL_MC_ERROR_INFO within the list of PAL
2329 procedures.
2330
2331 @param InfoIndex Unsigned 64-bit integer identifying the
2332 error information that is being requested.
2333 See PAL_MC_ERROR_INFO.InfoIndex.
2334
2335 @param LevelIndex 8-byte formatted value identifying the
2336 structure to return error information
2337 on. See PAL_MC_ERROR_INFO_LEVEL_INDEX.
2338
2339 @param ErrorTypeIndex Unsigned 64-bit integer denoting the
2340 type of error information that is
2341 being requested for the structure
2342 identified in LevelIndex.
2343
2344
2345 @return R9 Error information returned. The format of this
2346 value is dependant on the input values passed.
2347
2348 @return R10 If this value is zero, all the error information
2349 specified by err_type_index has been returned. If
2350 this value is one, more structure-specific error
2351 information is available and the caller needs to
2352 make this procedure call again with level_index
2353 unchanged and err_type_index, incremented.
2354
2355
2356 @return Status 0 - Call completed without error
2357
2358 @return Status -2 - Invalid argument
2359
2360 @return Status -3 - Call completed with error.
2361
2362 @return Status -6 - Argument was valid, but no error
2363 information was available
2364
2365
2366 **/
2367 #define PAL_MC_ERROR_INFO 25
2368
2369 /**
2370
2371 PAL Procedure - PAL_MC_EXPECTED.
2372
2373 Set/Reset Expected Machine Check Indicator. It is required by
2374 IPF. The PAL procedure supports the Static Registers calling
2375 convention. It could be called at physical mode.
2376
2377 @param Index Index of PAL_MC_EXPECTED within the list of PAL
2378 procedures.
2379
2380 @param Expected Unsigned integer with a value of 0 or 1 to
2381 set or reset the hardware resource
2382 PALE_CHECK examines for expected machine
2383 checks.
2384
2385
2386 @return R9 Unsigned integer denoting whether a machine check
2387 was previously expected.
2388
2389
2390 @return Status 0 - Call completed without error
2391
2392 @return Status -2 - Invalid argument
2393
2394 @return Status -3 - Call completed with error.
2395
2396 **/
2397 #define PAL_MC_EXPECTED 23
2398
2399 /**
2400
2401 PAL Procedure - PAL_MC_REGISTER_MEM.
2402
2403 Register min-state save area with PAL for machine checks and
2404 inits. It is required by IPF. The PAL procedure supports the
2405 Static Registers calling convention. It could be called at
2406 physical mode.
2407
2408 @param Index Index of PAL_MC_REGISTER_MEM within the list of PAL
2409 procedures.
2410
2411 @param Address Physical address of the buffer to be
2412 registered with PAL.
2413
2414
2415
2416 @return Status 0 - Call completed without error
2417
2418 @return Status -2 - Invalid argument
2419
2420 @return Status -3 - Call completed with error.
2421
2422 **/
2423 #define PAL_MC_REGISTER_MEM 27
2424
2425 /**
2426
2427 PAL Procedure - PAL_MC_RESUME.
2428
2429 Restore minimal architected state and return to interrupted
2430 process. It is required by IPF. The PAL procedure supports the
2431 Static Registers calling convention. It could be called at
2432 physical mode.
2433
2434 @param Index Index of PAL_MC_RESUME within the list of PAL
2435 procedures.
2436
2437 @param SetCmci Unsigned 64 bit integer denoting whether to
2438 set the CMC interrupt. A value of 0 indicates
2439 not to set the interrupt, a value of 1
2440 indicated to set the interrupt, and all other
2441 values are reserved.
2442
2443 @param SavePtr Physical address of min-state save area used
2444 to used to restore processor state.
2445
2446 @param NewContext Unsigned 64-bit integer denoting whether
2447 the caller is returning to a new context.
2448 A value of 0 indicates the caller is
2449 returning to the interrupted context, a
2450 value of 1 indicates that the caller is
2451 returning to a new context.
2452
2453
2454
2455 @return Status -2 - Invalid argument
2456
2457 @return Status -3 - Call completed with error.
2458
2459 **/
2460 #define PAL_MC_RESUME 26
2461
2462 /**
2463
2464 PAL Procedure - PAL_HALT.
2465
2466 Enter the low-power HALT state or an implementation-dependent
2467 low-power state. It is optinal. The PAL procedure supports the
2468 Static Registers calling convention. It could be called at
2469 physical mode.
2470
2471 @param Index Index of PAL_HALT within the list of PAL
2472 procedures.
2473
2474 @param HaltState Unsigned 64-bit integer denoting low power
2475 state requested.
2476
2477 @param IoDetailPtr 8-byte aligned physical address pointer to
2478 information on the type of I/O
2479 (load/store) requested.
2480
2481
2482 @return R9 Value returned if a load instruction is requested
2483 in the io_detail_ptr
2484
2485
2486 @return Status 0 - Call completed without error
2487
2488 @return Status -1 - Unimplemented procedure
2489
2490 @return Status -2 - Invalid argument
2491
2492 @return Status -3 - Call completed with error.
2493
2494 **/
2495 #define PAL_HALT 28
2496
2497
2498 /**
2499
2500 PAL Procedure - PAL_HALT_INFO.
2501
2502 Return the low power capabilities of the processor. It is
2503 required by IPF. The PAL procedure supports the
2504 Stacked Registers calling convention. It could be called at
2505 physical and virtual mode.
2506
2507 @param Index Index of PAL_HALT_INFO within the list of PAL
2508 procedures.
2509
2510 @param PowerBuffer 64-bit pointer to a 64-byte buffer aligned
2511 on an 8-byte boundary.
2512
2513
2514
2515 @return Status 0 - Call completed without error
2516
2517 @return Status -2 - Invalid argument
2518
2519 @return Status -3 - Call completed with error.
2520
2521 **/
2522 #define PAL_HALT_INFO 257
2523
2524
2525 /**
2526
2527 PAL Procedure - PAL_HALT_LIGHT.
2528
2529 Enter the low power LIGHT HALT state. It is required by
2530 IPF. The PAL procedure supports the Static Registers calling
2531 convention. It could be called at physical and virtual mode.
2532
2533 @param Index Index of PAL_HALT_LIGHT within the list of PAL
2534 procedures.
2535
2536
2537 @return Status 0 - Call completed without error
2538
2539 @return Status -2 - Invalid argument
2540
2541 @return Status -3 - Call completed with error.
2542
2543 **/
2544 #define PAL_HALT_LIGHT 29
2545
2546 /**
2547
2548 PAL Procedure - PAL_CACHE_LINE_INIT.
2549
2550 Initialize tags and data of a cache line for processor
2551 testing. It is required by IPF. The PAL procedure supports the
2552 Static Registers calling convention. It could be called at
2553 physical and virtual mode.
2554
2555 @param Index Index of PAL_CACHE_LINE_INIT within the list of PAL
2556 procedures.
2557
2558 @param Address Unsigned 64-bit integer value denoting the
2559 physical address from which the physical page
2560 number is to be generated. The address must be
2561 an implemented physical address, bit 63 must
2562 be zero.
2563
2564 @param DataValue 64-bit data value which is used to
2565 initialize the cache line.
2566
2567
2568 @return Status 0 - Call completed without error
2569
2570 @return Status -2 - Invalid argument
2571
2572 @return Status -3 - Call completed with error.
2573
2574 **/
2575 #define PAL_CACHE_LINE_INIT 31
2576
2577 /**
2578
2579 PAL Procedure - PAL_CACHE_READ.
2580
2581 Read tag and data of a cache line for diagnostic testing. It
2582 is optional. The PAL procedure supports the
2583 Satcked Registers calling convention. It could be called at
2584 physical mode.
2585
2586 @param Index Index of PAL_CACHE_READ within the list of PAL
2587 procedures.
2588
2589 @param LineId 8-byte formatted value describing where in the
2590 cache to read the data.
2591
2592 @param Address 64-bit 8-byte aligned physical address from
2593 which to read the data. The address must be an
2594 implemented physical address on the processor
2595 model with bit 63 set to zero.
2596
2597 @return R9 Right-justified value returned from the cache
2598 line.
2599
2600 @return R10 The number of bits returned in data.
2601
2602 @return R11 The status of the cache line.
2603
2604
2605
2606 @return Status 1 - The word at address was found in the
2607 cache, but the line was invalid.
2608
2609 @return Status 0 - Call completed without error
2610
2611 @return Status -2 - Invalid argument
2612
2613 @return Status -3 - Call completed with error.
2614
2615 @return Status -5 - The word at address was not found in the
2616 cache.
2617
2618 @return Status -7 - The operation requested is not supported
2619 for this cache_type and level.
2620
2621 **/
2622 #define PAL_CACHE_READ 259
2623
2624
2625 /**
2626
2627 Write tag and data of a cache for diagnostic testing. It is
2628 optional. The PAL procedure supports the Satcked Registers
2629 calling convention. It could be called at physical mode.
2630
2631 @param Index Index of PAL_CACHE_WRITE within the list of PAL
2632 procedures.
2633
2634 @param LineId 8-byte formatted value describing where in the
2635 cache to write the data.
2636
2637 @param Address 64-bit 8-byte aligned physical address at
2638 which the data should be written. The address
2639 must be an implemented physical address on the
2640 processor model with bit 63 set to 0.
2641
2642 @param Data Unsigned 64-bit integer value to write into
2643 the specified part of the cache.
2644
2645
2646 @return Status 0 - Call completed without error
2647
2648 @return Status -2 - Invalid argument
2649
2650 @return Status -3 - Call completed with error.
2651
2652
2653 @return Status -7 - The operation requested is not supported
2654 for this cache_type and level.
2655
2656 **/
2657 #define PAL_CACHE_WRITE 260
2658
2659 /**
2660
2661 PAL Procedure - PAL_TEST_INFO.
2662
2663 Returns alignment and size requirements needed for the memory
2664 buffer passed to the PAL_TEST_PROC procedure as well as
2665 information on self-test control words for the processor self
2666 tests. It is required by IPF. The PAL procedure supports the
2667 Static Registers calling convention. It could be called at
2668 physical mode.
2669
2670 @param Index Index of PAL_TEST_INFO within the list of PAL
2671 procedures.
2672
2673 @param TestPhase Unsigned integer that specifies which phase
2674 of the processor self-test information is
2675 being requested on. A value of 0 indicates
2676 the phase two of the processor self-test and
2677 a value of 1 indicates phase one of the
2678 processor self-test. All other values are
2679 reserved.
2680
2681 @return R9 Unsigned 64-bit integer denoting the number of
2682 bytes of main memory needed to perform the second
2683 phase of processor self-test.
2684
2685 @return R10 Unsigned 64-bit integer denoting the alignment
2686 required for the memory buffer.
2687
2688 @return R11 48-bit wide bit-field indicating if control of
2689 the processor self-tests is supported and which
2690 bits of the test_control field are defined for
2691 use.
2692
2693
2694 @return Status 0 - Call completed without error
2695
2696 @return Status -2 - Invalid argument
2697
2698 @return Status -3 - Call completed with error.
2699
2700
2701 **/
2702 #define PAL_TEST_INFO 37
2703
2704 /**
2705
2706 @param BufferSize Indicates the size in bytes of the memory
2707 buffer that is passed to this procedure.
2708 BufferSize must be greater than or equal in
2709 size to the bytes_needed return value from
2710 PAL_TEST_INFO, otherwise this procedure will
2711 return with an invalid argument return
2712 value.
2713
2714 @param TestPhase Defines which phase of the processor
2715 self-tests are requested to be run. A value
2716 of zero indicates to run phase two of the
2717 processor self-tests. Phase two of the
2718 processor self-tests are ones that require
2719 external memory to execute correctly. A
2720 value of one indicates to run phase one of
2721 the processor self-tests. Phase one of the
2722 processor self-tests are tests run during
2723 PALE_RESET and do not depend on external
2724 memory to run correctly. When the caller
2725 requests to have phase one of the processor
2726 self-test run via this procedure call, a
2727 memory buffer may be needed to save and
2728 restore state as required by the PAL calling
2729 conventions. The procedure PAL_TEST_INFO
2730 informs the caller about the requirements of
2731 the memory buffer.
2732
2733 **/
2734 typedef struct {
2735 UINT64 BufferSize:56;
2736 UINT64 TestPhase:8;
2737 } PAL_TEST_INFO_INFO;
2738
2739 /**
2740
2741 @param TestControl This is an ordered implementation-specific
2742 control word that allows the user control
2743 over the length and runtime of the
2744 processor self-tests. This control word is
2745 ordered from the longest running tests up
2746 to the shortest running tests with bit 0
2747 controlling the longest running test. PAL
2748 may not implement all 47-bits of the
2749 test_control word. PAL communicates if a
2750 bit provides control by placing a zero in
2751 that bit. If a bit provides no control,
2752 PAL will place a one in it. PAL will have
2753 two sets of test_control bits for the two
2754 phases of the processor self-test. PAL
2755 provides information about implemented
2756 test_control bits at the hand-off from PAL
2757 to SAL for the firmware recovery check.
2758 These test_control bits provide control
2759 for phase one of processor self-test. It
2760 also provides this information via the PAL
2761 procedure call PAL_TEST_INFO for both the
2762 phase one and phase two processor tests
2763 depending on which information the caller
2764 is requesting. PAL interprets these bits
2765 as input parameters on two occasions. The
2766 first time is when SAL passes control back
2767 to PAL after the firmware recovery check.
2768 The second time is when a call to
2769 PAL_TEST_PROC is made. When PAL interprets
2770 these bits it will only interpret
2771 implemented test_control bits and will
2772 ignore the values located in the
2773 unimplemented test_control bits. PAL
2774 interprets the implemented bits such that
2775 if a bit contains a zero, this indicates
2776 to run the test. If a bit contains a one,
2777 this indicates to PAL to skip the test. If
2778 the cs bit indicates that control is not
2779 available, the test_control bits will be
2780 ignored or generate an illegal argument in
2781 procedure calls if the caller sets these
2782 bits.
2783
2784 @param ControlSupport This bit defines if an implementation
2785 supports control of the PAL self-tests
2786 via the self-test control word. If
2787 this bit is 0, the implementation does
2788 not support control of the processor
2789 self-tests via the self-test control
2790 word. If this bit is 1, the
2791 implementation does support control of
2792 the processor self-tests via the
2793 self-test control word. If control is
2794 not supported, GR37 will be ignored at
2795 the hand-off between SAL and PAL after
2796 the firmware recovery check and the
2797 PAL procedures related to the
2798 processor self-tests may return
2799 illegal arguments if a user tries to
2800 use the self-test control features.
2801
2802 **/
2803 typedef struct {
2804 UINT64 TestControl:47;
2805 UINT64 ControlSupport:1;
2806 UINT64 Reserved:16;
2807 } PAL_SELF_TEST_CONTROL;
2808
2809 /**
2810
2811 @param Attributes Specifies the memory attributes that are
2812 allowed to be used with the memory buffer
2813 passed to this procedure. The attributes
2814 parameter is a vector where each bit
2815 represents one of the virtual memory
2816 attributes defined by the architecture.See
2817 MEMORY_AATRIBUTES. The caller is required
2818 to support the cacheable attribute for the
2819 memory buffer, otherwise an invalid
2820 argument will be returned.
2821
2822
2823 @param TestControl Is the self-test control word
2824 corresponding to the test_phase passed.
2825 This test_control directs the coverage and
2826 runtime of the processor self-tests
2827 specified by the test_phase input
2828 argument. Information on if this
2829 feature is implemented and the number of
2830 bits supported can be obtained by the
2831 PAL_TEST_INFO procedure call. If this
2832 feature is implemented by the processor,
2833 the caller can selectively skip parts of
2834 the processor self-test by setting
2835 test_control bits to a one. If a bit has a
2836 zero, this test will be run. The values in
2837 the unimplemented bits are ignored. If
2838 PAL_TEST_INFO indicated that the self-test
2839 control word is not implemented, this
2840 procedure will return with an invalid
2841 argument status if the caller sets any of
2842 the test_control bits. See
2843 PAL_SELF_TEST_CONTROL.
2844 **/
2845 typedef struct {
2846 UINT64 Attributes:8;
2847 UINT64 Reserved:8;
2848 UINT64 TestControl:48;
2849 } PAL_TEST_CONTROL;
2850
2851 /**
2852
2853 PAL Procedure - PAL_TEST_PROC.
2854
2855 Perform late processor self test. It is required by IPF. The
2856 PAL procedure supports the Static Registers calling
2857 convention. It could be called at physical mode.
2858
2859 @param Index Index of PAL_TEST_PROC within the list of PAL
2860 procedures.
2861
2862 @param TestAddress 64-bit physical address of main memory
2863 area to be used by processor self-test.
2864 The memory region passed must be
2865 cacheable, bit 63 must be zero.
2866
2867 @param TestInfo Input argument specifying the size of the
2868 memory buffer passed and the phase of the
2869 processor self-test that should be run. See
2870 PAL_TEST_INFO.
2871
2872 @param TestParam Input argument specifying the self-test
2873 control word and the allowable memory
2874 attributes that can be used with the memory
2875 buffer. See PAL_TEST_CONTROL.
2876
2877 @return R9 Formatted 8-byte value denoting the state of the
2878 processor after self-test
2879
2880
2881
2882 @return Status 1 - Call completed without error, but hardware
2883 failures occurred during self-test.
2884
2885 @return Status 0 - Call completed without error
2886
2887 @return Status -2 - Invalid argument
2888
2889 @return Status -3 - Call completed with error.
2890
2891
2892 **/
2893 #define PAL_TEST_PROC 258
2894
2895 /**
2896
2897 @param NumberOfInterruptControllers Number of interrupt
2898 controllers currently
2899 enabled on the system.
2900
2901 @param NumberOfProcessors Number of processors currently
2902 enabled on the system.
2903
2904 **/
2905 typedef struct {
2906 UINT32 NumberOfInterruptControllers;
2907 UINT32 NumberOfProcessors;
2908 } PAL_PLATFORM_INFO;
2909
2910 /**
2911
2912 PAL Procedure - PAL_COPY_INFO.
2913
2914 Return information needed to relocate PAL procedures and PAL
2915 PMI code to memory. It is required by IPF. The PAL procedure
2916 supports the Static Registers calling convention. It could be
2917 called at physical mode.
2918
2919 @param Index Index of PAL_COPY_INFO within the list of PAL
2920 procedures.
2921
2922 @param CopyType Unsigned integer denoting type of procedures
2923 for which copy information is requested.
2924
2925 @param PlatformInfo 8-byte formatted value describing the
2926 number of processors and the number of
2927 interrupt controllers currently enabled
2928 on the system. See PAL_PLATFORM_INFO.
2929
2930
2931 @param McaProcStateInfo Unsigned integer denoting the number
2932 of bytes that SAL needs for the
2933 min-state save area for each
2934 processor.
2935
2936
2937
2938 @return R9 Unsigned integer denoting the number of bytes of
2939 PAL information that must be copied to main
2940 memory.
2941
2942 @return R10 Unsigned integer denoting the starting alignment
2943 of the data to be copied.
2944
2945 @return Status 0 - Call completed without error
2946
2947 @return Status -2 - Invalid argument
2948
2949 @return Status -3 - Call completed with error.
2950
2951
2952 **/
2953 #define PAL_COPY_INFO 30
2954
2955 /**
2956
2957 PAL Procedure - PAL_COPY_PAL.
2958
2959 Relocate PAL procedures and PAL PMI code to memory. It is
2960 required by IPF. The PAL procedure supports the Stacked
2961 Registers calling convention. It could be called at physical
2962 mode.
2963
2964 @param Index Index of PAL_COPY_PAL within the list of PAL
2965 procedures.
2966
2967 @param TargetAddress Physical address of a memory buffer to
2968 copy relocatable PAL procedures and PAL
2969 PMI code.
2970
2971 @param AllocSize Unsigned integer denoting the size of the
2972 buffer passed by SAL for the copy operation.
2973
2974
2975 @param CopyOption Unsigned integer indicating whether
2976 relocatable PAL code and PAL PMI code
2977 should be copied from firmware address
2978 space to main memory.
2979
2980
2981 @return R9 Unsigned integer denoting the offset of PAL_PROC
2982 in the relocatable segment copied.
2983
2984 @return Status 0 - Call completed without error
2985
2986 @return Status -2 - Invalid argument
2987
2988 @return Status -3 - Call completed with error.
2989
2990
2991 **/
2992 #define PAL_COPY_PAL 256
2993
2994 /**
2995
2996 PAL Procedure - PAL_ENTER_IA_32_ENV.
2997
2998 Enter IA-32 System environment. It is optional. The PAL
2999 procedure supports the Static Registers calling convention.
3000 It could be called at physical mode.
3001
3002 Note: Since this is a special call, it does not follow the PAL
3003 static register calling convention. GR28 contains the index of
3004 PAL_ENTER_IA_32_ENV within the list of PAL procedures. All other
3005 input arguments including GR29-GR31 are setup by SAL to values
3006 as required by the IA-32 operating system defined in Table
3007 11-67. The registers that are designated as preserved, scratch,
3008 input arguments and procedure return values by the static
3009 procedure calling convention are not followed by this call. For
3010 instance, GR5 and GR6 need not be preserved since these are
3011 regarded as scratch by the IA-32 operating system. Note: In an
3012 MP system, this call must be COMPLETED on the first CPU to enter
3013 the IA-32 System Environment (may or may not be the BSP) prior
3014 to being called on the remaining processors in the MP system.
3015
3016 @param Index GR28 contains the index of the
3017 PAL_ENTER_IA_32_ENV call within the list of PAL
3018 procedures.
3019
3020
3021 @return Status The status is returned in GR4.
3022 -1 - Un-implemented procedure 0 JMPE detected
3023 at privilege level
3024
3025 0 - 1 SAL allocated buffer for IA-32 System
3026 Environment operation is too small
3027
3028 2 - IA-32 Firmware Checksum Error
3029
3030 3 - SAL allocated buffer for IA-32 System
3031 Environment operation is not properly aligned
3032
3033 4 - Error in SAL MP Info Table
3034
3035 5 - Error in SAL Memory Descriptor Table
3036
3037 6 - Error in SAL System Table
3038
3039 7 - Inconsistent IA-32 state
3040
3041 8 - IA-32 Firmware Internal Error
3042
3043 9 - IA-32 Soft Reset (Note: remaining register
3044 state is undefined for this termination
3045 reason)
3046
3047 10 - Machine Check Error
3048
3049 11 - Error in SAL I/O Intercept Table
3050
3051 12 - Processor exit due to other processor in
3052 MP system terminating the IA32 system
3053 environment. (Note: remaining register state
3054 is undefined for this termination reason.)
3055
3056 13 - Itanium architecture-based state
3057 corruption by either SAL PMI handler or I/O
3058 Intercept callback function.
3059
3060
3061 **/
3062 #define PAL_ENTER_IA_32_ENV 33
3063
3064 /**
3065
3066 PAL Procedure - PAL_PMI_ENTRYPOINT.
3067
3068 Register PMI memory entrypoints with processor. It is required
3069 by IPF. The PAL procedure supports the Stacked Registers
3070 calling convention. It could be called at physical mode.
3071
3072 @param Index Index of PAL_PMI_ENTRYPOINT within the list of
3073 PAL procedures.
3074
3075 @param SalPmiEntry 256-byte aligned physical address of SAL
3076 PMI entrypoint in memory.
3077
3078
3079 @return Status 0 - Call completed without error
3080
3081 @return Status -2 - Invalid argument
3082
3083 @return Status -3 - Call completed with error.
3084
3085
3086 **/
3087 #define PAL_PMI_ENTRYPOINT 32
3088
3089
3090 /**
3091
3092 The ASCII brand identification string will be copied to the
3093 address specified in the address input argument. The processor
3094 brand identification string is defined to be a maximum of 128
3095 characters long; 127 bytes will contain characters and the 128th
3096 byte is defined to be NULL (0). A processor may return less than
3097 the 127 ASCII characters as long as the string is null
3098 terminated. The string length will be placed in the brand_info
3099 return argument.
3100
3101 **/
3102 #define PAL_BRAND_INFO_ID_REQUEST 0
3103
3104 /**
3105
3106 PAL Procedure - PAL_BRAND_INFO.
3107
3108 Provides processor branding information. It is optional by
3109 IPF. The PAL procedure supports the Stacked Registers calling
3110 convention. It could be called at physical and Virtual mode.
3111
3112
3113 @param Index Index of PAL_BRAND_INFO within the list of PAL
3114 procedures.
3115
3116 @param InfoRequest Unsigned 64-bit integer specifying the
3117 information that is being requested. (See
3118 PAL_BRAND_INFO_ID_REQUEST)
3119
3120 @param Address Unsigned 64-bit integer specifying the
3121 address of the 128-byte block to which the
3122 processor brand string shall be written.
3123
3124
3125 @reture R9 Brand information returned. The format of this
3126 value is dependent on the input values passed.
3127
3128
3129 @return Status 0 - Call completed without error
3130
3131 @return Status -1 - Unimplemented procedure
3132
3133 @return Status -2 - Invalid argument
3134
3135 @return Status -3 - Call completed with error.
3136
3137 @return Status -6 - Input argument is not implemented.
3138
3139 **/
3140 #define PAL_BRAND_INFO 274
3141
3142 /**
3143
3144 PAL Procedure - PAL_GET_HW_POLICY.
3145
3146 Returns the current hardware resource sharing policy of the
3147 processor. It is optional by IPF. The PAL procedure supports
3148 the Static Registers calling convention. It could be called at
3149 physical and Virtual mode.
3150
3151
3152 @param Index Index of PAL_GET_HW_POLICY within the list of PAL
3153 procedures.
3154
3155 @param ProcessorNumber Unsigned 64-bit integer that specifies
3156 for which logical processor
3157 information is being requested. This
3158 input argument must be zero for the
3159 first call to this procedure and can
3160 be a maximum value of one less than
3161 the number of logical processors
3162 impacted by the hardware resource
3163 sharing policy, which is returned by
3164 the R10 return value.
3165
3166
3167 @reture R9 Unsigned 64-bit integer representing the current
3168 hardware resource sharing policy.
3169
3170 @return R10 Unsigned 64-bit integer that returns the number
3171 of logical processors impacted by the policy
3172 input argument.
3173
3174 @return R11 Unsigned 64-bit integer containing the logical
3175 address of one of the logical processors
3176 impacted by policy modification.
3177
3178
3179 @return Status 0 - Call completed without error
3180
3181 @return Status -1 - Unimplemented procedure
3182
3183 @return Status -2 - Invalid argument
3184
3185 @return Status -3 - Call completed with error.
3186
3187 @return Status -9 - Call requires PAL memory buffer.
3188
3189 **/
3190 #define PAL_GET_HW_POLICY 48
3191
3192
3193 //
3194 // Value of PAL_SET_HW_POLICY.Policy
3195 //
3196 #define PAL_SET_HW_POLICY_PERFORMANCE 0
3197 #define PAL_SET_HW_POLICY_FAIRNESS 1
3198 #define PAL_SET_HW_POLICY_HIGH_PRIORITY 2
3199 #define PAL_SET_HW_POLICY_EXCLUSIVE_HIGH_PRIORITY 3
3200
3201 /**
3202
3203 PAL Procedure - PAL_SET_HW_POLICY.
3204
3205 Sets the current hardware resource sharing policy of the
3206 processor. It is optional by IPF. The PAL procedure supports
3207 the Static Registers calling convention. It could be called at
3208 physical and Virtual mode.
3209
3210
3211 @param Index Index of PAL_SET_HW_POLICY within the list of PAL
3212 procedures.
3213
3214 @param Policy Unsigned 64-bit integer specifying the hardware
3215 resource sharing policy the caller is setting.
3216 See Value of PAL_SET_HW_POLICY.Policy above.
3217
3218
3219 @return Status 1 - Call completed successfully but could not
3220 change the hardware policy since a
3221 competing logical processor is set in
3222 exclusive high priority.
3223
3224 @return Status 0 - Call completed without error
3225
3226 @return Status -1 - Unimplemented procedure
3227
3228 @return Status -2 - Invalid argument
3229
3230 @return Status -3 - Call completed with error.
3231
3232 @return Status -9 - Call requires PAL memory buffer.
3233
3234 **/
3235 #define PAL_SET_HW_POLICY 49
3236
3237
3238 /**
3239
3240 @param Mode Bit2:0, Indicates the mode of operation for this
3241 procedure: 0 - Query mode 1 ¨C Error inject mode
3242 (err_inj should also be specified) 2 - Cancel
3243 outstanding trigger. All other fields in
3244 PAL_MC_ERROR_TYPE_INFO,
3245 PAL_MC_ERROR_STRUCTURE_INFO and
3246 PAL_MC_ERROR_DATA_BUFFER are ignored. All other
3247 values are reserved.
3248
3249 @param ErrorInjection Bit5:3, indicates the mode of error
3250 injection: 0 - Error inject only (no
3251 error consumption) 1 - Error inject
3252 and consume All other values are
3253 reserved.
3254
3255
3256 @param ErrorSeverity Bit7:6, indicates the severity desired
3257 for error injection/query. Definitions
3258 of the different error severity types
3259 0 - Corrected error 1 - Recoverable
3260 error 2 - Fatal error 3 - Reserved
3261
3262
3263 @param ErrorStructure Bit12:8, Indicates the structure
3264 identification for error
3265 injection/query: 0 - Any structure
3266 (cannot be used during query mode).
3267 When selected, the structure type used
3268 for error injection is determined by
3269 PAL. 1 - Cache 2 - TLB 3 - Register
3270 file 4 - Bus/System interconnect 5-15
3271 - Reserved 16-31 - Processor
3272 specific error injection
3273 capabilities.ErrorDataBuffer is used
3274 to specify error types. Please refer
3275 to the processor specific
3276 documentation for additional details.
3277
3278 @param StructureHierarchy Bit15:13, Indicates the structure
3279 hierarchy for error
3280 injection/query: 0 - Any level of
3281 hierarchy (cannot be used during
3282 query mode). When selected, the
3283 structure hierarchy used for error
3284 injection is determined by PAL. 1
3285 - Error structure hierarchy
3286 level-1 2 - Error structure
3287 hierarchy level-2 3 - Error
3288 structure hierarchy level-3 4 -
3289 Error structure hierarchy level-4
3290 All other values are reserved.
3291 Reserved 63:16 Reserved
3292
3293 **/
3294 typedef struct {
3295 UINT64 Mode:3;
3296 UINT64 ErrorInjection:3;
3297 UINT64 ErrorSeverity:2;
3298 UINT64 ErrorStructure:5;
3299 UINT64 StructureHierarchy:3;
3300 UINT64 Reserved:48;
3301 } PAL_MC_ERROR_TYPE_INFO;
3302
3303 /**
3304
3305 @param StructInfoIsValid Bit0 When 1, indicates that the
3306 structure information fields
3307 (c_t,cl_p,cl_id) are valid and
3308 should be used for error injection.
3309 When 0, the structure information
3310 fields are ignored, and the values
3311 of these fields used for error
3312 injection are
3313 implementation-specific.
3314
3315 @param CacheType Bit2:1 Indicates which cache should be used
3316 for error injection: 0 - Reserved 1 -
3317 Instruction cache 2 - Data or unified cache
3318 3 - Reserved
3319
3320
3321 @param PortionOfCacheLine Bit5:3 Indicates the portion of the
3322 cache line where the error should
3323 be injected: 0 - Reserved 1 - Tag
3324 2 - Data 3 - mesi All other
3325 values are reserved.
3326
3327 @param Mechanism Bit8:6 Indicates which mechanism is used to
3328 identify the cache line to be used for error
3329 injection: 0 - Reserved 1 - Virtual address
3330 provided in the inj_addr field of the buffer
3331 pointed to by err_data_buffer should be used
3332 to identify the cache line for error
3333 injection. 2 - Physical address provided in
3334 the inj_addr field of the buffer pointed to
3335 by err_data_buffershould be used to identify
3336 the cache line for error injection. 3 - way
3337 and index fields provided in err_data_buffer
3338 should be used to identify the cache line
3339 for error injection. All other values are
3340 reserved.
3341
3342 @param DataPoisonOfCacheLine Bit9 When 1, indicates that a
3343 multiple bit, non-correctable
3344 error should be injected in the
3345 cache line specified by cl_id.
3346 If this injected error is not
3347 consumed, it may eventually
3348 cause a data-poisoning event
3349 resulting in a corrected error
3350 signal, when the associated
3351 cache line is cast out (implicit
3352 or explicit write-back of the
3353 cache line). The error severity
3354 specified by err_sev in
3355 err_type_info must be set to 0
3356 (corrected error) when this bit
3357 is set.
3358
3359
3360 @param TrigerInfoIsValid Bit32 When 1, indicates that the
3361 trigger information fields (trigger,
3362 trigger_pl) are valid and should be
3363 used for error injection. When 0,
3364 the trigger information fields are
3365 ignored and error injection is
3366 performed immediately.
3367
3368 @param Triger Bit36:33 Indicates the operation type to be
3369 used as the error trigger condition. The
3370 address corresponding to the trigger is
3371 specified in the trigger_addr field of the
3372 buffer pointed to by err_data_buffer: 0 -
3373 Instruction memory access. The trigger match
3374 conditions for this operation type are similar
3375 to the IBR address breakpoint match conditions
3376 1 - Data memory access. The trigger match
3377 conditions for this operation type are similar
3378 to the DBR address breakpoint match conditions
3379 All other values are reserved.
3380
3381 @param PrivilegeOfTriger Bit39:37 Indicates the privilege
3382 level of the context during which
3383 the error should be injected: 0 -
3384 privilege level 0 1 - privilege
3385 level 1 2 - privilege level 2 3 -
3386 privilege level 3 All other values
3387 are reserved. If the implementation
3388 does not support privilege level
3389 qualifier for triggers (i.e. if
3390 trigger_pl is 0 in the capabilities
3391 vector), this field is ignored and
3392 triggers can be taken at any
3393 privilege level.
3394
3395 **/
3396 typedef struct {
3397 UINT64 StructInfoIsValid:1;
3398 UINT64 CacheType:2;
3399 UINT64 PortionOfCacheLine:3;
3400 UINT64 Mechanism:3;
3401 UINT64 DataPoisonOfCacheLine:1;
3402 UINT64 Reserved1:22;
3403 UINT64 TrigerInfoIsValid:1;
3404 UINT64 Triger:4;
3405 UINT64 PrivilegeOfTriger:3;
3406 UINT64 Reserved2:24;
3407 } PAL_MC_ERROR_STRUCT_INFO;
3408
3409 /**
3410
3411 Buffer Pointed to by err_data_buffer ¨C TLB
3412
3413 **/
3414 typedef struct {
3415 UINT64 TrigerAddress;
3416 UINT64 VirtualPageNumber:52;
3417 UINT64 Reserved1:8;
3418 UINT64 RegionId:24;
3419 UINT64 Reserved2:40;
3420 } PAL_MC_ERROR_DATA_BUFFER_TLB;
3421
3422 /**
3423
3424 PAL Procedure - PAL_MC_ERROR_INJECT.
3425
3426 Injects the requested processor error or returns information
3427 on the supported injection capabilities for this particular
3428 processor implementation. It is optional by IPF. The PAL
3429 procedure supports the Stacked Registers calling convention.
3430 It could be called at physical and Virtual mode.
3431
3432
3433 @param Index Index of PAL_MC_ERROR_INJECT within the list of PAL
3434 procedures.
3435
3436 @param ErrorTypeInfo Unsigned 64-bit integer specifying the
3437 first level error information which
3438 identifies the error structure and
3439 corresponding structure hierarchy, and
3440 the error severity.
3441
3442 @param ErrorStructInfo Unsigned 64-bit integer identifying
3443 the optional structure specific
3444 information that provides the second
3445 level details for the requested error.
3446
3447 @param ErrorDataBuffer 64-bit physical address of a buffer
3448 providing additional parameters for
3449 the requested error. The address of
3450 this buffer must be 8-byte aligned.
3451
3452 @return R9 64-bit vector specifying the supported error
3453 injection capabilities for the input argument
3454 combination of struct_hier, err_struct and
3455 err_sev fields in ErrorTypeInfo.
3456
3457 @return R10 64-bit vector specifying the architectural
3458 resources that are used by the procedure.
3459
3460
3461 @return Status 0 - Call completed without error
3462
3463 @return Status -1 - Unimplemented procedure
3464
3465 @return Status -2 - Invalid argument
3466
3467 @return Status -3 - Call completed with error.
3468
3469 @return Status -4 - Call completed with error; the requested
3470 error could not be injected due to failure in
3471 locating the target location in the specified
3472 structure.
3473
3474 @return Status -5 - Argument was valid, but requested error
3475 injection capability is not supported.
3476
3477 @return Status -9 - Call requires PAL memory buffer.
3478
3479 **/
3480 #define PAL_MC_ERROR_INJECT 276
3481
3482
3483 //
3484 // Types of PAL_GET_PSTATE.Type
3485 //
3486 #define PAL_GET_PSTATE_RECENT 0
3487 #define PAL_GET_PSTATE_AVERAGE_NEW_START 1
3488 #define PAL_GET_PSTATE_AVERAGE 2
3489 #define PAL_GET_PSTATE_NOW 3
3490
3491 /**
3492
3493 PAL Procedure - PAL_GET_PSTATE.
3494
3495 Returns the performance index of the processor. It is optional
3496 by IPF. The PAL procedure supports the Stacked Registers
3497 calling convention. It could be called at physical and Virtual
3498 mode.
3499
3500
3501 @param Index Index of PAL_GET_PSTATE within the list of PAL
3502 procedures.
3503
3504 @param Type Type of performance_index value to be returned
3505 by this procedure.See PAL_GET_PSTATE.Type above.
3506
3507
3508 @return R9 Unsigned integer denoting the processor
3509 performance for the time duration since the last
3510 PAL_GET_PSTATE procedure call was made. The
3511 value returned is between 0 and 100, and is
3512 relative to the performance index of the highest
3513 available P-state.
3514
3515 @return Status 1 - Call completed without error, but accuracy
3516 of performance index has been impacted by a
3517 thermal throttling event, or a
3518 hardware-initiated event.
3519
3520 @return Status 0 - Call completed without error
3521
3522 @return Status -1 - Unimplemented procedure
3523
3524 @return Status -2 - Invalid argument
3525
3526 @return Status -3 - Call completed with error.
3527
3528 @return Status -9 - Call requires PAL memory buffer.
3529
3530 **/
3531 #define PAL_GET_PSTATE 262
3532
3533 /**
3534
3535 Layout of PAL_PSTATE_INFO.PStateBuffer
3536
3537 **/
3538 typedef struct {
3539 UINT32 PerformanceIndex:7;
3540 UINT32 Reserved1:5;
3541 UINT32 TypicalPowerDissipation:20;
3542 UINT32 TransitionLatency1;
3543 UINT32 TransitionLatency2;
3544 UINT32 Reserved2;
3545 } PAL_PSTATE_INFO_BUFFER;
3546
3547
3548 /**
3549
3550 PAL Procedure - PAL_PSTATE_INFO.
3551
3552 Returns information about the P-states supported by the
3553 processor. It is optional by IPF. The PAL procedure supports
3554 the Static Registers calling convention. It could be called
3555 at physical and Virtual mode.
3556
3557
3558 @param Index Index of PAL_PSTATE_INFO within the list of PAL
3559 procedures.
3560
3561 @param PStateBuffer 64-bit pointer to a 256-byte buffer
3562 aligned on an 8-byte boundary. See
3563 PAL_PSTATE_INFO_BUFFER above.
3564
3565
3566 @return R9 Unsigned integer denoting the number of P-states
3567 supported. The maximum value of this field is 16.
3568
3569 @return R10 Dependency domain information
3570
3571
3572 @return Status 0 - Call completed without error
3573
3574 @return Status -1 - Unimplemented procedure
3575
3576 @return Status -2 - Invalid argument
3577
3578 @return Status -3 - Call completed with error.
3579
3580 **/
3581 #define PAL_PSTATE_INFO 44
3582
3583
3584 /**
3585
3586 PAL Procedure - PAL_SET_PSTATE.
3587
3588 To request a processor transition to a given P-state. It is
3589 optional by IPF. The PAL procedure supports the Stacked
3590 Registers calling convention. It could be called at physical
3591 and Virtual mode.
3592
3593
3594 @param Index Index of PAL_SET_PSTATE within the list of PAL
3595 procedures.
3596
3597 @param PState Unsigned integer denoting the processor
3598 P-state being requested.
3599
3600 @param ForcePState Unsigned integer denoting whether the
3601 P-state change should be forced for the
3602 logical processor.
3603
3604
3605
3606
3607
3608 @return Status 1 - Call completed without error, but
3609 transition request was not accepted
3610
3611 @return Status 0 - Call completed without error
3612
3613 @return Status -1 - Unimplemented procedure
3614
3615 @return Status -2 - Invalid argument
3616
3617 @return Status -3 - Call completed with error.
3618
3619 @return Status -9 - Call requires PAL memory buffer.
3620
3621 **/
3622 #define PAL_SET_PSTATE 263
3623
3624 /**
3625
3626 PAL Procedure - PAL_SHUTDOWN.
3627
3628 Put the logical processor into a low power state which can be
3629 exited only by a reset event. It is optional by IPF. The PAL
3630 procedure supports the Static Registers calling convention. It
3631 could be called at physical mode.
3632
3633
3634 @param Index Index of PAL_SHUTDOWN within the list of PAL
3635 procedures.
3636
3637 @param NotifyPlatform 8-byte aligned physical address
3638 pointer providing details on how to
3639 optionally notify the platform that
3640 the processor is entering a shutdown
3641 state.
3642
3643 @return Status -1 - Unimplemented procedure
3644
3645 @return Status -2 - Invalid argument
3646
3647 @return Status -3 - Call completed with error.
3648
3649 @return Status -9 - Call requires PAL memory buffer.
3650
3651 **/
3652 #define PAL_SHUTDOWN 45
3653
3654 /**
3655
3656 Layout of PAL_MEMORY_BUFFER.ControlWord
3657
3658 **/
3659 typedef struct {
3660 UINT64 Registration:1;
3661 UINT64 ProbeInterrupt:1;
3662 UINT64 Reserved:62;
3663 } PAL_MEMORY_CONTROL_WORD;
3664
3665 /**
3666
3667 PAL Procedure - PAL_MEMORY_BUFFER.
3668
3669 Provides cacheable memory to PAL for exclusive use during
3670 runtime. It is optional by IPF. The PAL procedure supports the
3671 Static Registers calling convention. It could be called at
3672 physical mode.
3673
3674
3675 @param Index Index of PAL_MEMORY_BUFFER within the list of PAL
3676 procedures.
3677
3678 @param BaseAddress Physical address of the memory buffer
3679 allocated for PAL use.
3680
3681 @param AllocSize Unsigned integer denoting the size of the
3682 memory buffer.
3683
3684 @param ControlWord Formatted bit vector that provides control
3685 options for this procedure. See
3686 PAL_MEMORY_CONTROL_WORD above.
3687
3688 @return R9 Returns the minimum size of the memory buffer
3689 required if the alloc_size input argument was
3690 not large enough.
3691
3692 @return Status 1 - Call has not completed a buffer relocation
3693 due to a pending interrupt
3694
3695 @return Status 0 - Call completed without error
3696
3697 @return Status -1 - Unimplemented procedure
3698
3699 @return Status -2 - Invalid argument
3700
3701 @return Status -3 - Call completed with error.
3702
3703 @return Status -9 - Call requires PAL memory buffer.
3704
3705 **/
3706 #define PAL_MEMORY_BUFFER 277
3707
3708
3709 /**
3710
3711 PAL Procedure - PAL_VP_CREATE.
3712
3713 Initializes a new vpd for the operation of a new virtual
3714 processor in the virtual environment. It is optional by IPF.
3715 The PAL procedure supports the Stacked Registers calling
3716 convention. It could be called at Virtual mode.
3717
3718
3719 @param Index Index of PAL_VP_CREATE within the list of PAL
3720 procedures.
3721
3722 @param Vpd 64-bit host virtual pointer to the Virtual
3723 Processor Descriptor (VPD).
3724
3725 @param HostIva 64-bit host virtual pointer to the host IVT
3726 for the virtual processor
3727
3728 @param OptionalHandler 64-bit non-zero host-virtual pointer
3729 to an optional handler for
3730 virtualization intercepts.
3731
3732
3733 @return Status 0 - Call completed without error
3734
3735 @return Status -1 - Unimplemented procedure
3736
3737 @return Status -2 - Invalid argument
3738
3739 @return Status -3 - Call completed with error.
3740
3741 @return Status -9 - Call requires PAL memory buffer.
3742
3743 **/
3744 #define PAL_VP_CREATE 265
3745
3746 /**
3747
3748 Virtual Environment Information Parameter
3749
3750 **/
3751 typedef struct {
3752 UINT64 Reserved1:8;
3753 UINT64 Opcode:1;
3754 UINT64 Reserved:53;
3755 } PAL_VP_ENV_INFO_RETURN;
3756
3757 /**
3758
3759 PAL Procedure - PAL_VP_ENV_INFO.
3760
3761 Returns the parameters needed to enter a virtual environment.
3762 It is optional by IPF. The PAL procedure supports the Stacked
3763 Registers calling convention. It could be called at Virtual
3764 mode.
3765
3766
3767 @param Index Index of PAL_VP_ENV_INFO within the list of PAL
3768 procedures.
3769
3770 @param Vpd 64-bit host virtual pointer to the Virtual
3771 Processor Descriptor (VPD).
3772
3773 @param HostIva 64-bit host virtual pointer to the host IVT
3774 for the virtual processor
3775
3776 @param OptionalHandler 64-bit non-zero host-virtual pointer
3777 to an optional handler for
3778 virtualization intercepts.
3779 @return R9 Unsigned integer denoting the number of bytes
3780 required by the PAL virtual environment buffer
3781 during PAL_VP_INIT_ENV
3782
3783 @return R10 64-bit vector of virtual environment
3784 information. See PAL_VP_ENV_INFO_RETURN.
3785
3786
3787 @return Status 0 - Call completed without error
3788
3789 @return Status -1 - Unimplemented procedure
3790
3791 @return Status -2 - Invalid argument
3792
3793 @return Status -3 - Call completed with error.
3794
3795 @return Status -9 - Call requires PAL memory buffer.
3796
3797 **/
3798 #define PAL_VP_ENV_INFO 266
3799
3800 /**
3801
3802 PAL Procedure - PAL_VP_EXIT_ENV.
3803
3804 Allows a logical processor to exit a virtual environment.
3805 It is optional by IPF. The PAL procedure supports the Stacked
3806 Registers calling convention. It could be called at Virtual
3807 mode.
3808
3809
3810 @param Index Index of PAL_VP_EXIT_ENV within the list of PAL
3811 procedures.
3812
3813 @param Iva Optional 64-bit host virtual pointer to the IVT
3814 when this procedure is done
3815
3816 @return Status 0 - Call completed without error
3817
3818 @return Status -1 - Unimplemented procedure
3819
3820 @return Status -2 - Invalid argument
3821
3822 @return Status -3 - Call completed with error.
3823
3824 @return Status -9 - Call requires PAL memory buffer.
3825
3826 **/
3827 #define PAL_VP_EXIT_ENV 267
3828
3829
3830
3831 /**
3832
3833 PAL Procedure - PAL_VP_INIT_ENV.
3834
3835 Allows a logical processor to enter a virtual environment. It
3836 is optional by IPF. The PAL procedure supports the Stacked
3837 Registers calling convention. It could be called at Virtual
3838 mode.
3839
3840
3841 @param Index Index of PAL_VP_INIT_ENV within the list of PAL
3842 procedures.
3843
3844 @param ConfigOptions 64-bit vector of global configuration
3845 settings.
3846
3847 @param PhysicalBase Host physical base address of a block of
3848 contiguous physical memory for the PAL
3849 virtual environment buffer 1) This
3850 memory area must be allocated by the VMM
3851 and be 4K aligned. The first logical
3852 processor to enter the environment will
3853 initialize the physical block for
3854 virtualization operations.
3855
3856 @param VirtualBase Host virtual base address of the
3857 corresponding physical memory block for
3858 the PAL virtual environment buffer : The
3859 VMM must maintain the host virtual to host
3860 physical data and instruction translations
3861 in TRs for addresses within the allocated
3862 address space. Logical processors in this
3863 virtual environment will use this address
3864 when transitioning to virtual mode
3865 operations.
3866
3867 @return R9 Virtualization Service Address ¨C VSA specifies
3868 the virtual base address of the PAL
3869 virtualization services in this virtual
3870 environment.
3871
3872
3873 @return Status 0 - Call completed without error
3874
3875 @return Status -1 - Unimplemented procedure
3876
3877 @return Status -2 - Invalid argument
3878
3879 @return Status -3 - Call completed with error.
3880
3881 @return Status -9 - Call requires PAL memory buffer.
3882
3883 **/
3884 #define PAL_VP_INIT_ENV 268
3885
3886
3887 /**
3888
3889 PAL Procedure - PAL_VP_REGISTER.
3890
3891 Register a different host IVT and/or a different optional
3892 virtualization intercept handler for the virtual processor
3893 specified by vpd. It is optional by IPF. The PAL procedure
3894 supports the Stacked Registers calling convention. It could be
3895 called at Virtual mode.
3896
3897
3898 @param Index Index of PAL_VP_REGISTER within the list of PAL
3899 procedures.
3900
3901 @param Vpd 64-bit host virtual pointer to the Virtual
3902 Processor Descriptor (VPD) host_iva 64-bit host
3903 virtual pointer to the host IVT for the virtual
3904 processor
3905
3906 @param OptionalHandler 64-bit non-zero host-virtual pointer
3907 to an optional handler for
3908 virtualization intercepts.
3909
3910
3911 @return Status 0 - Call completed without error
3912
3913 @return Status -1 - Unimplemented procedure
3914
3915 @return Status -2 - Invalid argument
3916
3917 @return Status -3 - Call completed with error.
3918
3919 @return Status -9 - Call requires PAL memory buffer.
3920
3921 **/
3922 #define PAL_VP_REGISTER 269
3923
3924
3925 /**
3926
3927 PAL Procedure - PAL_VP_RESTORE.
3928
3929 Restores virtual processor state for the specified vpd on the
3930 logical processor. It is optional by IPF. The PAL procedure
3931 supports the Stacked Registers calling convention. It could be
3932 called at Virtual mode.
3933
3934
3935 @param Index Index of PAL_VP_RESTORE within the list of PAL
3936 procedures.
3937
3938 @param Vpd 64-bit host virtual pointer to the Virtual
3939 Processor Descriptor (VPD) host_iva 64-bit host
3940 virtual pointer to the host IVT for the virtual
3941 processor
3942
3943 @param PalVector Vector specifies PAL procedure
3944 implementation-specific state to be
3945 restored.
3946
3947
3948 @return Status 0 - Call completed without error
3949
3950 @return Status -1 - Unimplemented procedure
3951
3952 @return Status -2 - Invalid argument
3953
3954 @return Status -3 - Call completed with error.
3955
3956 @return Status -9 - Call requires PAL memory buffer.
3957
3958 **/
3959 #define PAL_VP_RESTORE 270
3960
3961 /**
3962
3963 PAL Procedure - PAL_VP_SAVE.
3964
3965 Saves virtual processor state for the specified vpd on the
3966 logical processor. It is optional by IPF. The PAL procedure
3967 supports the Stacked Registers calling convention. It could be
3968 called at Virtual mode.
3969
3970
3971 @param Index Index of PAL_VP_SAVE within the list of PAL
3972 procedures.
3973
3974 @param Vpd 64-bit host virtual pointer to the Virtual
3975 Processor Descriptor (VPD) host_iva 64-bit host
3976 virtual pointer to the host IVT for the virtual
3977 processor
3978
3979 @param PalVector Vector specifies PAL procedure
3980 implementation-specific state to be
3981 restored.
3982
3983
3984 @return Status 0 - Call completed without error
3985
3986 @return Status -1 - Unimplemented procedure
3987
3988 @return Status -2 - Invalid argument
3989
3990 @return Status -3 - Call completed with error.
3991
3992 @return Status -9 - Call requires PAL memory buffer.
3993
3994 **/
3995 #define PAL_VP_SAVE 271
3996
3997
3998 /**
3999
4000 PAL Procedure - PAL_VP_TERMINATE.
4001
4002 Terminates operation for the specified virtual processor. It
4003 is optional by IPF. The PAL procedure supports the Stacked
4004 Registers calling convention. It could be called at Virtual
4005 mode.
4006
4007
4008 @param Index Index of PAL_VP_TERMINATE within the list of PAL
4009 procedures.
4010
4011 @param Vpd 64-bit host virtual pointer to the Virtual
4012 Processor Descriptor (VPD)
4013
4014 @param Iva Optional 64-bit host virtual pointer to the IVT
4015 when this procedure is done.
4016
4017 @return Status 0 - Call completed without error
4018
4019 @return Status -1 - Unimplemented procedure
4020
4021 @return Status -2 - Invalid argument
4022
4023 @return Status -3 - Call completed with error.
4024
4025 @return Status -9 - Call requires PAL memory buffer.
4026
4027 **/
4028 #define PAL_VP_TERMINATE 272
4029
4030 /**
4031 Makes a PAL procedure call.
4032
4033 This is a wrapper function to make a PAL procedure call. Based on the Index value,
4034 this API will make static or stacked PAL call. Architected procedures may be designated
4035 as required or optional. If a PAL procedure is specified as optional, a unique return
4036 code of 0xFFFFFFFFFFFFFFFF is returned in the Status field of the PAL_CALL_RETURN structure.
4037 This indicates that the procedure is not present in this PAL implementation. It is the
4038 caller¡¯s responsibility to check for this return code after calling any optional PAL
4039 procedure. No parameter checking is performed on the 4 input parameters, but there are
4040 some common rules that the caller should follow when making a PAL call. Any address
4041 passed to PAL as buffers for return parameters must be 8-byte aligned. Unaligned addresses
4042 may cause undefined results. For those parameters defined as reserved or some fields
4043 defined as reserved must be zero filled or the invalid argument return value may be
4044 returned or undefined result may occur during the execution of the procedure.
4045 This function is only available on IPF.
4046
4047 @param Index - The PAL procedure Index number.
4048 @param Arg2 - The 2nd parameter for PAL procedure calls.
4049 @param Arg3 - The 3rd parameter for PAL procedure calls.
4050 @param Arg4 - The 4th parameter for PAL procedure calls.
4051
4052 @return structure returned from the PAL Call procedure, including the status and return value.
4053
4054 **/
4055 PAL_CALL_RETURN
4056 EFIAPI
4057 PalCall (
4058 IN UINT64 Index,
4059 IN UINT64 Arg2,
4060 IN UINT64 Arg3,
4061 IN UINT64 Arg4
4062 );
4063
4064 #endif
4065