utility.hh (10417:710ee116eb68) | utility.hh (11294:a368064a2ab5) |
---|---|
1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 64 unchanged lines hidden (view full) --- 73//////////////////////////////////////////////////////////////////////// 74// 75// Translation stuff 76// 77 78inline Addr PteAddr(Addr a) { return (a & PteMask) << PteShift; } 79 80// User Virtual | 1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 64 unchanged lines hidden (view full) --- 73//////////////////////////////////////////////////////////////////////// 74// 75// Translation stuff 76// 77 78inline Addr PteAddr(Addr a) { return (a & PteMask) << PteShift; } 79 80// User Virtual |
81inline bool IsUSeg(Addr a) { return USegBase <= a && a <= USegEnd; } | 81inline bool IsUSeg(Addr a) { assert(USegBase == 0); return a <= USegEnd; } |
82 83// Kernel Direct Mapped 84inline bool IsK0Seg(Addr a) { return K0SegBase <= a && a <= K0SegEnd; } 85inline Addr K0Seg2Phys(Addr addr) { return addr & ~K0SegBase; } 86 87// Kernel Virtual 88inline bool IsK1Seg(Addr a) { return K1SegBase <= a && a <= K1SegEnd; } 89 --- 32 unchanged lines hidden --- | 82 83// Kernel Direct Mapped 84inline bool IsK0Seg(Addr a) { return K0SegBase <= a && a <= K0SegEnd; } 85inline Addr K0Seg2Phys(Addr addr) { return addr & ~K0SegBase; } 86 87// Kernel Virtual 88inline bool IsK1Seg(Addr a) { return K1SegBase <= a && a <= K1SegEnd; } 89 --- 32 unchanged lines hidden --- |