1 //
2 // Copyright (c) 2010-2020 Antmicro
3 //
4 // This file is licensed under the MIT License.
5 // Full license text is available in 'licenses/MIT.txt'.
6 //
7 using System.Collections.Generic;
8 using Antmicro.Renode.Backends.Display;
9 using Antmicro.Renode.Core;
10 using Antmicro.Renode.Core.Structure;
11 using Antmicro.Renode.Core.Structure.Registers;
12 using Antmicro.Renode.Logging;
13 using Antmicro.Renode.Peripherals.Bus;
14 using Antmicro.Renode.Peripherals.PCI.BAR;
15 
16 using System;
17 namespace Antmicro.Renode.Peripherals.PCI
18 {
19     //This is a  implementation of `Intel 82371SB`
20     [AllowedTranslations(AllowedTranslation.WordToDoubleWord)]
21     public class PIIX: PCIeEndpoint
22     {
PIIX(PCIHost_Bridge parent)23         public PIIX(PCIHost_Bridge parent) : base(parent)
24         {
25             VendorId = 0x8086;
26             DeviceId = 0x7010;
27             ClassCode = 0x0101;
28 
29             for(var i = 0; i < HeaderType.MaxNumberOfBARs(); ++i)
30             {
31                 AddBaseAddressRegister((uint)i, new IOBaseAddressRegister(BARSizes[i]));
32             }
33         }
34 
35         private uint[] BARSizes = {0, 0, 0, 0, 0, 0x10};
36     }
37 }
38 
39