Deleted Added
sdiff udiff text old ( 5651:7f0c8006c3d7 ) new ( 5654:340254de2031 )
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 *

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

52 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
53 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54 *
55 * Authors: Gabe Black
56 */
57
58#include "arch/x86/apicregs.hh"
59#include "arch/x86/interrupts.hh"
60#include "cpu/base.hh"
61
62int
63divideFromConf(uint32_t conf)
64{
65 // This figures out what division we want from the division configuration
66 // register in the local APIC. The encoding is a little odd but it can
67 // be deciphered fairly easily.
68 int shift = ((conf & 0x8) >> 1) | (conf & 0x3);

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

237 reg, offset, gtoh(val));
238 setReg(reg, gtoh(val));
239 return latency;
240}
241
242Tick
243X86ISA::Interrupts::recvMessage(PacketPtr pkt)
244{
245 Addr offset = pkt->getAddr() - x86InterruptAddress(0, 0);
246 assert(pkt->cmd == MemCmd::MessageReq);
247 switch(offset)
248 {
249 case 0:
250 DPRINTF(LocalApic, "Got Trigger Interrupt message.\n");
251 break;
252 default:
253 panic("Local apic got unknown interrupt message at offset %#x.\n",
254 offset);
255 break;
256 }
257 delete pkt->req;
258 delete pkt;

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

409 break;
410 default:
411 break;
412 }
413 regs[reg] = newVal;
414 return;
415}
416
417X86ISA::Interrupts *
418X86LocalApicParams::create()
419{
420 return new X86ISA::Interrupts(this);
421}