Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3816 → Rev 3817

/branches/sparc/kernel/arch/sparc64/include/sun4v/hypercall.h
139,7 → 139,8
__hypercall_fast(p1, p2, p3, p4, p5, function_number)
 
/**
* Performs a fast hypervisor API call which can returns a value.
* Performs a fast hypervisor API call which returns no value except for the
* error status.
*
* @param p1 the 1st argument of the hypervisor API call
* @param p2 the 2nd argument of the hypervisor API call
147,14 → 148,11
* @param p4 the 4th argument of the hypervisor API call
* @param p5 the 5th argument of the hypervisor API call
* @param function_number function number of the call
* @param ret1 pointer to an address where the return value
* of the hypercall should be saved, or NULL
* @return error status
*/
static inline uint64_t
__hypercall_fast_ret1(const uint64_t p1, const uint64_t p2, const uint64_t p3,
const uint64_t p4, const uint64_t p5, const uint64_t function_number,
uint64_t * const ret1)
__hypercall_fast(const uint64_t p1, const uint64_t p2, const uint64_t p3,
const uint64_t p4, const uint64_t p5, const uint64_t function_number)
{
register uint64_t a6 asm("o5") = function_number;
register uint64_t a1 asm("o0") = p1;
170,15 → 168,12
"i" (FAST_TRAP)
: "memory"
);
if (ret1 != NULL)
*ret1 = a2;
 
return a1;
}
 
/**
* Performs a fast hypervisor API call which return no value except for the
* error status.
* Performs a fast hypervisor API call which can return a value.
*
* @param p1 the 1st argument of the hypervisor API call
* @param p2 the 2nd argument of the hypervisor API call
186,14 → 181,20
* @param p4 the 4th argument of the hypervisor API call
* @param p5 the 5th argument of the hypervisor API call
* @param function_number function number of the call
* @param ret1 pointer to an address where the return value
* of the hypercall should be saved, or NULL
* @return error status
*/
static inline uint64_t
__hypercall_fast(const uint64_t p1, const uint64_t p2, const uint64_t p3,
const uint64_t p4, const uint64_t p5, const uint64_t function_number)
__hypercall_fast_ret1(const uint64_t p1, const uint64_t p2, const uint64_t p3,
const uint64_t p4, const uint64_t p5, const uint64_t function_number,
uint64_t * const ret1)
{
return __hypercall_fast_ret1(p1, p2, p3, p4, p5, function_number,
NULL);
uint64_t errno = __hypercall_fast(p1, p2, p3, p4, p5, function_number);
if (ret1 != NULL) {
asm volatile ("mov %%o1, %0\n" : "=r" (*ret1));
}
return errno;
}
 
/**
/branches/sparc/kernel/arch/sparc64/include/drivers/kbd.h
42,7 → 42,8
KBD_UNKNOWN,
KBD_Z8530,
KBD_NS16550,
KBD_SGCN
KBD_SGCN, /* Serengeti console keyboard */
KBD_SUN4V /* Niagara hypervisor's virtual standard input */
} kbd_type_t;
 
extern kbd_type_t kbd_type;
/branches/sparc/kernel/arch/sparc64/include/drivers/niagara.h
38,6 → 38,7
void niagara_grab(void);
void niagara_release(void);
void niagara_init(void);
void niagara_poll(void);
 
#endif