Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 352 → Rev 353

/SPARTAN/trunk/arch/ia32/include/asm.h
42,9 → 42,6
extern __u16 inw(int port);
extern __u32 inl(int port);
 
extern void outw(int port, __u16 w);
extern void outl(int port, __u32 l);
 
extern void enable_l_apic_in_msr(void);
 
 
92,7 → 89,26
*/
static inline void outb(__u16 port, __u8 val) { __asm__ volatile ("outb %b0, %w1\n" : : "a" (val), "d" (port) ); }
 
/** Word to port
*
* Output word to port
*
* @param port Port to write to
* @param val Value to write
*/
static inline void outw(__u16 port, __u16 val) { __asm__ volatile ("outw %w0, %w1\n" : : "a" (val), "d" (port) ); }
 
 
 
/** Double word to port
*
* Output double word to port
*
* @param port Port to write to
* @param val Value to write
*/
static inline void outl(__u16 port, __u32 val) { __asm__ volatile ("outl %l0, %w1\n" : : "a" (val), "d" (port) ); }
 
/** Set priority level low
*
* Enable interrupts and return previous
/SPARTAN/trunk/arch/ia32/src/asm.S
40,8 → 40,6
.global inb
.global inw
.global inl
.global outw
.global outl
.global memcpy
.global memsetb
.global memsetw
192,36 → 190,6
ret
 
 
## I/O output (word)
#
# Send a word to I/O port.
#
outw:
push %eax
 
movl 8(%esp),%edx
movl 12(%esp),%eax
outw %ax,%dx
 
pop %eax
ret
 
 
## I/O output (dword)
#
# Send a dword to I/O port.
#
outl:
push %eax
 
movl 8(%esp),%edx
movl 12(%esp),%eax
outl %eax,%dx
 
pop %eax
ret
 
 
## Copy memory
#
# Copy a given number of bytes (3rd argument)