Deleted Added
sdiff udiff text old ( 3578:6ef440cfc250 ) new ( 3585:774b5b26a51a )
full compact
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;

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

488 {
489 CWP = (CWP + NWindows) % NWindows;
490 tc->setMiscRegWithEffect(MISCREG_CWP, CWP);
491 }
492}
493
494void getREDVector(Addr & PC, Addr & NPC)
495{
496 const Addr RSTVAddr = 0xFFFFFFFFF0000000ULL;
497 PC = RSTVAddr | 0xA0;
498 NPC = PC + sizeof(MachInst);
499}
500
501void getHyperVector(Addr & PC, Addr & NPC, MiscReg TT)
502{
503 Addr HTBA ;
504 PC = (HTBA & ~mask(14)) | ((TT << 5) & mask(14));
505 NPC = PC + sizeof(MachInst);
506}
507
508void getPrivVector(Addr & PC, Addr & NPC, MiscReg TT, MiscReg TL)
509{
510 Addr TBA ;
511 PC = (TBA & ~mask(15)) |
512 (TL > 1 ? (1 << 14) : 0) |
513 ((TT << 5) & mask(14));
514 NPC = PC + sizeof(MachInst);
515}
516
517#if FULL_SYSTEM
518

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

551 //Do error_state somehow?
552 //Probably inject a WDR fault using the interrupt mechanism.
553 //What should the PC and NPC be set to?
554 }
555 else if(TL > MaxPTL && level == Privileged)
556 {
557 //guest_watchdog fault
558 doNormalFault(tc, trapType(), true);
559 getHyperVector(PC, NPC, 2);
560 }
561 else if(level == Hyperprivileged)
562 {
563 doNormalFault(tc, trapType(), true);
564 getHyperVector(PC, NPC, trapType());
565 }
566 else
567 {
568 doNormalFault(tc, trapType(), false);
569 getPrivVector(PC, NPC, trapType(), TL+1);
570 }
571
572 tc->setPC(PC);
573 tc->setNextPC(NPC);
574 tc->setNextNPC(NPC + sizeof(MachInst));
575}
576
577void PowerOnReset::invoke(ThreadContext * tc)

--- 95 unchanged lines hidden ---