vtophys.cc (6022:410194bb3049) | vtophys.cc (7741:340b6f01d69b) |
---|---|
1/* 2 * Copyright (c) 2002-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; --- 57 unchanged lines hidden (view full) --- 66 // 2. The mmu is off return(ra->pa) 67 // 3. We are currently priv, use ctx0* tsbs to find the page 68 // 4. We are not priv, use ctxN0* tsbs to find the page 69 // For all accesses we check the tlbs first since it's possible that 70 // long standing pages (e.g. locked kernel mappings) won't be in the tsb 71 uint64_t tlbdata = tc->readMiscRegNoEffect(MISCREG_TLB_DATA); 72 73 bool hpriv = bits(tlbdata,0,0); | 1/* 2 * Copyright (c) 2002-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; --- 57 unchanged lines hidden (view full) --- 66 // 2. The mmu is off return(ra->pa) 67 // 3. We are currently priv, use ctx0* tsbs to find the page 68 // 4. We are not priv, use ctxN0* tsbs to find the page 69 // For all accesses we check the tlbs first since it's possible that 70 // long standing pages (e.g. locked kernel mappings) won't be in the tsb 71 uint64_t tlbdata = tc->readMiscRegNoEffect(MISCREG_TLB_DATA); 72 73 bool hpriv = bits(tlbdata,0,0); |
74 //bool priv = bits(tlbdata,2,2); | 74 // bool priv = bits(tlbdata,2,2); |
75 bool addr_mask = bits(tlbdata,3,3); 76 bool data_real = !bits(tlbdata,5,5); 77 bool inst_real = !bits(tlbdata,4,4); 78 bool ctx_zero = bits(tlbdata,18,16) > 0; 79 int part_id = bits(tlbdata,15,8); 80 int pri_context = bits(tlbdata,47,32); | 75 bool addr_mask = bits(tlbdata,3,3); 76 bool data_real = !bits(tlbdata,5,5); 77 bool inst_real = !bits(tlbdata,4,4); 78 bool ctx_zero = bits(tlbdata,18,16) > 0; 79 int part_id = bits(tlbdata,15,8); 80 int pri_context = bits(tlbdata,47,32); |
81 //int sec_context = bits(tlbdata,63,48); | 81 // int sec_context = bits(tlbdata,63,48); |
82 83 FunctionalPort *mem = tc->getPhysPort(); 84 TLB* itb = tc->getITBPtr(); 85 TLB* dtb = tc->getDTBPtr(); 86 TlbEntry* tbe; 87 PageTableEntry pte; 88 Addr tsbs[4]; 89 Addr va_tag; --- 43 unchanged lines hidden --- | 82 83 FunctionalPort *mem = tc->getPhysPort(); 84 TLB* itb = tc->getITBPtr(); 85 TLB* dtb = tc->getDTBPtr(); 86 TlbEntry* tbe; 87 PageTableEntry pte; 88 Addr tsbs[4]; 89 Addr va_tag; --- 43 unchanged lines hidden --- |