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