tlb.cc (5555:07c10d7dd62d) tlb.cc (5570:13592d41f290)
1/*
2 * Copyright (c) 2001-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;

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

557 */
558 uint64_t tlbdata = tc->readMiscRegNoEffect(MISCREG_TLB_DATA);
559 Addr vaddr = req->getVaddr();
560 Addr size = req->getSize();
561 ASI asi;
562 asi = (ASI)req->getAsi();
563 bool implicit = false;
564 bool hpriv = bits(tlbdata,0,0);
1/*
2 * Copyright (c) 2001-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;

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

557 */
558 uint64_t tlbdata = tc->readMiscRegNoEffect(MISCREG_TLB_DATA);
559 Addr vaddr = req->getVaddr();
560 Addr size = req->getSize();
561 ASI asi;
562 asi = (ASI)req->getAsi();
563 bool implicit = false;
564 bool hpriv = bits(tlbdata,0,0);
565 bool unaligned = (vaddr & size-1);
565 bool unaligned = vaddr & (size - 1);
566
567 DPRINTF(TLB, "TLB: DTB Request to translate va=%#x size=%d asi=%#x\n",
568 vaddr, size, asi);
569
570 if (lookupTable.size() != 64 - freeList.size())
571 panic("Lookup table size: %d tlb size: %d\n", lookupTable.size(),
572 freeList.size());
573 if (asi == ASI_IMPLICIT)

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

796 if (!hpriv) {
797 writeSfsr(vaddr, write, Primary, true, IllegalAsi, asi);
798 if (priv)
799 return new DataAccessException;
800 else
801 return new PrivilegedAction;
802 }
803
566
567 DPRINTF(TLB, "TLB: DTB Request to translate va=%#x size=%d asi=%#x\n",
568 vaddr, size, asi);
569
570 if (lookupTable.size() != 64 - freeList.size())
571 panic("Lookup table size: %d tlb size: %d\n", lookupTable.size(),
572 freeList.size());
573 if (asi == ASI_IMPLICIT)

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

796 if (!hpriv) {
797 writeSfsr(vaddr, write, Primary, true, IllegalAsi, asi);
798 if (priv)
799 return new DataAccessException;
800 else
801 return new PrivilegedAction;
802 }
803
804 if (asi == ASI_SWVR_UDB_INTR_W && !write ||
805 asi == ASI_SWVR_UDB_INTR_R && write) {
804 if ((asi == ASI_SWVR_UDB_INTR_W && !write) ||
805 (asi == ASI_SWVR_UDB_INTR_R && write)) {
806 writeSfsr(vaddr, write, Primary, true, IllegalAsi, asi);
807 return new DataAccessException;
808 }
809
810 goto regAccessOk;
811
812
813handleScratchRegAccess:
814 if (vaddr > 0x38 || (vaddr >= 0x20 && vaddr < 0x30 && !hpriv)) {
815 writeSfsr(vaddr, write, Primary, true, IllegalAsi, asi);
816 return new DataAccessException;
817 }
818 goto regAccessOk;
819
820handleQueueRegAccess:
821 if (!priv && !hpriv) {
822 writeSfsr(vaddr, write, Primary, true, IllegalAsi, asi);
823 return new PrivilegedAction;
824 }
806 writeSfsr(vaddr, write, Primary, true, IllegalAsi, asi);
807 return new DataAccessException;
808 }
809
810 goto regAccessOk;
811
812
813handleScratchRegAccess:
814 if (vaddr > 0x38 || (vaddr >= 0x20 && vaddr < 0x30 && !hpriv)) {
815 writeSfsr(vaddr, write, Primary, true, IllegalAsi, asi);
816 return new DataAccessException;
817 }
818 goto regAccessOk;
819
820handleQueueRegAccess:
821 if (!priv && !hpriv) {
822 writeSfsr(vaddr, write, Primary, true, IllegalAsi, asi);
823 return new PrivilegedAction;
824 }
825 if (!hpriv && vaddr & 0xF || vaddr > 0x3f8 || vaddr < 0x3c0) {
825 if ((!hpriv && vaddr & 0xF) || vaddr > 0x3f8 || vaddr < 0x3c0) {
826 writeSfsr(vaddr, write, Primary, true, IllegalAsi, asi);
827 return new DataAccessException;
828 }
829 goto regAccessOk;
830
831handleSparcErrorRegAccess:
832 if (!hpriv) {
833 writeSfsr(vaddr, write, Primary, true, IllegalAsi, asi);

--- 596 unchanged lines hidden ---
826 writeSfsr(vaddr, write, Primary, true, IllegalAsi, asi);
827 return new DataAccessException;
828 }
829 goto regAccessOk;
830
831handleSparcErrorRegAccess:
832 if (!hpriv) {
833 writeSfsr(vaddr, write, Primary, true, IllegalAsi, asi);

--- 596 unchanged lines hidden ---