X86LocalApic.py revision 8742
15647Sgblack@eecs.umich.edu# Copyright (c) 2008 The Regents of The University of Michigan
25647Sgblack@eecs.umich.edu# All rights reserved.
35647Sgblack@eecs.umich.edu#
45647Sgblack@eecs.umich.edu# Redistribution and use in source and binary forms, with or without
55647Sgblack@eecs.umich.edu# modification, are permitted provided that the following conditions are
65647Sgblack@eecs.umich.edu# met: redistributions of source code must retain the above copyright
75647Sgblack@eecs.umich.edu# notice, this list of conditions and the following disclaimer;
85647Sgblack@eecs.umich.edu# redistributions in binary form must reproduce the above copyright
95647Sgblack@eecs.umich.edu# notice, this list of conditions and the following disclaimer in the
105647Sgblack@eecs.umich.edu# documentation and/or other materials provided with the distribution;
115647Sgblack@eecs.umich.edu# neither the name of the copyright holders nor the names of its
125647Sgblack@eecs.umich.edu# contributors may be used to endorse or promote products derived from
135647Sgblack@eecs.umich.edu# this software without specific prior written permission.
145647Sgblack@eecs.umich.edu#
155647Sgblack@eecs.umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
165647Sgblack@eecs.umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
175647Sgblack@eecs.umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
185647Sgblack@eecs.umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
195647Sgblack@eecs.umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
205647Sgblack@eecs.umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
215647Sgblack@eecs.umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
225647Sgblack@eecs.umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
235647Sgblack@eecs.umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
245647Sgblack@eecs.umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
255647Sgblack@eecs.umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
265647Sgblack@eecs.umich.edu#
275647Sgblack@eecs.umich.edu# Authors: Gabe Black
285647Sgblack@eecs.umich.edu
298742Sgblack@eecs.umich.edufrom m5.defines import buildEnv
305647Sgblack@eecs.umich.edufrom m5.params import *
318742Sgblack@eecs.umich.edufrom m5.proxy import *
325647Sgblack@eecs.umich.edufrom Device import BasicPioDevice
335647Sgblack@eecs.umich.edu
345647Sgblack@eecs.umich.educlass X86LocalApic(BasicPioDevice):
355647Sgblack@eecs.umich.edu    type = 'X86LocalApic'
365647Sgblack@eecs.umich.edu    cxx_class = 'X86ISA::Interrupts'
375647Sgblack@eecs.umich.edu    pio_latency = Param.Latency('1ns', 'Programmed IO latency in simticks')
385651Sgblack@eecs.umich.edu    int_port = Port("Port for sending and receiving interrupt messages")
397900Shestness@cs.utexas.edu    int_latency = Param.Latency('1ns', \
407900Shestness@cs.utexas.edu            "Latency for an interrupt to propagate through this device.")
418742Sgblack@eecs.umich.edu    if buildEnv['FULL_SYSTEM']: # No platform in SE mode.
428742Sgblack@eecs.umich.edu        platform = Param.Platform(Parent.any,
438742Sgblack@eecs.umich.edu                "Platform this device is part of.")
44