Subversion Repositories HelenOS

Rev

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

Rev 2089 Rev 2106
Line 37... Line 37...
37
 
37
 
38
#include <arch/mm/asid.h>
38
#include <arch/mm/asid.h>
39
#include <arch/types.h>
39
#include <arch/types.h>
40
 
40
 
41
/**
41
/**
42
 * Number of TLB shootdown messages that can be queued in processor
42
 * Number of TLB shootdown messages that can be queued in processor tlb_messages
43
 * tlb_messages queue.
43
 * queue.
44
 */
44
 */
45
#define TLB_MESSAGE_QUEUE_LEN   10
45
#define TLB_MESSAGE_QUEUE_LEN   10
46
 
46
 
47
/** Type of TLB shootdown message. */
47
/** Type of TLB shootdown message. */
48
typedef enum {
48
typedef enum {
-
 
49
    /** Invalid type. */
49
    TLB_INVL_INVALID = 0,       /**< Invalid type. */
50
    TLB_INVL_INVALID = 0,
50
    TLB_INVL_ALL,           /**< Invalidate all entries in TLB. */
51
    /** Invalidate all entries in TLB. */
-
 
52
    TLB_INVL_ALL,
51
    TLB_INVL_ASID,          /**< Invalidate all entries belonging to one address space. */
53
    /** Invalidate all entries belonging to one address space. */
-
 
54
    TLB_INVL_ASID,
52
    TLB_INVL_PAGES          /**< Invalidate specified page range belonging to one address space. */
55
    /** Invalidate specified page range belonging to one address space. */
-
 
56
    TLB_INVL_PAGES
53
} tlb_invalidate_type_t;
57
} tlb_invalidate_type_t;
54
 
58
 
55
/** TLB shootdown message. */
59
/** TLB shootdown message. */
56
typedef struct {
60
typedef struct {
57
    tlb_invalidate_type_t type; /**< Message type. */
61
    tlb_invalidate_type_t type; /**< Message type. */
Line 61... Line 65...
61
} tlb_shootdown_msg_t;
65
} tlb_shootdown_msg_t;
62
 
66
 
63
extern void tlb_init(void);
67
extern void tlb_init(void);
64
 
68
 
65
#ifdef CONFIG_SMP
69
#ifdef CONFIG_SMP
66
extern void tlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid, uintptr_t page, count_t count);
70
extern void tlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid,
-
 
71
    uintptr_t page, count_t count);
67
extern void tlb_shootdown_finalize(void);
72
extern void tlb_shootdown_finalize(void);
68
extern void tlb_shootdown_ipi_recv(void);
73
extern void tlb_shootdown_ipi_recv(void);
69
#else
74
#else
70
#  define tlb_shootdown_start(w, x, y, z)
75
#define tlb_shootdown_start(w, x, y, z)
71
#  define tlb_shootdown_finalize()
76
#define tlb_shootdown_finalize()
72
#  define tlb_shootdown_ipi_recv()
77
#define tlb_shootdown_ipi_recv()
73
#endif /* CONFIG_SMP */
78
#endif /* CONFIG_SMP */
74
 
79
 
75
/* Export TLB interface that each architecture must implement. */
80
/* Export TLB interface that each architecture must implement. */
76
extern void tlb_arch_init(void);
81
extern void tlb_arch_init(void);
77
extern void tlb_print(void);
82
extern void tlb_print(void);