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 } else if (deliveryMode == DeliveryMode::SIPI && !pendingStartup) {
286 pendingUnmaskableInt = pendingStartup = true;
287 startupVector = vector;
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),
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);
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;
629 }
630 if (!(pendingSmi || pendingNmi || pendingInit || pendingStartup))
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}