Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

mem_unit.h

Go to the documentation of this file.
00001 // AUTOMATICALLY GENERATED -- DO NOT EDIT!         -*- c++ -*-
00002 
00003 #ifndef mem_unit_h
00004 #define mem_unit_h
00005 
00006 #include "types.h"
00007 
00008 //
00009 // INTERFACE definition follows 
00010 //
00011 
00012 
00013 class Mem_unit
00014 {
00015 
00016 public:  
00019   static inline void tlb_flush();
00020   
00023   static inline void tlb_flush(Address addr);
00024 };
00025 
00026 //
00027 // IMPLEMENTATION of inline functions (and needed classes)
00028 //
00029 
00030 
00031 
00035 inline void
00036 Mem_unit::tlb_flush()
00037 {
00038   unsigned dummy;
00039   asm volatile ("mov %%cr3,%0; mov %0,%%cr3 " : "=r"(dummy));
00040 }
00041 
00042 
00043 
00047 inline void
00048 Mem_unit::tlb_flush(Address addr)
00049 {
00050   asm volatile ("invlpg %0" : : "m" (*(char*)addr) : "memory");
00051 }
00052 
00053 #endif // mem_unit_h

Generated on Mon Sep 26 14:20:11 2005 for Fiasco by  doxygen 1.4.2