vaseboot/include/VasEBoot/ieee1275/alloc.h

40 lines
1.5 KiB
C

/* alloc.h - Memory allocation for PowerVM, KVM on Power, and i386 */
/*
* VAS_EBOOT -- GRand Unified Bootloader
* Copyright (C) 2023 Free Software Foundation, Inc.
* Copyright (C) 2023 IBM Corporation
*
* VAS_EBOOT 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.
*
* VAS_EBOOT 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 VAS_EBOOT. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef VAS_EBOOT_IEEE1275_ALLOC_HEADER
#define VAS_EBOOT_IEEE1275_ALLOC_HEADER 1
#include <stdbool.h>
#include <VasEBoot/memory.h>
struct regions_claim_request {
unsigned int flags; /* VAS_EBOOT_MM_ADD_REGION_(NONE|CONSECUTIVE) */
VasEBoot_uint32_t total; /* number of requested bytes */
bool init_region; /* whether to add memory to the heap using VasEBoot_mm_init_region() */
VasEBoot_uint64_t addr; /* result address */
VasEBoot_size_t align; /* alignment restrictions */
};
int EXPORT_FUNC(VasEBoot_regions_claim) (VasEBoot_uint64_t addr, VasEBoot_uint64_t len,
VasEBoot_memory_type_t type, void *data);
#endif /* VAS_EBOOT_IEEE1275_ALLOC_HEADER */