interrupts.cc (6046:8ac37d77fa74) | interrupts.cc (6050:852ba59fa8d9) |
---|---|
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 * --- 268 unchanged lines hidden (view full) --- 277 pendingUnmaskableInt = pendingNmi = true; 278 nmiVector = vector; 279 } else if (deliveryMode == DeliveryMode::ExtInt && !pendingExtInt) { 280 pendingExtInt = true; 281 extIntVector = vector; 282 } else if (deliveryMode == DeliveryMode::INIT && !pendingInit) { 283 pendingUnmaskableInt = pendingInit = true; 284 initVector = vector; | 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 * --- 268 unchanged lines hidden (view full) --- 277 pendingUnmaskableInt = pendingNmi = true; 278 nmiVector = vector; 279 } else if (deliveryMode == DeliveryMode::ExtInt && !pendingExtInt) { 280 pendingExtInt = true; 281 extIntVector = vector; 282 } else if (deliveryMode == DeliveryMode::INIT && !pendingInit) { 283 pendingUnmaskableInt = pendingInit = true; 284 initVector = vector; |
285 } else if (deliveryMode == DeliveryMode::SIPI && !pendingStartup) { 286 pendingUnmaskableInt = pendingStartup = true; 287 startupVector = vector; |
|
285 } 286 } 287 cpu->wakeup(); 288} 289 290 291void 292X86ISA::Interrupts::setCPU(BaseCPU * newCPU) --- 240 unchanged lines hidden (view full) --- 533 534X86ISA::Interrupts::Interrupts(Params * p) : 535 BasicPioDevice(p), IntDev(this), latency(p->pio_latency), clock(0), 536 apicTimerEvent(this), 537 pendingSmi(false), smiVector(0), 538 pendingNmi(false), nmiVector(0), 539 pendingExtInt(false), extIntVector(0), 540 pendingInit(false), initVector(0), | 288 } 289 } 290 cpu->wakeup(); 291} 292 293 294void 295X86ISA::Interrupts::setCPU(BaseCPU * newCPU) --- 240 unchanged lines hidden (view full) --- 536 537X86ISA::Interrupts::Interrupts(Params * p) : 538 BasicPioDevice(p), IntDev(this), latency(p->pio_latency), clock(0), 539 apicTimerEvent(this), 540 pendingSmi(false), smiVector(0), 541 pendingNmi(false), nmiVector(0), 542 pendingExtInt(false), extIntVector(0), 543 pendingInit(false), initVector(0), |
544 pendingStartup(false), startupVector(0), |
|
541 pendingUnmaskableInt(false) 542{ 543 pioSize = PageBytes; 544 memset(regs, 0, sizeof(regs)); 545 //Set the local apic DFR to the flat model. 546 regs[APIC_DESTINATION_FORMAT] = (uint32_t)(-1); 547 ISRV = 0; 548 IRRV = 0; --- 33 unchanged lines hidden (view full) --- 582 DPRINTF(LocalApic, "Generated SMI fault object.\n"); 583 return new SystemManagementInterrupt(); 584 } else if (pendingNmi) { 585 DPRINTF(LocalApic, "Generated NMI fault object.\n"); 586 return new NonMaskableInterrupt(nmiVector); 587 } else if (pendingInit) { 588 DPRINTF(LocalApic, "Generated INIT fault object.\n"); 589 return new InitInterrupt(initVector); | 545 pendingUnmaskableInt(false) 546{ 547 pioSize = PageBytes; 548 memset(regs, 0, sizeof(regs)); 549 //Set the local apic DFR to the flat model. 550 regs[APIC_DESTINATION_FORMAT] = (uint32_t)(-1); 551 ISRV = 0; 552 IRRV = 0; --- 33 unchanged lines hidden (view full) --- 586 DPRINTF(LocalApic, "Generated SMI fault object.\n"); 587 return new SystemManagementInterrupt(); 588 } else if (pendingNmi) { 589 DPRINTF(LocalApic, "Generated NMI fault object.\n"); 590 return new NonMaskableInterrupt(nmiVector); 591 } else if (pendingInit) { 592 DPRINTF(LocalApic, "Generated INIT fault object.\n"); 593 return new InitInterrupt(initVector); |
594 } else if (pendingStartup) { 595 DPRINTF(LocalApic, "Generating SIPI fault object.\n"); 596 return new StartupInterrupt(startupVector); |
|
590 } else { 591 panic("pendingUnmaskableInt set, but no unmaskable " 592 "ints were pending.\n"); 593 return NoFault; 594 } 595 } else if (pendingExtInt) { 596 DPRINTF(LocalApic, "Generated external interrupt fault object.\n"); 597 return new ExternalInterrupt(extIntVector); --- 13 unchanged lines hidden (view full) --- 611 DPRINTF(LocalApic, "SMI sent to core.\n"); 612 pendingSmi = false; 613 } else if (pendingNmi) { 614 DPRINTF(LocalApic, "NMI sent to core.\n"); 615 pendingNmi = false; 616 } else if (pendingInit) { 617 DPRINTF(LocalApic, "Init sent to core.\n"); 618 pendingInit = false; | 597 } else { 598 panic("pendingUnmaskableInt set, but no unmaskable " 599 "ints were pending.\n"); 600 return NoFault; 601 } 602 } else if (pendingExtInt) { 603 DPRINTF(LocalApic, "Generated external interrupt fault object.\n"); 604 return new ExternalInterrupt(extIntVector); --- 13 unchanged lines hidden (view full) --- 618 DPRINTF(LocalApic, "SMI sent to core.\n"); 619 pendingSmi = false; 620 } else if (pendingNmi) { 621 DPRINTF(LocalApic, "NMI sent to core.\n"); 622 pendingNmi = false; 623 } else if (pendingInit) { 624 DPRINTF(LocalApic, "Init sent to core.\n"); 625 pendingInit = false; |
626 } else if (pendingStartup) { 627 DPRINTF(LocalApic, "SIPI sent to core.\n"); 628 pendingStartup = false; |
|
619 } | 629 } |
620 if (!(pendingSmi || pendingNmi || pendingInit)) | 630 if (!(pendingSmi || pendingNmi || pendingInit || pendingStartup)) |
621 pendingUnmaskableInt = false; 622 } else if (pendingExtInt) { 623 pendingExtInt = false; 624 } else { 625 DPRINTF(LocalApic, "Interrupt %d sent to core.\n", IRRV); 626 // Mark the interrupt as "in service". 627 ISRV = IRRV; 628 setRegArrayBit(APIC_IN_SERVICE_BASE, ISRV); 629 // Clear it out of the IRR. 630 clearRegArrayBit(APIC_INTERRUPT_REQUEST_BASE, IRRV); 631 updateIRRV(); 632 } 633} 634 635X86ISA::Interrupts * 636X86LocalApicParams::create() 637{ 638 return new X86ISA::Interrupts(this); 639} | 631 pendingUnmaskableInt = false; 632 } else if (pendingExtInt) { 633 pendingExtInt = false; 634 } else { 635 DPRINTF(LocalApic, "Interrupt %d sent to core.\n", IRRV); 636 // Mark the interrupt as "in service". 637 ISRV = IRRV; 638 setRegArrayBit(APIC_IN_SERVICE_BASE, ISRV); 639 // Clear it out of the IRR. 640 clearRegArrayBit(APIC_INTERRUPT_REQUEST_BASE, IRRV); 641 updateIRRV(); 642 } 643} 644 645X86ISA::Interrupts * 646X86LocalApicParams::create() 647{ 648 return new X86ISA::Interrupts(this); 649} |