Deleted Added
sdiff udiff text old ( 6046:8ac37d77fa74 ) new ( 6050:852ba59fa8d9 )
full compact
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 }
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),
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);
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;
619 }
620 if (!(pendingSmi || pendingNmi || pendingInit))
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}