Remove phys_addr_range, just use addr_range for both virtual and physical address ranges (as requested by Ingo).

This commit is contained in:
Alex Smith
2012-06-21 19:48:03 +01:00
parent 5915eeb461
commit 17a3389882
13 changed files with 145 additions and 242 deletions
+2 -18
View File
@@ -16,12 +16,6 @@ typedef struct addr_range {
} _PACKED addr_range;
typedef struct phys_addr_range {
phys_addr_t start;
phys_size_t size;
} _PACKED phys_addr_range;
#ifdef __cplusplus
extern "C" {
#endif
@@ -36,18 +30,8 @@ bool is_address_range_covered(addr_range* ranges, uint32 numRanges, uint64 base,
uint64 size);
void sort_address_ranges(addr_range* ranges, uint32 numRanges);
status_t insert_physical_address_range(phys_addr_range* ranges,
uint32* _numRanges, uint32 maxRanges, phys_addr_t start, phys_size_t size);
status_t remove_physical_address_range(phys_addr_range* ranges,
uint32* _numRanges, uint32 maxRanges, phys_addr_t start, phys_size_t size);
bool get_free_physical_address_range(phys_addr_range* ranges, uint32 numRanges,
phys_addr_t base, phys_size_t size, phys_addr_t* _rangeBase);
bool is_physical_address_range_covered(phys_addr_range* ranges,
uint32 numRanges, phys_addr_t base, phys_size_t size);
void sort_physical_address_ranges(phys_addr_range* ranges, uint32 numRanges);
status_t insert_physical_memory_range(phys_addr_t start, phys_size_t size);
status_t insert_physical_allocated_range(phys_addr_t start, phys_size_t size);
status_t insert_physical_memory_range(uint64 start, uint64 size);
status_t insert_physical_allocated_range(uint64 start, uint64 size);
status_t insert_virtual_allocated_range(uint64 start, uint64 size);
void ignore_physical_memory_ranges_beyond_4gb();
+10 -10
View File
@@ -47,15 +47,15 @@ typedef struct kernel_args {
struct preloaded_image kernel_image;
FixedWidthPointer<struct preloaded_image> preloaded_images;
uint32 num_physical_memory_ranges;
phys_addr_range physical_memory_range[MAX_PHYSICAL_MEMORY_RANGE];
uint32 num_physical_allocated_ranges;
phys_addr_range physical_allocated_range[MAX_PHYSICAL_ALLOCATED_RANGE];
uint32 num_virtual_allocated_ranges;
addr_range virtual_allocated_range[MAX_VIRTUAL_ALLOCATED_RANGE];
uint32 num_kernel_args_ranges;
addr_range kernel_args_range[MAX_KERNEL_ARGS_RANGE];
uint64 ignored_physical_memory;
uint32 num_physical_memory_ranges;
addr_range physical_memory_range[MAX_PHYSICAL_MEMORY_RANGE];
uint32 num_physical_allocated_ranges;
addr_range physical_allocated_range[MAX_PHYSICAL_ALLOCATED_RANGE];
uint32 num_virtual_allocated_ranges;
addr_range virtual_allocated_range[MAX_VIRTUAL_ALLOCATED_RANGE];
uint32 num_kernel_args_ranges;
addr_range kernel_args_range[MAX_KERNEL_ARGS_RANGE];
uint64 ignored_physical_memory;
uint32 num_cpus;
addr_range cpu_kstack[MAX_BOOT_CPUS];
@@ -67,7 +67,7 @@ typedef struct kernel_args {
FixedWidthPointer<struct driver_settings_file> driver_settings;
struct {
phys_addr_range physical_buffer;
addr_range physical_buffer;
uint32 bytes_per_row;
uint16 width;
uint16 height;