interrupts.cc (5697:83eee68e41bf) | interrupts.cc (5704:98224505352a) |
---|---|
1/* 2 * Copyright (c) 2008 The Hewlett-Packard Development Company 3 * All rights reserved. 4 * 5 * Redistribution and use of this software in source and binary forms, 6 * with or without modification, are permitted provided that the 7 * following conditions are met: 8 * --- 456 unchanged lines hidden (view full) --- 465 default: 466 break; 467 } 468 regs[reg] = newVal; 469 return; 470} 471 472bool | 1/* 2 * Copyright (c) 2008 The Hewlett-Packard Development Company 3 * All rights reserved. 4 * 5 * Redistribution and use of this software in source and binary forms, 6 * with or without modification, are permitted provided that the 7 * following conditions are met: 8 * --- 456 unchanged lines hidden (view full) --- 465 default: 466 break; 467 } 468 regs[reg] = newVal; 469 return; 470} 471 472bool |
473X86ISA::Interrupts::check_interrupts(ThreadContext * tc) const | 473X86ISA::Interrupts::checkInterrupts(ThreadContext *tc) const |
474{ 475 RFLAGS rflags = tc->readMiscRegNoEffect(MISCREG_RFLAGS); 476 if (pendingUnmaskableInt) { 477 DPRINTF(LocalApic, "Reported pending unmaskable interrupt.\n"); 478 return true; 479 } 480 if (rflags.intf) { 481 if (pendingExtInt) { --- 5 unchanged lines hidden (view full) --- 487 DPRINTF(LocalApic, "Reported pending regular interrupt.\n"); 488 return true; 489 } 490 } 491 return false; 492} 493 494Fault | 474{ 475 RFLAGS rflags = tc->readMiscRegNoEffect(MISCREG_RFLAGS); 476 if (pendingUnmaskableInt) { 477 DPRINTF(LocalApic, "Reported pending unmaskable interrupt.\n"); 478 return true; 479 } 480 if (rflags.intf) { 481 if (pendingExtInt) { --- 5 unchanged lines hidden (view full) --- 487 DPRINTF(LocalApic, "Reported pending regular interrupt.\n"); 488 return true; 489 } 490 } 491 return false; 492} 493 494Fault |
495X86ISA::Interrupts::getInterrupt(ThreadContext * tc) | 495X86ISA::Interrupts::getInterrupt(ThreadContext *tc) |
496{ | 496{ |
497 assert(check_interrupts(tc)); | 497 assert(checkInterrupts(tc)); |
498 // These are all probably fairly uncommon, so we'll make them easier to 499 // check for. 500 if (pendingUnmaskableInt) { 501 if (pendingSmi) { 502 DPRINTF(LocalApic, "Generated SMI fault object.\n"); 503 return new SystemManagementInterrupt(); 504 } else if (pendingNmi) { 505 DPRINTF(LocalApic, "Generated NMI fault object.\n"); --- 12 unchanged lines hidden (view full) --- 518 } else { 519 DPRINTF(LocalApic, "Generated regular interrupt fault object.\n"); 520 // The only thing left are fixed and lowest priority interrupts. 521 return new ExternalInterrupt(IRRV); 522 } 523} 524 525void | 498 // These are all probably fairly uncommon, so we'll make them easier to 499 // check for. 500 if (pendingUnmaskableInt) { 501 if (pendingSmi) { 502 DPRINTF(LocalApic, "Generated SMI fault object.\n"); 503 return new SystemManagementInterrupt(); 504 } else if (pendingNmi) { 505 DPRINTF(LocalApic, "Generated NMI fault object.\n"); --- 12 unchanged lines hidden (view full) --- 518 } else { 519 DPRINTF(LocalApic, "Generated regular interrupt fault object.\n"); 520 // The only thing left are fixed and lowest priority interrupts. 521 return new ExternalInterrupt(IRRV); 522 } 523} 524 525void |
526X86ISA::Interrupts::updateIntrInfo(ThreadContext * tc) | 526X86ISA::Interrupts::updateIntrInfo(ThreadContext *tc) |
527{ | 527{ |
528 assert(check_interrupts(tc)); | 528 assert(checkInterrupts(tc)); |
529 if (pendingUnmaskableInt) { 530 if (pendingSmi) { 531 DPRINTF(LocalApic, "SMI sent to core.\n"); 532 pendingSmi = false; 533 } else if (pendingNmi) { 534 DPRINTF(LocalApic, "NMI sent to core.\n"); 535 pendingNmi = false; 536 } else if (pendingInit) { --- 23 unchanged lines hidden --- | 529 if (pendingUnmaskableInt) { 530 if (pendingSmi) { 531 DPRINTF(LocalApic, "SMI sent to core.\n"); 532 pendingSmi = false; 533 } else if (pendingNmi) { 534 DPRINTF(LocalApic, "NMI sent to core.\n"); 535 pendingNmi = false; 536 } else if (pendingInit) { --- 23 unchanged lines hidden --- |