Subversion Repositories HelenOS

Rev

Rev 2692 | Rev 2723 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2692 Rev 2697
Line 69... Line 69...
69
 *
69
 *
70
 * Clean IOPL(12,13) and NT(14) flags in EFLAGS register
70
 * Clean IOPL(12,13) and NT(14) flags in EFLAGS register
71
 */
71
 */
72
static void clean_IOPL_NT_flags(void)
72
static void clean_IOPL_NT_flags(void)
73
{
73
{
74
    asm
74
    asm (
75
    (
-
 
76
        "pushfq;"
75
        "pushfq\n"
77
        "pop %%rax;"
76
        "pop %%rax\n"
78
        "and $~(0x7000),%%rax;"
77
        "and $~(0x7000), %%rax\n"
79
        "pushq %%rax;"
78
        "pushq %%rax\n"
80
        "popfq;"
79
        "popfq\n"
81
        :
80
        :
82
        :
81
        :
83
        :"%rax"
82
        : "%rax"
84
    );
83
    );
85
}
84
}
Line 88... Line 87...
88
 *
87
 *
89
 * Clean AM(18) flag in CR0 register
88
 * Clean AM(18) flag in CR0 register
90
 */
89
 */
91
static void clean_AM_flag(void)
90
static void clean_AM_flag(void)
92
{
91
{
93
    asm
92
    asm (
94
    (
-
 
95
        "mov %%cr0,%%rax;"
93
        "mov %%cr0, %%rax\n"
96
        "and $~(0x40000),%%rax;"
94
        "and $~(0x40000), %%rax\n"
97
        "mov %%rax,%%cr0;"
95
        "mov %%rax, %%cr0\n"
98
        :
96
        :
99
        :
97
        :
100
        :"%rax"
98
        : "%rax"
101
    );
99
    );
102
}
100
}
Line 125... Line 123...
125
        /* PIC */
123
        /* PIC */
126
        i8259_init();
124
        i8259_init();
127
    }
125
    }
128
}
126
}
129
 
127
 
-
 
128
 
130
void arch_post_mm_init(void)
129
void arch_post_mm_init(void)
131
{
130
{
132
    if (config.cpu_active == 1) {
131
    if (config.cpu_active == 1) {
133
        /* Initialize IRQ routing */
132
        /* Initialize IRQ routing */
134
        irq_init(IRQ_COUNT, IRQ_COUNT);
133
        irq_init(IRQ_COUNT, IRQ_COUNT);
Line 146... Line 145...
146
        /* Enable debugger */
145
        /* Enable debugger */
147
        debugger_init();
146
        debugger_init();
148
        /* Merge all memory zones to 1 big zone */
147
        /* Merge all memory zones to 1 big zone */
149
        zone_merge_all();
148
        zone_merge_all();
150
    }
149
    }
-
 
150
   
151
    /* Setup fast SYSCALL/SYSRET */
151
    /* Setup fast SYSCALL/SYSRET */
152
    syscall_setup_cpu();
152
    syscall_setup_cpu();
153
   
-
 
154
}
153
}
155
 
154
 
156
void arch_post_cpu_init()
155
void arch_post_cpu_init()
157
{
156
{
158
#ifdef CONFIG_SMP
157
#ifdef CONFIG_SMP