|
@@ -1041,3 +1041,73 @@ ia64_pal_copy_pal (u64 target_addr, u64 alloc_size, u64 processor, u64 *pal_proc
|
|
|
static inline long ia64_pal_debug_info(unsigned long *inst_regs,
|
|
|
unsigned long *data_regs)
|
|
|
{
|
|
|
+ struct ia64_pal_retval iprv;
|
|
|
+ PAL_CALL(iprv, PAL_DEBUG_INFO, 0, 0, 0);
|
|
|
+ if (inst_regs)
|
|
|
+ *inst_regs = iprv.v0;
|
|
|
+ if (data_regs)
|
|
|
+ *data_regs = iprv.v1;
|
|
|
+
|
|
|
+ return iprv.status;
|
|
|
+}
|
|
|
+
|
|
|
+#ifdef TBD
|
|
|
+/* Switch from IA64-system environment to IA-32 system environment */
|
|
|
+static inline s64
|
|
|
+ia64_pal_enter_ia32_env (ia32_env1, ia32_env2, ia32_env3)
|
|
|
+{
|
|
|
+ struct ia64_pal_retval iprv;
|
|
|
+ PAL_CALL(iprv, PAL_ENTER_IA_32_ENV, ia32_env1, ia32_env2, ia32_env3);
|
|
|
+ return iprv.status;
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
+/* Get unique geographical address of this processor on its bus */
|
|
|
+static inline s64
|
|
|
+ia64_pal_fixed_addr (u64 *global_unique_addr)
|
|
|
+{
|
|
|
+ struct ia64_pal_retval iprv;
|
|
|
+ PAL_CALL(iprv, PAL_FIXED_ADDR, 0, 0, 0);
|
|
|
+ if (global_unique_addr)
|
|
|
+ *global_unique_addr = iprv.v0;
|
|
|
+ return iprv.status;
|
|
|
+}
|
|
|
+
|
|
|
+/* Get base frequency of the platform if generated by the processor */
|
|
|
+static inline long ia64_pal_freq_base(unsigned long *platform_base_freq)
|
|
|
+{
|
|
|
+ struct ia64_pal_retval iprv;
|
|
|
+ PAL_CALL(iprv, PAL_FREQ_BASE, 0, 0, 0);
|
|
|
+ if (platform_base_freq)
|
|
|
+ *platform_base_freq = iprv.v0;
|
|
|
+ return iprv.status;
|
|
|
+}
|
|
|
+
|
|
|
+/*
|
|
|
+ * Get the ratios for processor frequency, bus frequency and interval timer to
|
|
|
+ * to base frequency of the platform
|
|
|
+ */
|
|
|
+static inline s64
|
|
|
+ia64_pal_freq_ratios (struct pal_freq_ratio *proc_ratio, struct pal_freq_ratio *bus_ratio,
|
|
|
+ struct pal_freq_ratio *itc_ratio)
|
|
|
+{
|
|
|
+ struct ia64_pal_retval iprv;
|
|
|
+ PAL_CALL(iprv, PAL_FREQ_RATIOS, 0, 0, 0);
|
|
|
+ if (proc_ratio)
|
|
|
+ *(u64 *)proc_ratio = iprv.v0;
|
|
|
+ if (bus_ratio)
|
|
|
+ *(u64 *)bus_ratio = iprv.v1;
|
|
|
+ if (itc_ratio)
|
|
|
+ *(u64 *)itc_ratio = iprv.v2;
|
|
|
+ return iprv.status;
|
|
|
+}
|
|
|
+
|
|
|
+/*
|
|
|
+ * Get the current hardware resource sharing policy of the processor
|
|
|
+ */
|
|
|
+static inline s64
|
|
|
+ia64_pal_get_hw_policy (u64 proc_num, u64 *cur_policy, u64 *num_impacted,
|
|
|
+ u64 *la)
|
|
|
+{
|
|
|
+ struct ia64_pal_retval iprv;
|
|
|
+ PAL_CALL(iprv, PAL_GET_HW_POLICY, proc_num, 0, 0);
|