Subversion Repositories HelenOS

Rev

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

Rev 2214 Rev 2245
Line 1... Line 1...
1
/*
1
/*
2
 * Copyright (c) 2007 Petr Stepan, Michal Kebrt
2
 * Copyright (c) 2007 Petr Stepan
3
 * All rights reserved.
3
 * All rights reserved.
4
 *
4
 *
5
 * Redistribution and use in source and binary forms, with or without
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions
6
 * modification, are permitted provided that the following conditions
7
 * are met:
7
 * are met:
Line 32... Line 32...
32
/** @file
32
/** @file
33
 */
33
 */
34
 
34
 
35
#include <arch/asm.h>
35
#include <arch/asm.h>
36
#include <arch/regutils.h>
36
#include <arch/regutils.h>
-
 
37
#include <ddi/irq.h>
-
 
38
#include <arch/drivers/gxemul.h>
37
#include <interrupt.h>
39
#include <interrupt.h>
38
 
40
 
39
 
-
 
40
#define IRQ_COUNT   8
41
#define IRQ_COUNT 8
41
 
42
 
42
 
43
 
43
/** Disable interrupts.
44
/** Disable interrupts.
44
 *
45
 *
45
 * @return Old interrupt priority level.
46
 * @return Old interrupt priority level.
Line 83... Line 84...
83
ipl_t interrupts_read(void)
84
ipl_t interrupts_read(void)
84
{
85
{
85
    return current_status_reg_read();
86
    return current_status_reg_read();
86
}
87
}
87
 
88
 
-
 
89
/** Initialize basic tables for exception dispatching
-
 
90
 * and starts the timer.
-
 
91
 */
88
void interrupt_init(void) {
92
void interrupt_init(void)
-
 
93
{
89
    irq_init(IRQ_COUNT, IRQ_COUNT);
94
    irq_init(IRQ_COUNT, IRQ_COUNT);
-
 
95
 
-
 
96
    gxemul_timer_irq_init();
-
 
97
    gxemul_timer_start(GXEMUL_TIMER_FREQ);
90
}
98
}
91
 
99
 
-
 
100
 
92
/** @}
101
/** @}
93
 */
102
 */