2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2021 Beckhoff Automation GmbH & Co. KG
5 * Author: Corvin Köhne <c.koehne@beckhoff.com>
12 #include "qemu_fwcfg.h"
14 enum e820_memory_type {
16 E820_TYPE_RESERVED = 2,
21 enum e820_allocation_strategy {
22 /* allocate any address */
24 /* allocate lowest address larger than address */
26 /* allocate highest address lower than address */
27 E820_ALLOCATE_HIGHEST,
28 /* allocate a specific address */
29 E820_ALLOCATE_SPECIFIC
38 #define E820_ALIGNMENT_NONE 1
40 uint64_t e820_alloc(const uint64_t address, const uint64_t length,
41 const uint64_t alignment, const enum e820_memory_type type,
42 const enum e820_allocation_strategy strategy);
43 void e820_dump_table(void);
44 struct qemu_fwcfg_item *e820_get_fwcfg_item(void);
45 int e820_init(struct vmctx *const ctx);