vtophys.cc (4070:74449a198a44) vtophys.cc (4172:141705d83494)
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;

--- 52 unchanged lines hidden (view full) ---

61 // table for us to walk around.
62 //
63 // 1. We are currently hyperpriv, return the address unmodified
64 // 2. The mmu is off return(ra->pa)
65 // 3. We are currently priv, use ctx0* tsbs to find the page
66 // 4. We are not priv, use ctxN0* tsbs to find the page
67 // For all accesses we check the tlbs first since it's possible that
68 // long standing pages (e.g. locked kernel mappings) won't be in the tsb
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;

--- 52 unchanged lines hidden (view full) ---

61 // table for us to walk around.
62 //
63 // 1. We are currently hyperpriv, return the address unmodified
64 // 2. The mmu is off return(ra->pa)
65 // 3. We are currently priv, use ctx0* tsbs to find the page
66 // 4. We are not priv, use ctxN0* tsbs to find the page
67 // For all accesses we check the tlbs first since it's possible that
68 // long standing pages (e.g. locked kernel mappings) won't be in the tsb
69 uint64_t tlbdata = tc->readMiscReg(MISCREG_TLB_DATA);
69 uint64_t tlbdata = tc->readMiscRegNoEffect(MISCREG_TLB_DATA);
70
71 bool hpriv = bits(tlbdata,0,0);
72 //bool priv = bits(tlbdata,2,2);
73 bool addr_mask = bits(tlbdata,3,3);
74 bool data_real = !bits(tlbdata,5,5);
75 bool inst_real = !bits(tlbdata,4,4);
76 bool ctx_zero = bits(tlbdata,18,16) > 0;
77 int part_id = bits(tlbdata,15,8);

--- 47 unchanged lines hidden ---
70
71 bool hpriv = bits(tlbdata,0,0);
72 //bool priv = bits(tlbdata,2,2);
73 bool addr_mask = bits(tlbdata,3,3);
74 bool data_real = !bits(tlbdata,5,5);
75 bool inst_real = !bits(tlbdata,4,4);
76 bool ctx_zero = bits(tlbdata,18,16) > 0;
77 int part_id = bits(tlbdata,15,8);

--- 47 unchanged lines hidden ---