diff options
Diffstat (limited to 'include/asm-ia64/pal.h')
-rw-r--r-- | include/asm-ia64/pal.h | 64 |
1 files changed, 56 insertions, 8 deletions
diff --git a/include/asm-ia64/pal.h b/include/asm-ia64/pal.h index 4283ddcc25fb..bc768153f3c9 100644 --- a/include/asm-ia64/pal.h +++ b/include/asm-ia64/pal.h | |||
@@ -20,6 +20,8 @@ | |||
20 | * 00/05/24 eranian Updated to latest PAL spec, fix structures bugs, added | 20 | * 00/05/24 eranian Updated to latest PAL spec, fix structures bugs, added |
21 | * 00/05/25 eranian Support for stack calls, and static physical calls | 21 | * 00/05/25 eranian Support for stack calls, and static physical calls |
22 | * 00/06/18 eranian Support for stacked physical calls | 22 | * 00/06/18 eranian Support for stacked physical calls |
23 | * 06/10/26 rja Support for Intel Itanium Architecture Software Developer's | ||
24 | * Manual Rev 2.2 (Jan 2006) | ||
23 | */ | 25 | */ |
24 | 26 | ||
25 | /* | 27 | /* |
@@ -69,6 +71,8 @@ | |||
69 | #define PAL_PREFETCH_VISIBILITY 41 /* Make Processor Prefetches Visible */ | 71 | #define PAL_PREFETCH_VISIBILITY 41 /* Make Processor Prefetches Visible */ |
70 | #define PAL_LOGICAL_TO_PHYSICAL 42 /* returns information on logical to physical processor mapping */ | 72 | #define PAL_LOGICAL_TO_PHYSICAL 42 /* returns information on logical to physical processor mapping */ |
71 | #define PAL_CACHE_SHARED_INFO 43 /* returns information on caches shared by logical processor */ | 73 | #define PAL_CACHE_SHARED_INFO 43 /* returns information on caches shared by logical processor */ |
74 | #define PAL_GET_HW_POLICY 48 /* Get current hardware resource sharing policy */ | ||
75 | #define PAL_SET_HW_POLICY 49 /* Set current hardware resource sharing policy */ | ||
72 | 76 | ||
73 | #define PAL_COPY_PAL 256 /* relocate PAL procedures and PAL PMI */ | 77 | #define PAL_COPY_PAL 256 /* relocate PAL procedures and PAL PMI */ |
74 | #define PAL_HALT_INFO 257 /* return the low power capabilities of processor */ | 78 | #define PAL_HALT_INFO 257 /* return the low power capabilities of processor */ |
@@ -80,6 +84,11 @@ | |||
80 | #define PAL_SET_PSTATE 263 /* set the P-state */ | 84 | #define PAL_SET_PSTATE 263 /* set the P-state */ |
81 | #define PAL_BRAND_INFO 274 /* Processor branding information */ | 85 | #define PAL_BRAND_INFO 274 /* Processor branding information */ |
82 | 86 | ||
87 | #define PAL_GET_PSTATE_TYPE_LASTSET 0 | ||
88 | #define PAL_GET_PSTATE_TYPE_AVGANDRESET 1 | ||
89 | #define PAL_GET_PSTATE_TYPE_AVGNORESET 2 | ||
90 | #define PAL_GET_PSTATE_TYPE_INSTANT 3 | ||
91 | |||
83 | #ifndef __ASSEMBLY__ | 92 | #ifndef __ASSEMBLY__ |
84 | 93 | ||
85 | #include <linux/types.h> | 94 | #include <linux/types.h> |
@@ -102,6 +111,7 @@ typedef s64 pal_status_t; | |||
102 | * cache without sideeffects | 111 | * cache without sideeffects |
103 | * and "restrict" was 1 | 112 | * and "restrict" was 1 |
104 | */ | 113 | */ |
114 | #define PAL_STATUS_REQUIRES_MEMORY (-9) /* Call requires PAL memory buffer */ | ||
105 | 115 | ||
106 | /* Processor cache level in the heirarchy */ | 116 | /* Processor cache level in the heirarchy */ |
107 | typedef u64 pal_cache_level_t; | 117 | typedef u64 pal_cache_level_t; |
@@ -456,7 +466,9 @@ typedef struct pal_process_state_info_s { | |||
456 | * by the processor | 466 | * by the processor |
457 | */ | 467 | */ |
458 | 468 | ||
459 | reserved2 : 11, | 469 | se : 1, /* Shared error. MCA in a |
470 | shared structure */ | ||
471 | reserved2 : 10, | ||
460 | cc : 1, /* Cache check */ | 472 | cc : 1, /* Cache check */ |
461 | tc : 1, /* TLB check */ | 473 | tc : 1, /* TLB check */ |
462 | bc : 1, /* Bus check */ | 474 | bc : 1, /* Bus check */ |
@@ -487,10 +499,12 @@ typedef struct pal_cache_check_info_s { | |||
487 | * error occurred | 499 | * error occurred |
488 | */ | 500 | */ |
489 | wiv : 1, /* Way field valid */ | 501 | wiv : 1, /* Way field valid */ |
490 | reserved2 : 10, | 502 | reserved2 : 1, |
503 | dp : 1, /* Data poisoned on MBE */ | ||
504 | reserved3 : 8, | ||
491 | 505 | ||
492 | index : 20, /* Cache line index */ | 506 | index : 20, /* Cache line index */ |
493 | reserved3 : 2, | 507 | reserved4 : 2, |
494 | 508 | ||
495 | is : 1, /* instruction set (1 == ia32) */ | 509 | is : 1, /* instruction set (1 == ia32) */ |
496 | iv : 1, /* instruction set field valid */ | 510 | iv : 1, /* instruction set field valid */ |
@@ -557,7 +571,7 @@ typedef struct pal_bus_check_info_s { | |||
557 | type : 8, /* Bus xaction type*/ | 571 | type : 8, /* Bus xaction type*/ |
558 | sev : 5, /* Bus error severity*/ | 572 | sev : 5, /* Bus error severity*/ |
559 | hier : 2, /* Bus hierarchy level */ | 573 | hier : 2, /* Bus hierarchy level */ |
560 | reserved1 : 1, | 574 | dp : 1, /* Data poisoned on MBE */ |
561 | bsi : 8, /* Bus error status | 575 | bsi : 8, /* Bus error status |
562 | * info | 576 | * info |
563 | */ | 577 | */ |
@@ -834,7 +848,9 @@ typedef union pal_bus_features_u { | |||
834 | u64 pbf_req_bus_parking : 1; | 848 | u64 pbf_req_bus_parking : 1; |
835 | u64 pbf_bus_lock_mask : 1; | 849 | u64 pbf_bus_lock_mask : 1; |
836 | u64 pbf_enable_half_xfer_rate : 1; | 850 | u64 pbf_enable_half_xfer_rate : 1; |
837 | u64 pbf_reserved2 : 22; | 851 | u64 pbf_reserved2 : 20; |
852 | u64 pbf_enable_shared_line_replace : 1; | ||
853 | u64 pbf_enable_exclusive_line_replace : 1; | ||
838 | u64 pbf_disable_xaction_queueing : 1; | 854 | u64 pbf_disable_xaction_queueing : 1; |
839 | u64 pbf_disable_resp_err_check : 1; | 855 | u64 pbf_disable_resp_err_check : 1; |
840 | u64 pbf_disable_berr_check : 1; | 856 | u64 pbf_disable_berr_check : 1; |
@@ -1077,6 +1093,24 @@ ia64_pal_freq_ratios (struct pal_freq_ratio *proc_ratio, struct pal_freq_ratio * | |||
1077 | return iprv.status; | 1093 | return iprv.status; |
1078 | } | 1094 | } |
1079 | 1095 | ||
1096 | /* | ||
1097 | * Get the current hardware resource sharing policy of the processor | ||
1098 | */ | ||
1099 | static inline s64 | ||
1100 | ia64_pal_get_hw_policy (u64 proc_num, u64 *cur_policy, u64 *num_impacted, | ||
1101 | u64 *la) | ||
1102 | { | ||
1103 | struct ia64_pal_retval iprv; | ||
1104 | PAL_CALL(iprv, PAL_GET_HW_POLICY, proc_num, 0, 0); | ||
1105 | if (cur_policy) | ||
1106 | *cur_policy = iprv.v0; | ||
1107 | if (num_impacted) | ||
1108 | *num_impacted = iprv.v1; | ||
1109 | if (la) | ||
1110 | *la = iprv.v2; | ||
1111 | return iprv.status; | ||
1112 | } | ||
1113 | |||
1080 | /* Make the processor enter HALT or one of the implementation dependent low | 1114 | /* Make the processor enter HALT or one of the implementation dependent low |
1081 | * power states where prefetching and execution are suspended and cache and | 1115 | * power states where prefetching and execution are suspended and cache and |
1082 | * TLB coherency is not maintained. | 1116 | * TLB coherency is not maintained. |
@@ -1112,10 +1146,10 @@ ia64_pal_halt_info (pal_power_mgmt_info_u_t *power_buf) | |||
1112 | 1146 | ||
1113 | /* Get the current P-state information */ | 1147 | /* Get the current P-state information */ |
1114 | static inline s64 | 1148 | static inline s64 |
1115 | ia64_pal_get_pstate (u64 *pstate_index) | 1149 | ia64_pal_get_pstate (u64 *pstate_index, unsigned long type) |
1116 | { | 1150 | { |
1117 | struct ia64_pal_retval iprv; | 1151 | struct ia64_pal_retval iprv; |
1118 | PAL_CALL_STK(iprv, PAL_GET_PSTATE, 0, 0, 0); | 1152 | PAL_CALL_STK(iprv, PAL_GET_PSTATE, type, 0, 0); |
1119 | *pstate_index = iprv.v0; | 1153 | *pstate_index = iprv.v0; |
1120 | return iprv.status; | 1154 | return iprv.status; |
1121 | } | 1155 | } |
@@ -1401,6 +1435,17 @@ ia64_pal_rse_info (u64 *num_phys_stacked, pal_hints_u_t *hints) | |||
1401 | return iprv.status; | 1435 | return iprv.status; |
1402 | } | 1436 | } |
1403 | 1437 | ||
1438 | /* | ||
1439 | * Set the current hardware resource sharing policy of the processor | ||
1440 | */ | ||
1441 | static inline s64 | ||
1442 | ia64_pal_set_hw_policy (u64 policy) | ||
1443 | { | ||
1444 | struct ia64_pal_retval iprv; | ||
1445 | PAL_CALL(iprv, PAL_SET_HW_POLICY, policy, 0, 0); | ||
1446 | return iprv.status; | ||
1447 | } | ||
1448 | |||
1404 | /* Cause the processor to enter SHUTDOWN state, where prefetching and execution are | 1449 | /* Cause the processor to enter SHUTDOWN state, where prefetching and execution are |
1405 | * suspended, but cause cache and TLB coherency to be maintained. | 1450 | * suspended, but cause cache and TLB coherency to be maintained. |
1406 | * This is usually called in IA-32 mode. | 1451 | * This is usually called in IA-32 mode. |
@@ -1524,12 +1569,15 @@ typedef union pal_vm_info_1_u { | |||
1524 | } pal_vm_info_1_s; | 1569 | } pal_vm_info_1_s; |
1525 | } pal_vm_info_1_u_t; | 1570 | } pal_vm_info_1_u_t; |
1526 | 1571 | ||
1572 | #define PAL_MAX_PURGES 0xFFFF /* all ones is means unlimited */ | ||
1573 | |||
1527 | typedef union pal_vm_info_2_u { | 1574 | typedef union pal_vm_info_2_u { |
1528 | u64 pvi2_val; | 1575 | u64 pvi2_val; |
1529 | struct { | 1576 | struct { |
1530 | u64 impl_va_msb : 8, | 1577 | u64 impl_va_msb : 8, |
1531 | rid_size : 8, | 1578 | rid_size : 8, |
1532 | reserved : 48; | 1579 | max_purges : 16, |
1580 | reserved : 32; | ||
1533 | } pal_vm_info_2_s; | 1581 | } pal_vm_info_2_s; |
1534 | } pal_vm_info_2_u_t; | 1582 | } pal_vm_info_2_u_t; |
1535 | 1583 | ||