mirror of
https://review.haiku-os.org/haiku
synced 2025-01-31 02:35:03 +01:00
d1ef184af6
Will be used in following commits. Change-Id: Ica89d28cbf6980aca8dc347dfdcb200a0e637e9a Reviewed-on: https://review.haiku-os.org/c/haiku/+/8442 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
51 lines
1.5 KiB
C
51 lines
1.5 KiB
C
/*
|
|
* Copyright 2010, Ingo Weinhold, ingo_weinhold@gmx.de.
|
|
* Copyright 2004-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef KERNEL_BOOT_ADDR_RANGE_H
|
|
#define KERNEL_BOOT_ADDR_RANGE_H
|
|
|
|
|
|
#include <SupportDefs.h>
|
|
|
|
|
|
typedef struct addr_range {
|
|
uint64 start;
|
|
uint64 size;
|
|
} _PACKED addr_range;
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
status_t insert_address_range(addr_range* ranges, uint32* _numRanges,
|
|
uint32 maxRanges, uint64 start, uint64 size);
|
|
status_t remove_address_range(addr_range* ranges, uint32* _numRanges,
|
|
uint32 maxRanges, uint64 start, uint64 size);
|
|
bool get_free_address_range(addr_range* ranges, uint32 numRanges, uint64 base,
|
|
uint64 size, uint64* _rangeBase);
|
|
bool is_address_range_covered(addr_range* ranges, uint32 numRanges, uint64 base,
|
|
uint64 size);
|
|
uint64 total_address_ranges_size(addr_range* ranges, uint32 numRanges);
|
|
void sort_address_ranges(addr_range* ranges, uint32 numRanges);
|
|
|
|
status_t insert_physical_memory_range(uint64 start, uint64 size);
|
|
status_t remove_physical_memory_range(uint64 start, uint64 size);
|
|
uint64 total_physical_memory();
|
|
|
|
status_t insert_physical_allocated_range(uint64 start, uint64 size);
|
|
status_t remove_physical_allocated_range(uint64 start, uint64 size);
|
|
|
|
status_t insert_virtual_allocated_range(uint64 start, uint64 size);
|
|
status_t remove_virtual_allocated_range(uint64 start, uint64 size);
|
|
|
|
void ignore_physical_memory_ranges_beyond_4gb();
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* KERNEL_BOOT_ADDR_RANGE_H */
|