1/* 2 * Copyright 2017, Data61 3 * Commonwealth Scientific and Industrial Research Organisation (CSIRO) 4 * ABN 41 687 119 230. 5 * 6 * This software may be distributed and modified according to the terms of 7 * the BSD 2-Clause license. Note that NO WARRANTY is provided. 8 * See "LICENSE_BSD2.txt" for details. 9 * 10 * @TAG(DATA61_BSD) 11 */ 12 13#pragma once 14 15#include <stdint.h> 16#include <simple/simple.h> 17#include <platsupport/pmem.h> 18#include <vka/object.h> 19 20typedef struct { 21 pmem_region_t region; 22 vka_object_t obj; 23} sel4ps_pmem_t; 24 25/** 26 * Returns number of physical memory regions. Each platform has a specific implementation 27 * @param simple libsel4simple implementation 28 * @return Number of regions or -1 on error. 29 */ 30int sel4platsupport_get_num_pmem_regions(simple_t *simple); 31 32/** 33 * Returns an array of physical memory regions. Each platform has a specific implementation 34 * @param simple libsel4simple implementation 35 * @param max_length max length of region array 36 * @param region_list pointer to region array 37 * @return Number of regions or -1 on error. 38 */ 39int sel4platsupport_get_pmem_region_list(simple_t *simple, size_t max_length, pmem_region_t *region_list); 40