1 /*
2  * Copyright 2018 The Hafnium Authors.
3  *
4  * Use of this source code is governed by a BSD-style
5  * license that can be found in the LICENSE file or at
6  * https://opensource.org/licenses/BSD-3-Clause.
7  */
8 
9 #pragma once
10 
11 #include <stdbool.h>
12 
13 #include "hf/arch/cpu.h"
14 
15 #include "hf/fdt.h"
16 #include "hf/mm.h"
17 #include "hf/mpool.h"
18 
19 #define MAX_MEM_RANGES 20
20 #define MAX_DEVICE_MEM_RANGES 10
21 
22 struct mem_range {
23 	paddr_t begin;
24 	paddr_t end;
25 };
26 
27 struct boot_params {
28 	cpu_id_t cpu_ids[MAX_CPUS];
29 	size_t cpu_count;
30 	struct mem_range mem_ranges[MAX_MEM_RANGES];
31 	size_t mem_ranges_count;
32 	struct mem_range device_mem_ranges[MAX_DEVICE_MEM_RANGES];
33 	size_t device_mem_ranges_count;
34 	paddr_t initrd_begin;
35 	paddr_t initrd_end;
36 	uintreg_t kernel_arg;
37 };
38 
39 struct boot_params_update {
40 	struct mem_range reserved_ranges[MAX_MEM_RANGES];
41 	size_t reserved_ranges_count;
42 	paddr_t initrd_begin;
43 	paddr_t initrd_end;
44 };
45