Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 1890 → Rev 1891

/trunk/kernel/arch/sparc64/include/mm/tte.h
50,6 → 50,8
 
#include <arch/types.h>
 
#define VA_TAG_PAGE_SHIFT 22
 
/** Translation Table Entry - Tag. */
union tte_tag {
uint64_t value;
/trunk/kernel/arch/sparc64/include/mm/mmu.h
48,7 → 48,7
#define ASI_IMMU_DEMAP 0x57
 
/* Virtual Addresses within ASI_IMMU. */
#define VA_IMMU_TAG_TARGET 0x0 /**< IMMU tag target register. */
#define VA_IMMU_TSB_TAG_TARGET 0x0 /**< IMMU TSB tag target register. */
#define VA_IMMU_SFSR 0x18 /**< IMMU sync fault status register. */
#define VA_IMMU_TSB_BASE 0x28 /**< IMMU TSB base register. */
#define VA_IMMU_TAG_ACCESS 0x30 /**< IMMU TLB tag access register. */
64,7 → 64,7
#define ASI_DMMU_DEMAP 0x5f
 
/* Virtual Addresses within ASI_DMMU. */
#define VA_DMMU_TAG_TARGET 0x0 /**< DMMU tag target register. */
#define VA_DMMU_TSB_TAG_TARGET 0x0 /**< DMMU TSB tag target register. */
#define VA_PRIMARY_CONTEXT_REG 0x8 /**< DMMU primary context register. */
#define VA_SECONDARY_CONTEXT_REG 0x10 /**< DMMU secondary context register. */
#define VA_DMMU_SFSR 0x18 /**< DMMU sync fault status register. */
/trunk/kernel/arch/sparc64/include/mm/tsb.h
35,11 → 35,6
#ifndef KERN_sparc64_TSB_H_
#define KERN_sparc64_TSB_H_
 
#include <arch/mm/tte.h>
#include <arch/mm/mmu.h>
#include <arch/types.h>
#include <typedefs.h>
 
/*
* ITSB abd DTSB will claim 64K of memory, which
* is a nice number considered that it is one of
51,8 → 46,31
#define ITSB_ENTRY_COUNT (512*(1<<TSB_SIZE))
#define DTSB_ENTRY_COUNT (512*(1<<TSB_SIZE))
 
#define TSB_TAG_TARGET_CONTEXT_SHIFT 48
 
#ifndef __ASM__
 
#include <arch/mm/tte.h>
#include <arch/mm/mmu.h>
#include <arch/types.h>
#include <typedefs.h>
 
/** TSB Tag Target register. */
union tsb_tag_target {
uint64_t value;
struct {
unsigned invalid : 1; /**< Invalidated by software. */
unsigned : 2;
unsigned context : 13; /**< Software ASID. */
unsigned : 6;
uint64_t va_tag : 42; /**< Virtual address bits <63:22>. */
} __attribute__ ((packed));
};
typedef union tsb_tag_target tsb_tag_target_t;
 
/** TSB entry. */
struct tsb_entry {
tte_tag_t tag;
tsb_tag_target_t tag;
tte_data_t data;
} __attribute__ ((packed));
typedef struct tsb_entry tsb_entry_t;
109,7 → 127,11
}
 
extern void tsb_invalidate(as_t *as, uintptr_t page, count_t pages);
extern void itsb_pte_copy(pte_t *t);
extern void dtsb_pte_copy(pte_t *t, bool ro);
 
#endif /* !def __ASM__ */
 
#endif
 
/** @}