Subversion Repositories HelenOS

Rev

Rev 4344 | Rev 4346 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4344 Rev 4345
Line 1... Line 1...
1
/*
1
/*
2
 * Copyright (c) 2001-2004 Jakub Jermar
2
 * Copyright (c) 2001-2004 Jakub Jermar
-
 
3
 * Copyright (c) 2009 Jiri Svoboda
-
 
4
 * Copyright (c) 2009 Martin Decky
3
 * All rights reserved.
5
 * All rights reserved.
4
 *
6
 *
5
 * Redistribution and use in source and binary forms, with or without
7
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions
8
 * modification, are permitted provided that the following conditions
7
 * are met:
9
 * are met:
Line 36... Line 38...
36
 
38
 
37
#include <arch/types.h>
39
#include <arch/types.h>
38
 
40
 
39
#include <arch/pm.h>
41
#include <arch/pm.h>
40
 
42
 
-
 
43
#include <genarch/multiboot/multiboot.h>
41
#include <genarch/drivers/legacy/ia32/io.h>
44
#include <genarch/drivers/legacy/ia32/io.h>
42
#include <genarch/drivers/ega/ega.h>
45
#include <genarch/drivers/ega/ega.h>
43
#include <arch/drivers/vesa.h>
46
#include <arch/drivers/vesa.h>
44
#include <genarch/kbd/i8042.h>
47
#include <genarch/kbd/i8042.h>
45
#include <arch/drivers/i8254.h>
48
#include <arch/drivers/i8254.h>
Line 61... Line 64...
61
#include <proc/thread.h>
64
#include <proc/thread.h>
62
#include <syscall/syscall.h>
65
#include <syscall/syscall.h>
63
#include <console/console.h>
66
#include <console/console.h>
64
#include <ddi/device.h>
67
#include <ddi/device.h>
65
#include <sysinfo/sysinfo.h>
68
#include <sysinfo/sysinfo.h>
-
 
69
#include <arch/boot/boot.h>
66
 
70
 
67
#ifdef CONFIG_SMP
71
#ifdef CONFIG_SMP
68
#include <arch/smp/apic.h>
72
#include <arch/smp/apic.h>
69
#endif
73
#endif
70
 
74
 
-
 
75
/** Perform ia32-specific initialization before main_bsp() is called.
-
 
76
 *
-
 
77
 * @param signature Should contain the multiboot signature.
-
 
78
 * @param mi        Pointer to the multiboot information structure.
-
 
79
 */
-
 
80
void arch_pre_main(uint32_t signature, const multiboot_info_t *mi)
-
 
81
{
-
 
82
    /* Parse multiboot information obtained from the bootloader. */
-
 
83
    multiboot_info_parse(signature, mi);   
-
 
84
   
-
 
85
#ifdef CONFIG_SMP
-
 
86
    /* Copy AP bootstrap routines below 1 MB. */
-
 
87
    memcpy((void *) AP_BOOT_OFFSET, (void *) BOOT_OFFSET,
-
 
88
        (size_t) &_hardcoded_unmapped_size);
-
 
89
#endif
-
 
90
}
-
 
91
 
71
void arch_pre_mm_init(void)
92
void arch_pre_mm_init(void)
72
{
93
{
73
    pm_init();
94
    pm_init();
74
 
95
 
75
    if (config.cpu_active == 1) {
96
    if (config.cpu_active == 1) {
Line 134... Line 155...
134
     * self-sufficient.
155
     * self-sufficient.
135
     */
156
     */
136
    sysinfo_set_item_val("kbd", NULL, true);
157
    sysinfo_set_item_val("kbd", NULL, true);
137
    sysinfo_set_item_val("kbd.devno", NULL, devno);
158
    sysinfo_set_item_val("kbd.devno", NULL, devno);
138
    sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD);
159
    sysinfo_set_item_val("kbd.inr", NULL, IRQ_KBD);
-
 
160
    sysinfo_set_item_val("kbd.address.physical", NULL,
-
 
161
        (uintptr_t) I8042_BASE);
-
 
162
    sysinfo_set_item_val("kbd.address.kernel", NULL,
-
 
163
        (uintptr_t) I8042_BASE);
139
}
164
}
140
 
165
 
141
void calibrate_delay_loop(void)
166
void calibrate_delay_loop(void)
142
{
167
{
143
    i8254_calibrate_delay_loop();
168
    i8254_calibrate_delay_loop();