ACPI.py revision 5825
12068SN/A# Copyright (c) 2008 The Hewlett-Packard Development Company
22068SN/A# All rights reserved.
32068SN/A#
42068SN/A# Redistribution and use of this software in source and binary forms,
52068SN/A# with or without modification, are permitted provided that the
62068SN/A# following conditions are met:
72068SN/A#
82068SN/A# The software must be used only for Non-Commercial Use which means any
92068SN/A# use which is NOT directed to receiving any direct monetary
102068SN/A# compensation for, or commercial advantage from such use.  Illustrative
112068SN/A# examples of non-commercial use are academic research, personal study,
122068SN/A# teaching, education and corporate research & development.
132068SN/A# Illustrative examples of commercial use are distributing products for
142068SN/A# commercial advantage and providing services using the software for
152068SN/A# commercial advantage.
162068SN/A#
172068SN/A# If you wish to use this software or functionality therein that may be
182068SN/A# covered by patents for commercial use, please contact:
192068SN/A#     Director of Intellectual Property Licensing
202068SN/A#     Office of Strategy and Technology
212068SN/A#     Hewlett-Packard Company
222068SN/A#     1501 Page Mill Road
232068SN/A#     Palo Alto, California  94304
242068SN/A#
252068SN/A# Redistributions of source code must retain the above copyright notice,
262068SN/A# this list of conditions and the following disclaimer.  Redistributions
272068SN/A# in binary form must reproduce the above copyright notice, this list of
282665Ssaidi@eecs.umich.edu# conditions and the following disclaimer in the documentation and/or
292665Ssaidi@eecs.umich.edu# other materials provided with the distribution.  Neither the name of
302068SN/A# the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
312649Ssaidi@eecs.umich.edu# contributors may be used to endorse or promote products derived from
322649Ssaidi@eecs.umich.edu# this software without specific prior written permission.  No right of
332649Ssaidi@eecs.umich.edu# sublicense is granted herewith.  Derivatives of the software and
342649Ssaidi@eecs.umich.edu# output created using the software may be prepared, but only for
357799Sgblack@eecs.umich.edu# Non-Commercial Uses.  Derivatives of the software may be shared with
367799Sgblack@eecs.umich.edu# others provided: (i) the others agree to abide by the list of
377799Sgblack@eecs.umich.edu# conditions herein which includes the Non-Commercial Use restrictions;
382649Ssaidi@eecs.umich.edu# and (ii) such Derivatives of the software include the above copyright
392649Ssaidi@eecs.umich.edu# notice to acknowledge the contribution from this software where
402068SN/A# applicable, this list of conditions and the disclaimer below.
412068SN/A#
422068SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
432090SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
442090SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
4510196SCurtis.Dunham@arm.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
462068SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
477799Sgblack@eecs.umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
488738Sgblack@eecs.umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4910474Sandreas.hansson@arm.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
502068SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
512068SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
522068SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
532068SN/A#
542068SN/A# Authors: Gabe Black
552068SN/A
562068SN/Afrom m5.params import *
572068SN/Afrom m5.SimObject import SimObject
582068SN/A
592068SN/A# ACPI description table header. Subclasses contain and handle the actual
602068SN/A# contents as appropriate for that type of table.
612068SN/Aclass X86ACPISysDescTable(SimObject):
622068SN/A    type = 'X86ACPISysDescTable'
632068SN/A    cxx_class = 'X86ISA::ACPI::SysDescTable'
642068SN/A    abstract = True
652068SN/A
662068SN/A    oem_id = Param.String('', 'string identifying the oem')
677799Sgblack@eecs.umich.edu    oem_table_id = Param.String('', 'oem table ID')
682068SN/A    oem_revision = Param.UInt32(0, 'oem revision number for the table')
697799Sgblack@eecs.umich.edu
707799Sgblack@eecs.umich.edu    creator_id = Param.String('',
717799Sgblack@eecs.umich.edu            'string identifying the generator of the table')
722068SN/A    creator_revision = Param.UInt32(0,
732068SN/A            'revision number for the creator of the table')
742068SN/A
752068SN/Aclass X86ACPIRSDT(X86ACPISysDescTable):
762068SN/A    type = 'X86ACPIRSDT'
772068SN/A    cxx_class = 'X86ISA::ACPI::RSDT'
782068SN/A
792068SN/A    entries = VectorParam.X86ACPISysDescTable([], 'system description tables')
807799Sgblack@eecs.umich.edu
812068SN/Aclass X86ACPIXSDT(X86ACPISysDescTable):
827799Sgblack@eecs.umich.edu    type = 'X86ACPIXSDT'
837799Sgblack@eecs.umich.edu    cxx_class = 'X86ISA::ACPI::XSDT'
842068SN/A
852068SN/A    entries = VectorParam.X86ACPISysDescTable([], 'system description tables')
862068SN/A
872068SN/A# Root System Description Pointer Structure
882068SN/Aclass X86ACPIRSDP(SimObject):
892068SN/A    type = 'X86ACPIRSDP'
902068SN/A    cxx_class = 'X86ISA::ACPI::RSDP'
912068SN/A
922068SN/A    oem_id = Param.String('', 'string identifying the oem')
932068SN/A    # Because 0 encodes ACPI 1.0, 2 encodes ACPI 3.0, the version implemented
942068SN/A    # here.
952068SN/A    revision = Param.UInt8(2, 'revision of ACPI being used, zero indexed')
962068SN/A
972068SN/A    rsdt = Param.X86ACPIRSDT(NULL, 'root system description table')
982068SN/A    xsdt = Param.X86ACPIXSDT(X86ACPIXSDT(),
992068SN/A            'extended system description table')
1002068SN/A