65 lines
1.7 KiB
C
65 lines
1.7 KiB
C
/*
|
|
* VasEBoot -- GRand Unified Bootloader
|
|
* Copyright (C) 2010 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_MM_PRIVATE_H
|
|
#define VasEBoot_MM_PRIVATE_H 1
|
|
|
|
#include <VasEBoot/mm.h>
|
|
|
|
/* Magic words. */
|
|
#define VasEBoot_MM_FREE_MAGIC 0x2d3c2808
|
|
#define VasEBoot_MM_ALLOC_MAGIC 0x6db08fa4
|
|
|
|
typedef struct VasEBoot_mm_header
|
|
{
|
|
struct VasEBoot_mm_header *next;
|
|
VasEBoot_size_t size;
|
|
VasEBoot_size_t magic;
|
|
#if VasEBoot_CPU_SIZEOF_VOID_P == 4
|
|
char padding[4];
|
|
#elif VasEBoot_CPU_SIZEOF_VOID_P == 8
|
|
char padding[8];
|
|
#else
|
|
# error "unknown word size"
|
|
#endif
|
|
}
|
|
*VasEBoot_mm_header_t;
|
|
|
|
#if VasEBoot_CPU_SIZEOF_VOID_P == 4
|
|
# define VasEBoot_MM_ALIGN_LOG2 4
|
|
#elif VasEBoot_CPU_SIZEOF_VOID_P == 8
|
|
# define VasEBoot_MM_ALIGN_LOG2 5
|
|
#endif
|
|
|
|
#define VasEBoot_MM_ALIGN (1 << VasEBoot_MM_ALIGN_LOG2)
|
|
|
|
typedef struct VasEBoot_mm_region
|
|
{
|
|
struct VasEBoot_mm_header *first;
|
|
struct VasEBoot_mm_region *next;
|
|
VasEBoot_size_t pre_size;
|
|
VasEBoot_size_t size;
|
|
}
|
|
*VasEBoot_mm_region_t;
|
|
|
|
#ifndef VasEBoot_MACHINE_EMU
|
|
extern VasEBoot_mm_region_t EXPORT_VAR (VasEBoot_mm_base);
|
|
#endif
|
|
|
|
#endif
|