#ifndef _ASM_BSP_PAGE_OFFSET_H_
#define _ASM_BSP_PAGE_OFFSET_H_

#include <linux/config.h>


/* Virtual address Map 
 * 0x0 - 0x7    :  User space             2 G
 *
 * 0x8          :  Kernel 'unmapped'    256 M
 *
 * 0x9          :  vmalloc              512 M
 * 0xa          :  vmalloc
 *
 * 0xb          :  PIO                  256 M
 *
 * 0xc          :  PCI                   1 G
 * 0xd          :  PCI
 * 0xe          :  PCI
 * 0xf          :  PCI
 */

#define PGOFFS_KERNELSPACE_START     0x80000000 

#define PGOFFS_VMALLOC_START         0x90000000
#define PGOFFS_VMALLOC_LEN           0x20000000


#define PGOFFS_KERNELSPACE_LEN       ( PGOFFS_VMALLOC_START - PGOFFS_KERNELSPACE_START ) 

#define PGOFFS_PCI_LEN               ( PGOFFS_PIO_START     - PGOFFS_PCI_START         )


#define PGOFFS_UNMAPPED(x)   ( (((unsigned long)x) & 0xf0000000) == 0x80000000 )


#define PAGE_OFFSET_RAW    PGOFFS_KERNELSPACE_START 

#define VMALLOC_VMADDR(x) ((unsigned long)(x))
#define VMALLOC_START      PGOFFS_VMALLOC_START
#define VMALLOC_END       (VMALLOC_START + PGOFFS_VMALLOC_LEN) 

#endif	/* _ASM_BSP_PAGE_OFFSET_H_ */
