Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/stand/kboot/include/seg.h
34865 views
1
/*-
2
* Copyright (c) 2024, Netflix, Inc.
3
*
4
* SPDX-License-Identifier: BSD-2-Clause
5
*/
6
7
#pragma once
8
9
struct memory_segments
10
{
11
uint64_t start;
12
uint64_t end;
13
uint64_t type; /* MD defined */
14
};
15
16
#define SYSTEM_RAM 1
17
void init_avail(void);
18
void need_avail(int n);
19
void add_avail(uint64_t start, uint64_t end, uint64_t type);
20
void remove_avail(uint64_t start, uint64_t end, uint64_t type);
21
uint64_t first_avail(uint64_t align, uint64_t min_size, uint64_t type);
22
void print_avail(void);
23
bool populate_avail_from_iomem(void);
24
uint64_t space_avail(uint64_t start);
25
26