intr_control.cc (8739:925f15f96322) intr_control.cc (8793:5f25086326ac)
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

43
44IntrControl::IntrControl(const Params *p)
45 : SimObject(p), sys(p->sys)
46{}
47
48void
49IntrControl::post(int cpu_id, int int_num, int index)
50{
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

43
44IntrControl::IntrControl(const Params *p)
45 : SimObject(p), sys(p->sys)
46{}
47
48void
49IntrControl::post(int cpu_id, int int_num, int index)
50{
51#if FULL_SYSTEM
52 DPRINTF(IntrControl, "post %d:%d (cpu %d)\n", int_num, index, cpu_id);
53 std::vector<ThreadContext *> &tcvec = sys->threadContexts;
54 BaseCPU *cpu = tcvec[cpu_id]->getCpuPtr();
55 cpu->postInterrupt(int_num, index);
51 DPRINTF(IntrControl, "post %d:%d (cpu %d)\n", int_num, index, cpu_id);
52 std::vector<ThreadContext *> &tcvec = sys->threadContexts;
53 BaseCPU *cpu = tcvec[cpu_id]->getCpuPtr();
54 cpu->postInterrupt(int_num, index);
56#else
57 panic("Called IntrControl::post in SE mode.\n");
58#endif
59}
60
61void
62IntrControl::clear(int cpu_id, int int_num, int index)
63{
55}
56
57void
58IntrControl::clear(int cpu_id, int int_num, int index)
59{
64#if FULL_SYSTEM
65 DPRINTF(IntrControl, "clear %d:%d (cpu %d)\n", int_num, index, cpu_id);
66 std::vector<ThreadContext *> &tcvec = sys->threadContexts;
67 BaseCPU *cpu = tcvec[cpu_id]->getCpuPtr();
68 cpu->clearInterrupt(int_num, index);
60 DPRINTF(IntrControl, "clear %d:%d (cpu %d)\n", int_num, index, cpu_id);
61 std::vector<ThreadContext *> &tcvec = sys->threadContexts;
62 BaseCPU *cpu = tcvec[cpu_id]->getCpuPtr();
63 cpu->clearInterrupt(int_num, index);
69#else
70 panic("Called IntrControl::clear in SE mode.\n");
71#endif
72}
73
74IntrControl *
75IntrControlParams::create()
76{
77 return new IntrControl(this);
78}
64}
65
66IntrControl *
67IntrControlParams::create()
68{
69 return new IntrControl(this);
70}