Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2141 → Rev 3133

/trunk/kernel/arch/sparc64/include/mm/cache_spec.h/cache.h
1,5 → 1,5
/*
* Copyright (c) 2006 Jakub Jermar
* Copyright (c) 2008 Jakub Jermar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
32,20 → 32,24
/** @file
*/
 
#ifndef KERN_sparc64_CACHE_H_
#define KERN_sparc64_CACHE_H_
#ifndef KERN_sparc64_CACHE_SPEC_H_
#define KERN_sparc64_CACHE_SPEC_H_
 
#include <mm/page.h>
#include <mm/frame.h>
/*
* The following macros are valid for the following processors:
*
* UltraSPARC, UltraSPARC II, UltraSPARC IIi
*
* Should we support other UltraSPARC processors, we need to make sure that
* the macros are defined correctly for them.
*/
 
#define dcache_flush_page(p) \
dcache_flush_color(PAGE_COLOR((p)))
#define dcache_flush_frame(p, f) \
dcache_flush_tag(PAGE_COLOR((p)), ADDR2PFN((f)));
#define DCACHE_SIZE (16 * 1024)
#define DCACHE_LINE_SIZE 32
 
extern void dcache_flush(void);
extern void dcache_flush_color(int c);
extern void dcache_flush_tag(int c, pfn_t tag);
#define ICACHE_SIZE (16 * 1024)
#define ICACHE_WAYS 2
#define ICACHE_LINE_SIZE 32
 
#endif