vtophys.hh (8730:0a742249f76b) | vtophys.hh (8758:8c9bd68c5a55) |
---|---|
1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * Copyright (c) 2007 MIPS Technologies, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 24 unchanged lines hidden (view full) --- 33 34#ifndef __ARCH_MIPS_VTOPHYS_H__ 35#define __ARCH_MIPS_VTOPHYS_H__ 36 37#include "arch/mips/isa_traits.hh" 38#include "arch/mips/utility.hh" 39 40class ThreadContext; | 1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * Copyright (c) 2007 MIPS Technologies, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 24 unchanged lines hidden (view full) --- 33 34#ifndef __ARCH_MIPS_VTOPHYS_H__ 35#define __ARCH_MIPS_VTOPHYS_H__ 36 37#include "arch/mips/isa_traits.hh" 38#include "arch/mips/utility.hh" 39 40class ThreadContext; |
41class FunctionalPort; |
|
41 42namespace MipsISA { | 42 43namespace MipsISA { |
43 inline Addr PteAddr(Addr a) { return (a & PteMask) << PteShift; } 44 45 // User Virtual 46 inline bool IsUSeg(Addr a) { return USegBase <= a && a <= USegEnd; } 47 48 inline bool IsKSeg0(Addr a) { return KSeg0Base <= a && a <= KSeg0End; } 49 50 inline Addr KSeg02Phys(Addr addr) { return addr & KSeg0Mask; } 51 52 inline Addr KSeg12Phys(Addr addr) { return addr & KSeg1Mask; } 53 54 inline bool IsKSeg1(Addr a) { return KSeg1Base <= a && a <= KSeg1End; } 55 56 inline bool IsKSSeg(Addr a) { return KSSegBase <= a && a <= KSSegEnd; } 57 58 inline bool IsKSeg3(Addr a) { return KSeg3Base <= a && a <= KSeg3End; } 59 60 | |
61 Addr vtophys(Addr vaddr); 62 Addr vtophys(ThreadContext *tc, Addr vaddr); 63 64}; 65#endif // __ARCH_MIPS_VTOPHYS_H__ 66 | 44 Addr vtophys(Addr vaddr); 45 Addr vtophys(ThreadContext *tc, Addr vaddr); 46 47}; 48#endif // __ARCH_MIPS_VTOPHYS_H__ 49 |