Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2088 → Rev 2089

/trunk/kernel/arch/sparc64/include/mm/memory_init.h
35,7 → 35,7
#ifndef KERN_sparc64_MEMORY_INIT_H_
#define KERN_sparc64_MEMORY_INIT_H_
 
#include <typedefs.h>
#include <arch/types.h>
 
extern size_t get_memory_size(void);
 
/trunk/kernel/arch/sparc64/include/mm/page.h
46,9 → 46,9
 
#ifndef __ASM__
 
#include <mm/page.h>
#include <arch/types.h>
#include <genarch/mm/page_ht.h>
//#include <arch/types.h>
//#include <genarch/mm/page_ht.h>
#include <arch/interrupt.h>
 
extern uintptr_t physmem_base;
 
55,16 → 55,14
#define KA2PA(x) (((uintptr_t) (x)) + physmem_base)
#define PA2KA(x) (((uintptr_t) (x)) - physmem_base)
 
union page_address {
typedef union {
uintptr_t address;
struct {
uint64_t vpn : 51; /**< Virtual Page Number. */
unsigned offset : 13; /**< Offset. */
} __attribute__ ((packed));
};
} page_address_t;
 
typedef union page_address page_address_t;
 
extern void page_arch_init(void);
 
#endif /* !def __ASM__ */
/trunk/kernel/arch/sparc64/include/mm/mmu.h
79,10 → 79,9
#include <arch/asm.h>
#include <arch/barrier.h>
#include <arch/types.h>
#include <typedefs.h>
 
/** LSU Control Register. */
union lsu_cr_reg {
typedef union {
uint64_t value;
struct {
unsigned : 23;
100,8 → 99,7
unsigned ic : 1; /**< I-Cache enable. */
} __attribute__ ((packed));
};
typedef union lsu_cr_reg lsu_cr_reg_t;
} lsu_cr_reg_t;
 
#endif /* !def __ASM__ */
 
/trunk/kernel/arch/sparc64/include/mm/tlb.h
76,7 → 76,6
#include <arch/asm.h>
#include <arch/barrier.h>
#include <arch/types.h>
#include <typedefs.h>
 
union tlb_context_reg {
uint64_t v;
/trunk/kernel/arch/sparc64/include/mm/as.h
35,9 → 35,7
#ifndef KERN_sparc64_AS_H_
#define KERN_sparc64_AS_H_
 
#ifdef CONFIG_TSB
#include <arch/mm/tsb.h>
#endif
#include <arch/mm/tte.h>
 
#define KERNEL_ADDRESS_SPACE_SHADOWED_ARCH 1
 
46,16 → 44,44
#define USER_ADDRESS_SPACE_START_ARCH (unsigned long) 0x0000000000000000
#define USER_ADDRESS_SPACE_END_ARCH (unsigned long) 0xffffffffffffffff
 
#define USTACK_ADDRESS_ARCH (0xffffffffffffffffULL-(PAGE_SIZE-1))
#define USTACK_ADDRESS_ARCH (0xffffffffffffffffULL - (PAGE_SIZE - 1))
 
#ifdef CONFIG_TSB
 
/** TSB Tag Target register. */
typedef 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));
} tsb_tag_target_t;
 
/** TSB entry. */
typedef struct tsb_entry {
tsb_tag_target_t tag;
tte_data_t data;
} __attribute__ ((packed)) tsb_entry_t;
 
typedef struct {
#ifdef CONFIG_TSB
tsb_entry_t *itsb;
tsb_entry_t *dtsb;
#endif /* CONFIG_TSB */
} as_arch_t;
 
#else
 
typedef struct {
} as_arch_t;
 
#endif /* CONFIG_TSB */
 
#include <genarch/mm/as_ht.h>
 
#ifdef CONFIG_TSB
# include <arch/mm/tsb.h>
# define as_invalidate_translation_cache(as, page, cnt) tsb_invalidate(as, page, cnt)
#else
# define as_invalidate_translation_cache(as, page, cnt)
/trunk/kernel/arch/sparc64/include/mm/tsb.h
54,30 → 54,10
#include <arch/mm/tte.h>
#include <arch/mm/mmu.h>
#include <arch/types.h>
#include <typedefs.h>
#include <mm/as.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 {
tsb_tag_target_t tag;
tte_data_t data;
} __attribute__ ((packed));
typedef struct tsb_entry tsb_entry_t;
 
/** TSB Base register. */
union tsb_base_reg {
typedef union tsb_base_reg {
uint64_t value;
struct {
uint64_t base : 51; /**< TSB base address, bits 63:13. */
90,8 → 70,7
unsigned size : 3; /**< TSB size. Number of entries is
* 512 * 2^size. */
} __attribute__ ((packed));
};
typedef union tsb_base_reg tsb_base_reg_t;
} tsb_base_reg_t;
 
/** Read ITSB Base register.
*