Overview   API Reference  

api/l4util.h

00001 #if !defined(__L4VMM_INCLUDE_API_L4UTIL_H__)
00002 #define __L4VMM_INCLUDE_API_L4UTIL_H__
00003 
00004 //
00005 // define a macro to tell whether a dedicated I/O space is available.
00006 //     used in compat/l4util.h too.
00007 //
00008 #if defined(ARCH_x86) || defined(ARCH_amd64)
00009     #define L4VMM_ARCH_HAS_IOSPACE  1
00010 #else
00011     #define L4VMM_ARCH_HAS_IOSPACE  0
00012 #endif
00013 
00014 //
00015 // read & write I/O ports, using the same prototypes as the functions in l4util,
00016 //     for architectures that support a dedicated I/O space
00017 //
00018 #if L4VMM_ARCH_HAS_IOSPACE
00019 
00020 //
00021 // L4vmm includes
00022 //
00023 #include <l4/vmm/types.h>
00024 
00025 EXTERN_C_BEGIN
00026 
00035 L4_CV l4_uint8_t l4vmm_in8(l4_port_t port);
00036 
00045 L4_CV l4_uint16_t l4vmm_in16(l4_port_t port);
00046 
00055 L4_CV l4_uint32_t l4vmm_in32(l4_port_t port);
00056 
00065 L4_CV void l4vmm_out8(l4_uint8_t value, l4_port_t port);
00066 
00075 L4_CV void l4vmm_out16(l4_uint16_t value, l4_port_t port);
00076 
00085 L4_CV void l4vmm_out32(l4_uint32_t value, l4_port_t port);
00086 
00096 L4_CV void l4vmm_ins8(l4_port_t port, l4_uint8_t *dst, l4_umword_t num);
00097 
00107 L4_CV void l4vmm_ins16(l4_port_t port, l4_uint16_t *dst, l4_umword_t num);
00108 
00118 L4_CV void l4vmm_ins32(l4_port_t port, l4_uint32_t *dst, l4_umword_t num);
00119 
00129 L4_CV void l4vmm_outs8(l4_port_t port, const l4_uint8_t *src, l4_umword_t num);
00130 
00140 L4_CV void l4vmm_outs16(l4_port_t port, const l4_uint16_t *src, l4_umword_t num);
00141 
00151 L4_CV void l4vmm_outs32(l4_port_t port, const l4_uint32_t *src, l4_umword_t num);
00152 
00153 EXTERN_C_END
00154 
00155 #endif /* L4VMM_ARCH_HAS_IOSPACE */
00156 #endif
00157 
00158 // ***** end of source ***** //
00159 

L4vmm Reference Manual, written by Mario Schwalbe  © 2006-2008