Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 37 → Rev 38

/SPARTAN/trunk/arch/ia32/include/asm.h
29,7 → 29,6
#ifndef __ia32_ASM_H__
#define __ia32_ASM_H__
 
#include <cpu.h>
#include <arch/types.h>
#include <typedefs.h>
#include <mm/page.h>
58,7 → 57,10
extern void halt_cpu(void);
extern void cpu_sleep(void);
 
extern void write_dr0(__u32 v);
extern inline __u32 read_dr0(void);
static inline void write_dr0(__u32 v);
static inline __u32 read_dr0(void);
 
inline void write_dr0(__u32 v) { __asm__ volatile ("movl %0,%%dr0\n" : : "r" (v)); }
inline __u32 read_dr0(void) { __u32 v; __asm__ volatile ("movl %%dr0,%0" : "=r" (v)); return v; }
 
#endif
/SPARTAN/trunk/arch/ia32/include/cpu.h
32,6 → 32,7
#include <config.h>
#include <typedefs.h>
#include <arch/pm.h>
#include <arch/asm.h>
 
#ifdef __SMP__
#define CPU_ID_ARCH (read_dr0())
/SPARTAN/trunk/arch/ia32/src/ia32.c
46,20 → 46,6
#include <arch/asm.h>
#include <arch/acpi/acpi.h>
 
void write_dr0(__u32 v)
{
__asm__("movl %0,%%dr0" : : "r" (v));
}
 
inline __u32 read_dr0(void)
{
__u32 v;
__asm__("movl %%dr0,%0\n" : "=r" (v));
return v;
}
 
void arch_pre_mm_init(void)
{
pm_init();