1 // © 2021 Qualcomm Innovation Center, Inc. All rights reserved.
2 //
3 // SPDX-License-Identifier: BSD-3-Clause
4 
5 // Add platform specific memory to the root VM partition.
6 //
7 // The root VM partition is created without any heap (besides possibly a
8 // minimal amount of memory provided by the hyp_partition to seed it). The
9 // platform must provide the rest of the initial memory for the root partition.
10 void
11 platform_add_root_heap(partition_t *partition) REQUIRE_PREEMPT_DISABLED;
12 
13 // Return platform DDR (normal memory) information.
14 // May only be called after platform_ram_probe().
15 platform_ram_info_t *
16 platform_get_ram_info(void);
17 
18 // Should be called once on boot to probe RAM information.
19 // This function expects to be able map to the hyp pagetable.
20 error_t
21 platform_ram_probe(void);
22 
23 #if defined(ARCH_ARM)
24 // Check whether a platform VM page table is undergoing a break-before-make.
25 //
26 // This function is called while handling translation aborts in an address space
27 // that has the platform_pgtable flag set. It should return true if there is any
28 // possibility that an in-progress update of the VM page table has unmapped
29 // pages temporarily as part of an architecturally required break-before-make
30 // sequence while changing the block size of an existing mapping.
31 //
32 // If this function returns true, any translation abort in a read-only address
33 // space will be retried until either the fault is resolved or this function
34 // returns false. The platform code must therefore only return true from this
35 // function for a bounded period of time.
36 //
37 // Note that it is not necessary for the platform code to handle the race
38 // between completion of the break-before-make and reporting of a fault that
39 // occurred before it completed. That race will be handled by the caller.
40 bool
41 platform_pgtable_undergoing_bbm(void);
42 #endif
43