Subversion Repositories HelenOS

Rev

Rev 4667 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4667 Rev 4677
1
#include <stdio.h>
1
#include <stdio.h>
2
#include <stdlib.h>
2
#include <stdlib.h>
-
 
3
#include <async.h>
3
 
4
 
4
#include "intel_piix3.h"
5
#include "intel_piix3.h"
5
#include "pci.h"
6
#include "pci.h"
6
#include "pci_bus.h"
7
#include "pci_bus.h"
7
#include "isa.h"
8
#include "isa.h"
8
#include "serial.h"
9
#include "serial.h"
9
 
10
 
10
 
11
 
11
int main(int argc, char **argv)
12
int main(int argc, char **argv)
12
{
13
{
13
    printf("PCI bus driver\n");
14
    printf("PCI bus driver\n");
14
   
15
   
15
    if (!pci_bus_init()) {
16
    if (!pci_bus_init()) {
16
        printf("PCI bus initialization failed.\n");
17
        printf("PCI bus initialization failed.\n");
17
        return 1;
18
        return 1;
18
    }
19
    }
19
   
20
   
20
    if (!isa_bus_init()) {
21
    if (!isa_bus_init()) {
21
        printf("ISA bus initialization failed.\n");
22
        printf("ISA bus initialization failed.\n");
22
        return 1;
23
        return 1;
23
    }
24
    }
24
   
25
   
25
   
26
   
26
    // pci-to-isa bridge device
27
    // pci-to-isa bridge device
27
    intel_piix3_init();
28
    intel_piix3_init();
28
   
29
   
29
    // TODO: write driver of some device (serial port) and initialize it here 
30
    // serial port driver
30
    serial_init();
31
    serial_init();
31
   
32
   
-
 
33
    printf("PCI + ISA + serial: Accepting connections\n");
-
 
34
    async_manager();
-
 
35
   
32
    return 0;
36
    return 0;
33
}
37
}
34
 
38