platform.cc (2665:a124942bacb8) platform.cc (2846:89fbe74d8ea8)
1/*
2 * Copyright (c) 2004-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 49 unchanged lines hidden (view full) ---

58}
59
60Addr
61Platform::pciToDma(Addr pciAddr) const
62{
63 panic("No PCI dma support in platform.");
64}
65
1/*
2 * Copyright (c) 2004-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 49 unchanged lines hidden (view full) ---

58}
59
60Addr
61Platform::pciToDma(Addr pciAddr) const
62{
63 panic("No PCI dma support in platform.");
64}
65
66void
67Platform::registerPciDevice(uint8_t bus, uint8_t dev, uint8_t func, uint8_t intr)
68{
69 uint32_t bdf = bus << 16 | dev << 8 | func << 0;
70 if (pciDevices.find(bdf) != pciDevices.end())
71 fatal("Two PCI devices have same bus:device:function\n");
72
73 if (intLines.test(intr))
74 fatal("Two PCI devices have same interrupt line: %d\n", intr);
75
76 pciDevices.insert(bdf);
77
78 intLines.set(intr);
79}
80
81
66DEFINE_SIM_OBJECT_CLASS_NAME("Platform", Platform)
67
82DEFINE_SIM_OBJECT_CLASS_NAME("Platform", Platform)
83