Go to the documentation of this file.
43 #include <linux/types.h>
44 #include <linux/errno.h>
45 #include <asm/byteorder.h>
48 #define FH_API_VERSION 1
50 #define FH_ERR_GET_INFO 1
51 #define FH_PARTITION_GET_DTPROP 2
52 #define FH_PARTITION_SET_DTPROP 3
53 #define FH_PARTITION_RESTART 4
54 #define FH_PARTITION_GET_STATUS 5
55 #define FH_PARTITION_START 6
56 #define FH_PARTITION_STOP 7
57 #define FH_PARTITION_MEMCPY 8
58 #define FH_DMA_ENABLE 9
59 #define FH_DMA_DISABLE 10
60 #define FH_SEND_NMI 11
61 #define FH_VMPIC_GET_MSIR 12
62 #define FH_SYSTEM_RESET 13
63 #define FH_GET_CORE_STATE 14
64 #define FH_ENTER_NAP 15
65 #define FH_EXIT_NAP 16
66 #define FH_CLAIM_DEVICE 17
67 #define FH_PARTITION_STOP_DMA 18
70 #define FH_HCALL_TOKEN(num) _EV_HCALL_TOKEN(EV_FSL_VENDOR_ID, num)
91 static inline unsigned int fh_send_nmi(
unsigned int vcpu_mask)
99 __asm__ __volatile__ (
"sc 1"
100 :
"+r" (
r11),
"+r" (
r3)
108 #define FH_DTPROP_MAX_PATHLEN 4096
109 #define FH_DTPROP_MAX_PROPLEN 32768
121 static inline unsigned int fh_partition_get_dtprop(
int handle,
140 #ifdef CONFIG_PHYS_64BIT
141 r4 = dtpath_addr >> 32;
142 r6 = propname_addr >> 32;
143 r8 = propvalue_addr >> 32;
152 r10 = *propvalue_len;
154 __asm__ __volatile__ (
"sc 1"
156 "+r" (
r3),
"+r" (
r4),
"+r" (
r5),
"+r" (
r6),
"+r" (
r7),
157 "+r" (
r8),
"+r" (
r9),
"+r" (
r10)
175 static inline unsigned int fh_partition_set_dtprop(
int handle,
194 #ifdef CONFIG_PHYS_64BIT
195 r4 = dtpath_addr >> 32;
196 r6 = propname_addr >> 32;
197 r8 = propvalue_addr >> 32;
210 "+r" (
r3),
"+r" (
r4),
"+r" (
r5),
"+r" (
r6),
"+r" (
r7),
211 "+r" (
r8),
"+r" (
r9),
"+r" (
r10)
224 static inline unsigned int fh_partition_restart(
unsigned int partition)
233 :
"+r" (
r11),
"+r" (
r3)
240 #define FH_PARTITION_STOPPED 0
241 #define FH_PARTITION_RUNNING 1
242 #define FH_PARTITION_STARTING 2
243 #define FH_PARTITION_STOPPING 3
244 #define FH_PARTITION_PAUSING 4
245 #define FH_PARTITION_PAUSED 5
246 #define FH_PARTITION_RESUMING 6
255 static inline unsigned int fh_partition_get_status(
unsigned int partition,
265 __asm__ __volatile__ (
"sc 1"
266 :
"+r" (
r11),
"+r" (
r3),
"=r" (
r4)
285 static inline unsigned int fh_partition_start(
unsigned int partition,
299 :
"+r" (
r11),
"+r" (
r3),
"+r" (
r4),
"+r" (
r5)
312 static inline unsigned int fh_partition_stop(
unsigned int partition)
321 :
"+r" (
r11),
"+r" (
r3)
357 static inline unsigned int fh_partition_memcpy(
unsigned int source,
372 #ifdef CONFIG_PHYS_64BIT
379 __asm__ __volatile__ (
"sc 1"
381 "+r" (
r3),
"+r" (
r4),
"+r" (
r5),
"+r" (
r6),
"+r" (
r7)
394 static inline unsigned int fh_dma_enable(
unsigned int liodn)
403 :
"+r" (
r11),
"+r" (
r3)
416 static inline unsigned int fh_dma_disable(
unsigned int liodn)
425 :
"+r" (
r11),
"+r" (
r3)
440 static inline unsigned int fh_vmpic_get_msir(
unsigned int interrupt,
441 unsigned int *msir_val)
451 :
"+r" (
r11),
"+r" (
r3),
"=r" (
r4)
465 static inline unsigned int fh_system_reset(
void)
473 :
"+r" (
r11),
"=r" (
r3)
510 :
"+r" (
r11),
"+r" (
r3),
"+r" (
r4),
"+r" (
r5),
"+r" (
r6),
521 #define FH_VCPU_RUN 0
522 #define FH_VCPU_IDLE 1
523 #define FH_VCPU_NAP 2
534 static inline unsigned int fh_get_core_state(
unsigned int handle,
535 unsigned int vcpu,
unsigned int *
state)
545 __asm__ __volatile__ (
"sc 1"
546 :
"+r" (
r11),
"+r" (
r3),
"+r" (
r4)
565 static inline unsigned int fh_enter_nap(
unsigned int handle,
unsigned int vcpu)
576 :
"+r" (
r11),
"+r" (
r3),
"+r" (
r4)
590 static inline unsigned int fh_exit_nap(
unsigned int handle,
unsigned int vcpu)
601 :
"+r" (
r11),
"+r" (
r3),
"+r" (
r4)
613 static inline unsigned int fh_claim_device(
unsigned int handle)
622 :
"+r" (
r11),
"+r" (
r3)
640 static inline unsigned int fh_partition_stop_dma(
unsigned int handle)
649 :
"+r" (
r11),
"+r" (
r3)