Subversion Repositories HelenOS

Rev

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

Rev 2141 Rev 3133
Line 1... Line 1...
1
/*
1
/*
2
 * Copyright (c) 2006 Jakub Jermar
2
 * Copyright (c) 2008 Jakub Jermar
3
 * All rights reserved.
3
 * All rights reserved.
4
 *
4
 *
5
 * Redistribution and use in source and binary forms, with or without
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions
6
 * modification, are permitted provided that the following conditions
7
 * are met:
7
 * are met:
Line 30... Line 30...
30
 * @{
30
 * @{
31
 */
31
 */
32
/** @file
32
/** @file
33
 */
33
 */
34
 
34
 
35
#ifndef KERN_sparc64_CACHE_H_
35
#ifndef KERN_sparc64_CACHE_SPEC_H_
36
#define KERN_sparc64_CACHE_H_
36
#define KERN_sparc64_CACHE_SPEC_H_
37
 
37
 
-
 
38
/*
-
 
39
 * The following macros are valid for the following processors:
-
 
40
 *
-
 
41
 *  UltraSPARC, UltraSPARC II, UltraSPARC IIi
-
 
42
 *
-
 
43
 * Should we support other UltraSPARC processors, we need to make sure that
-
 
44
 * the macros are defined correctly for them.
-
 
45
 */
-
 
46
 
38
#include <mm/page.h>
47
#define DCACHE_SIZE     (16 * 1024)
39
#include <mm/frame.h>
48
#define DCACHE_LINE_SIZE    32  
40
 
49
 
41
#define dcache_flush_page(p) \
50
#define ICACHE_SIZE     (16 * 1024)
42
    dcache_flush_color(PAGE_COLOR((p)))
-
 
43
#define dcache_flush_frame(p, f) \
51
#define ICACHE_WAYS     2
44
    dcache_flush_tag(PAGE_COLOR((p)), ADDR2PFN((f)));
-
 
45
 
-
 
46
extern void dcache_flush(void);
52
#define ICACHE_LINE_SIZE    32
47
extern void dcache_flush_color(int c);
-
 
48
extern void dcache_flush_tag(int c, pfn_t tag);
-
 
49
 
53
 
50
#endif
54
#endif
51
 
55
 
52
/** @}
56
/** @}
53
 */
57
 */