#ifndef _ASM_SCORE_FIXMAP_H1#define _ASM_SCORE_FIXMAP_H23#include <asm/page.h>45#define PHY_RAM_BASE 0x000000006#define PHY_IO_BASE 0x1000000078#define VIRTUAL_RAM_BASE 0xa00000009#define VIRTUAL_IO_BASE 0xb00000001011#define RAM_SPACE_SIZE 0x1000000012#define IO_SPACE_SIZE 0x100000001314/* Kernel unmapped, cached 512MB */15#define KSEG1 0xa00000001617/*18* Here we define all the compile-time 'special' virtual19* addresses. The point is to have a constant address at20* compile time, but to set the physical address only21* in the boot process. We allocate these special addresses22* from the end of virtual memory (0xfffff000) backwards.23* Also this lets us do fail-safe vmalloc(), we24* can guarantee that these special addresses and25* vmalloc()-ed addresses never overlap.26*27* these 'compile-time allocated' memory buffers are28* fixed-size 4k pages. (or larger if used with an increment29* highger than 1) use fixmap_set(idx,phys) to associate30* physical memory with fixmap indices.31*32* TLB entries of such buffers will not be flushed across33* task switches.34*/3536/*37* on UP currently we will have no trace of the fixmap mechanizm,38* no page table allocations, etc. This might change in the39* future, say framebuffers for the console driver(s) could be40* fix-mapped?41*/42enum fixed_addresses {43#define FIX_N_COLOURS 844FIX_CMAP_BEGIN,45FIX_CMAP_END = FIX_CMAP_BEGIN + FIX_N_COLOURS,46__end_of_fixed_addresses47};4849/*50* used by vmalloc.c.51*52* Leave one empty page between vmalloc'ed areas and53* the start of the fixmap, and leave one page empty54* at the top of mem..55*/56#define FIXADDR_TOP ((unsigned long)(long)(int)0xfefe0000)57#define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT)58#define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)5960#define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT))61#define __virt_to_fix(x) \62((FIXADDR_TOP - ((x) & PAGE_MASK)) >> PAGE_SHIFT)6364extern void __this_fixmap_does_not_exist(void);6566/*67* 'index to address' translation. If anyone tries to use the idx68* directly without tranlation, we catch the bug with a NULL-deference69* kernel oops. Illegal ranges of incoming indices are caught too.70*/71static inline unsigned long fix_to_virt(const unsigned int idx)72{73return __fix_to_virt(idx);74}7576static inline unsigned long virt_to_fix(const unsigned long vaddr)77{78return __virt_to_fix(vaddr);79}8081#endif /* _ASM_SCORE_FIXMAP_H */828384