From c75d185d8ada4345ac3323b6603fedc4a79c94cc Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 11 Sep 2019 16:45:41 -0700 Subject: x86: Turn the local APIC Interrupts class into a SimObject. It will no longer be a PioDevice or a ClockedObject, but will carry forward the little bits and pieces of those classes that it was using. Those are a PIO port for memory mapped register accesses, and a clock domain parameter for setting the apic tick frequency. This brings the x86 Interrupts class in line with the Interrupts of the other ISAs so that they can inherit from a standard base class. Change-Id: I6b25fa21911b39a756e0cf9408c5489a81d6ca56 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20829 Reviewed-by: Jason Lowe-Power Reviewed-by: Brandon Potter Maintainer: Jason Lowe-Power Tested-by: kokoro --- src/arch/x86/X86LocalApic.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/arch/x86/X86LocalApic.py') diff --git a/src/arch/x86/X86LocalApic.py b/src/arch/x86/X86LocalApic.py index 456409a62..914f29766 100644 --- a/src/arch/x86/X86LocalApic.py +++ b/src/arch/x86/X86LocalApic.py @@ -42,10 +42,10 @@ from m5.defines import buildEnv from m5.params import * from m5.proxy import * -from m5.objects.Device import PioDevice from m5.objects.ClockDomain import DerivedClockDomain +from m5.SimObject import SimObject -class X86LocalApic(PioDevice): +class X86LocalApic(SimObject): type = 'X86LocalApic' cxx_class = 'X86ISA::Interrupts' cxx_header = 'arch/x86/interrupts.hh' @@ -53,6 +53,8 @@ class X86LocalApic(PioDevice): int_slave = SlavePort("Port for receiving interrupt messages") int_latency = Param.Latency('1ns', \ "Latency for an interrupt to propagate through this device.") + pio = SlavePort("Programmed I/O port") + system = Param.System(Parent.any, "System this device is part of") pio_latency = Param.Latency('100ns', 'Programmed IO latency') @@ -60,5 +62,6 @@ class X86LocalApic(PioDevice): # which we assume is 1/16th the rate of the CPU clock. I don't think this # is a hard rule, but seems to be true in practice. This can be overriden # in configs that use it. - clk_domain = DerivedClockDomain( - clk_domain=Parent.clk_domain, clk_divider=16) + clk_domain = Param.DerivedClockDomain( + DerivedClockDomain(clk_domain=Parent.clk_domain, clk_divider=16), + "The clock for the local APIC. Should not be modified.") -- cgit v1.2.3