Subversion Repositories HelenOS-historic

Rev

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

Rev 1072 Rev 1112
Line 30... Line 30...
30
 
30
 
31
#include <arch/types.h>
31
#include <arch/types.h>
32
 
32
 
33
#include <config.h>
33
#include <config.h>
34
 
34
 
-
 
35
#include <proc/thread.h>
35
#include <arch/ega.h>
36
#include <arch/ega.h>
36
#include <genarch/i8042/i8042.h>
37
#include <genarch/i8042/i8042.h>
37
#include <arch/i8254.h>
38
#include <arch/i8254.h>
38
#include <arch/i8259.h>
39
#include <arch/i8259.h>
39
 
40
 
Line 45... Line 46...
45
#include <genarch/acpi/acpi.h>
46
#include <genarch/acpi/acpi.h>
46
#include <panic.h>
47
#include <panic.h>
47
#include <interrupt.h>
48
#include <interrupt.h>
48
#include <arch/syscall.h>
49
#include <arch/syscall.h>
49
#include <arch/debugger.h>
50
#include <arch/debugger.h>
-
 
51
#include <syscall/syscall.h>
-
 
52
 
50
 
53
 
51
/** Disable I/O on non-privileged levels
54
/** Disable I/O on non-privileged levels
52
 *
55
 *
53
 * Clean IOPL(12,13) and NT(14) flags in EFLAGS register
56
 * Clean IOPL(12,13) and NT(14) flags in EFLAGS register
54
 */
57
 */
Line 157... Line 160...
157
void calibrate_delay_loop(void)
160
void calibrate_delay_loop(void)
158
{
161
{
159
    i8254_calibrate_delay_loop();
162
    i8254_calibrate_delay_loop();
160
    i8254_normal_operation();
163
    i8254_normal_operation();
161
}
164
}
-
 
165
 
-
 
166
/** Set Thread-local-storeage pointer
-
 
167
 *
-
 
168
 * TLS pointer is set in FS register. Unfortunately the 64-bit
-
 
169
 * part can be set only in CPL0 mode.
-
 
170
 *
-
 
171
 * The specs says, that on %fs:0 there is stored contents of %fs register,
-
 
172
 * we need not to go to CPL0 to read it.
-
 
173
 */
-
 
174
__native sys_tls_set(__native addr)
-
 
175
{
-
 
176
    THREAD->tls = addr;
-
 
177
    write_msr(AMD_MSR_FS, addr);
-
 
178
    return 0;
-
 
179
}