/
pcnet32_test.c
54 lines (42 loc) · 1.04 KB
/
pcnet32_test.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include <pci.h>
#include <net/pcnet32.h>
#include <net/ip.h>
#include <net/ether.h>
#include <ide.h>
#include <libc.h>
#include <hal.h>
#include <ide.h>
#include <malloc.h>
#include <thread.h>
#include <process.h>
#include <mutex.h>
#include <timer.h>
#include <filesystem.h>
#include <file_api.h>
#include <devfs.h>
#include <tarfs.h>
#include <driver.h>
#include <device.h>
#include <shell.h>
#include <multiboot.h>
void pcnet32_test_init(){
}
void pcnet32_test_run() {
xprintf("PCNET32 TEST\n");
xprintf("root fnode %p\n", process_current()->root);
xprintf("root filesystem name %s\n", process_current()->root->mounted->filesystem->name);
xprintf("file id %d\n", process_current()->root->file_id);
pci_init();
// ide_init();
ether_init();
ip_init();
pcnet32_init(); //pcnet32
// mounting devfs
devfs_mount();
// registering devfs
driver_register_devfs();
// mounting tarfs at standard boot location
tarfs_mount(multiboot_get_module(0), "/System/Startup");
shell_run();
xprintf("pcnet32_test end\n");
}