/[dynamips]/upstream/dynamips-0.2.7-RC1/dev_dec21x50.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /upstream/dynamips-0.2.7-RC1/dev_dec21x50.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7 - (hide annotations)
Sat Oct 6 16:23:47 2007 UTC (12 years, 2 months ago) by dpavlin
File MIME type: text/plain
File size: 2547 byte(s)
dynamips-0.2.7-RC1

1 dpavlin 1 /*
2 dpavlin 7 * Cisco router simulation platform.
3 dpavlin 1 * Copyright (c) 2005,2006 Christophe Fillot (cf@utc.fr)
4     *
5 dpavlin 7 * DEC21050/DEC21150 PCI bridges.
6 dpavlin 1 * This is just a fake device.
7     */
8    
9     #include <stdio.h>
10     #include <stdlib.h>
11     #include <string.h>
12    
13 dpavlin 7 #include "cpu.h"
14     #include "vm.h"
15 dpavlin 1 #include "dynamips.h"
16     #include "memory.h"
17     #include "device.h"
18     #include "pci_dev.h"
19    
20     #define PCI_VENDOR_DEC 0x1011
21     #define PCI_PRODUCT_DEC_21050 0x0001
22     #define PCI_PRODUCT_DEC_21052 0x0021
23     #define PCI_PRODUCT_DEC_21150 0x0023
24     #define PCI_PRODUCT_DEC_21152 0x0024
25 dpavlin 7 #define PCI_PRODUCT_DEC_21154 0x0026
26 dpavlin 1
27 dpavlin 7
28 dpavlin 1 /*
29     * dev_dec21050_init()
30     */
31     int dev_dec21050_init(struct pci_bus *pci_bus,int pci_device,
32     struct pci_bus *sec_bus)
33     {
34     struct pci_device *dev;
35    
36     dev = pci_bridge_create_dev(pci_bus,"dec21050",
37     PCI_VENDOR_DEC,PCI_PRODUCT_DEC_21050,
38     pci_device,0,sec_bus,NULL,NULL);
39     return((dev != NULL) ? 0 : -1);
40     }
41    
42     /*
43     * dev_dec21052_init()
44     */
45     int dev_dec21052_init(struct pci_bus *pci_bus,int pci_device,
46     struct pci_bus *sec_bus)
47     {
48     struct pci_device *dev;
49    
50     dev = pci_bridge_create_dev(pci_bus,"dec21052",
51     PCI_VENDOR_DEC,PCI_PRODUCT_DEC_21052,
52     pci_device,0,sec_bus,NULL,NULL);
53     return((dev != NULL) ? 0 : -1);
54     }
55    
56     /*
57     * dev_dec21150_init()
58     */
59     int dev_dec21150_init(struct pci_bus *pci_bus,int pci_device,
60     struct pci_bus *sec_bus)
61     {
62     struct pci_device *dev;
63    
64     dev = pci_bridge_create_dev(pci_bus,"dec21150",
65     PCI_VENDOR_DEC,PCI_PRODUCT_DEC_21150,
66     pci_device,0,sec_bus,NULL,NULL);
67     return((dev != NULL) ? 0 : -1);
68     }
69    
70     /*
71     * dev_dec21152_init()
72     */
73     int dev_dec21152_init(struct pci_bus *pci_bus,int pci_device,
74     struct pci_bus *sec_bus)
75     {
76     struct pci_device *dev;
77    
78     dev = pci_bridge_create_dev(pci_bus,"dec21152",
79     PCI_VENDOR_DEC,PCI_PRODUCT_DEC_21152,
80     pci_device,0,sec_bus,NULL,NULL);
81     return((dev != NULL) ? 0 : -1);
82     }
83 dpavlin 7
84     /*
85     * dev_dec21154_init()
86     */
87     int dev_dec21154_init(struct pci_bus *pci_bus,int pci_device,
88     struct pci_bus *sec_bus)
89     {
90     struct pci_device *dev;
91    
92     dev = pci_bridge_create_dev(pci_bus,"dec21154",
93     PCI_VENDOR_DEC,PCI_PRODUCT_DEC_21154,
94     pci_device,0,sec_bus,NULL,NULL);
95     return((dev != NULL) ? 0 : -1);
96     }

  ViewVC Help
Powered by ViewVC 1.1.26