Subversion Repositories HelenOS-historic

Rev

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

Rev 727 Rev 1002
Line 31... Line 31...
31
 
31
 
32
#include <arch/mm/asid.h>
32
#include <arch/mm/asid.h>
33
#include <arch/types.h>
33
#include <arch/types.h>
34
#include <typedefs.h>
34
#include <typedefs.h>
35
 
35
 
-
 
36
/**
-
 
37
 * Number of TLB shootdown messages that can be queued in processor
-
 
38
 * tlb_messages queue.
-
 
39
 */
-
 
40
#define TLB_MESSAGE_QUEUE_LEN   10
-
 
41
 
36
/** Type of TLB shootdown message. */
42
/** Type of TLB shootdown message. */
37
enum tlb_invalidate_type {
43
enum tlb_invalidate_type {
38
    TLB_INVL_INVALID = 0,       /**< Invalid type. */
44
    TLB_INVL_INVALID = 0,       /**< Invalid type. */
39
    TLB_INVL_ALL,           /**< Invalidate all entries in TLB. */
45
    TLB_INVL_ALL,           /**< Invalidate all entries in TLB. */
40
    TLB_INVL_ASID,          /**< Invalidate all entries belonging to one address space. */
46
    TLB_INVL_ASID,          /**< Invalidate all entries belonging to one address space. */
41
    TLB_INVL_PAGES          /**< Invalidate specified page range belonging to one address space. */
47
    TLB_INVL_PAGES          /**< Invalidate specified page range belonging to one address space. */
42
};
48
};
43
 
-
 
44
typedef enum tlb_invalidate_type tlb_invalidate_type_t;
49
typedef enum tlb_invalidate_type tlb_invalidate_type_t;
45
 
50
 
46
/** TLB shootdown message. */
51
/** TLB shootdown message. */
47
struct tlb_shootdown_msg {
52
struct tlb_shootdown_msg {
48
    tlb_invalidate_type_t type; /**< Message type. */
53
    tlb_invalidate_type_t type; /**< Message type. */
49
    asid_t asid;            /**< Address space identifier. */
54
    asid_t asid;            /**< Address space identifier. */
50
    __address page;         /**< Page address. */
55
    __address page;         /**< Page address. */
-
 
56
    count_t count;          /**< Number of pages to invalidate. */
51
};
57
};
52
 
-
 
53
typedef struct tlb_shootdown_msg tlb_shootdown_msg_t;
58
typedef struct tlb_shootdown_msg tlb_shootdown_msg_t;
54
 
59
 
55
extern void tlb_init(void);
60
extern void tlb_init(void);
56
 
61
 
57
#ifdef CONFIG_SMP
62
#ifdef CONFIG_SMP
58
extern void tlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid, __address page, count_t cnt);
63
extern void tlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid, __address page, count_t count);
59
extern void tlb_shootdown_finalize(void);
64
extern void tlb_shootdown_finalize(void);
60
extern void tlb_shootdown_ipi_recv(void);
65
extern void tlb_shootdown_ipi_recv(void);
61
#else
66
#else
62
#  define tlb_shootdown_start(w, x, y, z)
67
#  define tlb_shootdown_start(w, x, y, z)
63
#  define tlb_shootdown_finalize()
68
#  define tlb_shootdown_finalize()