aboutsummaryrefslogtreecommitdiff
path: root/stand/kboot/include/seg.h
diff options
context:
space:
mode:
Diffstat (limited to 'stand/kboot/include/seg.h')
-rw-r--r--stand/kboot/include/seg.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/stand/kboot/include/seg.h b/stand/kboot/include/seg.h
new file mode 100644
index 000000000000..5ca30670bdd1
--- /dev/null
+++ b/stand/kboot/include/seg.h
@@ -0,0 +1,24 @@
+/*-
+ * Copyright (c) 2024, Netflix, Inc.
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#pragma once
+
+struct memory_segments
+{
+ uint64_t start;
+ uint64_t end;
+ uint64_t type; /* MD defined */
+};
+
+#define SYSTEM_RAM 1
+void init_avail(void);
+void need_avail(int n);
+void add_avail(uint64_t start, uint64_t end, uint64_t type);
+void remove_avail(uint64_t start, uint64_t end, uint64_t type);
+uint64_t first_avail(uint64_t align, uint64_t min_size, uint64_t type);
+void print_avail(void);
+bool populate_avail_from_iomem(void);
+uint64_t space_avail(uint64_t start);