interrupts.cc (6136:4f8af2f3185f) interrupts.cc (6137:d3ee4e0d690c)
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 *

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

54 *
55 * Authors: Gabe Black
56 */
57
58#include "arch/x86/apicregs.hh"
59#include "arch/x86/interrupts.hh"
60#include "arch/x86/intmessage.hh"
61#include "cpu/base.hh"
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 *

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

54 *
55 * Authors: Gabe Black
56 */
57
58#include "arch/x86/apicregs.hh"
59#include "arch/x86/interrupts.hh"
60#include "arch/x86/intmessage.hh"
61#include "cpu/base.hh"
62#include "dev/x86/i82094aa.hh"
63#include "dev/x86/pc.hh"
64#include "dev/x86/south_bridge.hh"
62#include "mem/packet_access.hh"
63#include "sim/system.hh"
64
65int
66divideFromConf(uint32_t conf)
67{
68 // This figures out what division we want from the division configuration
69 // register in the local APIC. The encoding is a little odd but it can

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

301 " with different IDs.\n");
302 }
303 cpu = newCPU;
304 initialApicId = cpu->cpuId();
305 regs[APIC_ID] = (initialApicId << 24);
306}
307
308
65#include "mem/packet_access.hh"
66#include "sim/system.hh"
67
68int
69divideFromConf(uint32_t conf)
70{
71 // This figures out what division we want from the division configuration
72 // register in the local APIC. The encoding is a little odd but it can

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

304 " with different IDs.\n");
305 }
306 cpu = newCPU;
307 initialApicId = cpu->cpuId();
308 regs[APIC_ID] = (initialApicId << 24);
309}
310
311
312void
313X86ISA::Interrupts::init()
314{
315 BasicPioDevice::init();
316 Pc * pc = dynamic_cast<Pc *>(platform);
317 assert(pc);
318 pc->southBridge->ioApic->registerLocalApic(initialApicId, this);
319}
320
321
309Tick
310X86ISA::Interrupts::recvMessage(PacketPtr pkt)
311{
312 Addr offset = pkt->getAddr() - x86InterruptAddress(initialApicId, 0);
313 assert(pkt->cmd == MemCmd::MessageReq);
314 switch(offset)
315 {
316 case 0:

--- 378 unchanged lines hidden ---
322Tick
323X86ISA::Interrupts::recvMessage(PacketPtr pkt)
324{
325 Addr offset = pkt->getAddr() - x86InterruptAddress(initialApicId, 0);
326 assert(pkt->cmd == MemCmd::MessageReq);
327 switch(offset)
328 {
329 case 0:

--- 378 unchanged lines hidden ---