vaseboot/include/VasEBoot/mips/memory.h

61 lines
1.7 KiB
C

/*
* VasEBoot -- GRand Unified Bootloader
* Copyright (C) 2009 Free Software Foundation, Inc.
*
* VasEBoot is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* VasEBoot is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with VasEBoot. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef VasEBoot_MEMORY_CPU_HEADER
#define VasEBoot_MEMORY_CPU_HEADER 1
#ifndef ASM_FILE
#include <VasEBoot/symbol.h>
#include <VasEBoot/err.h>
#include <VasEBoot/types.h>
#endif
#define VasEBoot_ARCH_LOWMEMVSTART 0x80000000
#define VasEBoot_ARCH_LOWMEMPSTART 0x00000000
#define VasEBoot_ARCH_LOWMEMMAXSIZE 0x10000000
#define VasEBoot_ARCH_HIGHMEMPSTART 0x10000000
#ifndef ASM_FILE
typedef VasEBoot_addr_t VasEBoot_phys_addr_t;
static inline VasEBoot_phys_addr_t
VasEBoot_vtop (void *a)
{
return ((VasEBoot_phys_addr_t) a) & 0x1fffffff;
}
static inline void *
VasEBoot_map_memory (VasEBoot_phys_addr_t a, VasEBoot_size_t size __attribute__ ((unused)))
{
return (void *) (a | 0x80000000);
}
static inline void
VasEBoot_unmap_memory (void *a __attribute__ ((unused)),
VasEBoot_size_t size __attribute__ ((unused)))
{
}
VasEBoot_uint64_t VasEBoot_mmap_get_lower (void);
VasEBoot_uint64_t VasEBoot_mmap_get_upper (void);
#endif
#endif