Subversion Repositories HelenOS

Rev

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

Rev 1822 Rev 1857
Line 30... Line 30...
30
 * @{
30
 * @{
31
 */
31
 */
32
/** @file
32
/** @file
33
 */
33
 */
34
 
34
 
35
#ifndef __sparc64_PAGE_H__
35
#ifndef KERN_sparc64_PAGE_H_
36
#define __sparc64_PAGE_H__
36
#define KERN_sparc64_PAGE_H_
37
 
37
 
38
#include <arch/mm/frame.h>
38
#include <arch/mm/frame.h>
39
 
39
 
40
#define PAGE_WIDTH  FRAME_WIDTH
40
#define PAGE_WIDTH  FRAME_WIDTH
41
#define PAGE_SIZE   FRAME_SIZE
41
#define PAGE_SIZE   FRAME_SIZE
42
 
42
 
43
#ifdef KERNEL
43
#ifdef KERNEL
44
 
44
 
-
 
45
#ifndef __ASM__
-
 
46
 
45
#include <mm/page.h>
47
#include <mm/page.h>
46
#include <arch/types.h>
48
#include <arch/types.h>
47
#include <genarch/mm/page_ht.h>
49
#include <genarch/mm/page_ht.h>
48
 
50
 
49
#define KA2PA(x)    ((uintptr_t) (x))
51
#define KA2PA(x)    ((uintptr_t) (x))
Line 51... Line 53...
51
 
53
 
52
union page_address {
54
union page_address {
53
    uintptr_t address;
55
    uintptr_t address;
54
    struct {
56
    struct {
55
        uint64_t vpn : 51;      /**< Virtual Page Number. */
57
        uint64_t vpn : 51;      /**< Virtual Page Number. */
56
        unsigned offset : 13;   /**< Offset. */
58
        unsigned offset : 13;       /**< Offset. */
57
    } __attribute__ ((packed));
59
    } __attribute__ ((packed));
58
};
60
};
59
 
61
 
60
typedef union page_address page_address_t;
62
typedef union page_address page_address_t;
61
 
63
 
62
extern void page_arch_init(void);
64
extern void page_arch_init(void);
63
 
65
 
-
 
66
#endif /* !def __ASM__ */
-
 
67
 
64
#endif /* KERNEL */
68
#endif /* KERNEL */
65
 
69
 
66
#endif
70
#endif
67
 
71
 
68
/** @}
72
/** @}