VirtIOConsole.py revision 13665
110448Snilay@cs.wisc.edu# -*- mode:python -*- 210448Snilay@cs.wisc.edu 310448Snilay@cs.wisc.edu# Copyright (c) 2014 ARM Limited 410448Snilay@cs.wisc.edu# All rights reserved. 510448Snilay@cs.wisc.edu# 610448Snilay@cs.wisc.edu# The license below extends only to copyright in the software and shall 710448Snilay@cs.wisc.edu# not be construed as granting a license to any other intellectual 810448Snilay@cs.wisc.edu# property including but not limited to intellectual property relating 910448Snilay@cs.wisc.edu# to a hardware implementation of the functionality of the software 1010448Snilay@cs.wisc.edu# licensed hereunder. You may use the software subject to the license 1110448Snilay@cs.wisc.edu# terms below provided that you ensure that this notice is replicated 1210448Snilay@cs.wisc.edu# unmodified and in its entirety in all distributions of the software, 1310448Snilay@cs.wisc.edu# modified or unmodified, in source code or in binary form. 1410448Snilay@cs.wisc.edu# 1510448Snilay@cs.wisc.edu# Redistribution and use in source and binary forms, with or without 1610448Snilay@cs.wisc.edu# modification, are permitted provided that the following conditions are 1710448Snilay@cs.wisc.edu# met: redistributions of source code must retain the above copyright 1810448Snilay@cs.wisc.edu# notice, this list of conditions and the following disclaimer; 1910448Snilay@cs.wisc.edu# redistributions in binary form must reproduce the above copyright 2010448Snilay@cs.wisc.edu# notice, this list of conditions and the following disclaimer in the 2110448Snilay@cs.wisc.edu# documentation and/or other materials provided with the distribution; 2210447Snilay@cs.wisc.edu# neither the name of the copyright holders nor the names of its 2310447Snilay@cs.wisc.edu# contributors may be used to endorse or promote products derived from 2410447Snilay@cs.wisc.edu# this software without specific prior written permission. 2510447Snilay@cs.wisc.edu# 2610447Snilay@cs.wisc.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 2710447Snilay@cs.wisc.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 2810447Snilay@cs.wisc.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2910447Snilay@cs.wisc.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 3010447Snilay@cs.wisc.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 3110447Snilay@cs.wisc.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 3210447Snilay@cs.wisc.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 3310447Snilay@cs.wisc.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 3410447Snilay@cs.wisc.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 3510447Snilay@cs.wisc.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 3610447Snilay@cs.wisc.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3710447Snilay@cs.wisc.edu# 3810447Snilay@cs.wisc.edu# Authors: Andreas Sandberg 3910447Snilay@cs.wisc.edu 4010447Snilay@cs.wisc.edufrom m5.params import * 4110447Snilay@cs.wisc.edufrom m5.proxy import * 4210447Snilay@cs.wisc.edufrom m5.objects.VirtIO import VirtIODeviceBase 4310447Snilay@cs.wisc.edufrom m5.objects.Serial import SerialDevice 4410447Snilay@cs.wisc.edu 4510447Snilay@cs.wisc.educlass VirtIOConsole(VirtIODeviceBase): 4610447Snilay@cs.wisc.edu type = 'VirtIOConsole' 4710447Snilay@cs.wisc.edu cxx_header = 'dev/virtio/console.hh' 4810447Snilay@cs.wisc.edu 4910447Snilay@cs.wisc.edu qRecvSize = Param.Unsigned(16, "Receive queue size (descriptors)") 5010447Snilay@cs.wisc.edu qTransSize = Param.Unsigned(16, "Transmit queue size (descriptors)") 5110447Snilay@cs.wisc.edu 5210447Snilay@cs.wisc.edu device = Param.SerialDevice("Serial device attached to this device") 5310447Snilay@cs.wisc.edu