1/* 2 * Copyright 2020, Data61, CSIRO (ABN 41 687 119 230) 3 * 4 * SPDX-License-Identifier: GPL-2.0-only 5 */ 6 7#pragma once 8 9#include <config.h> 10#include <types.h> 11#include <arch/types.h> 12#include <util.h> 13#include <object/structures.h> 14 15#ifdef CONFIG_ARM_SMMU 16#include <arch/object/smmu.h> 17#endif 18 19/* The top level asid mapping table */ 20extern asid_pool_t *armKSASIDTable[BIT(asidHighBits)] VISIBLE; 21 22/* This is the temporary userspace page table in kernel. It is required before running 23 * user thread to avoid speculative page table walking with the wrong page table. */ 24extern vspace_root_t armKSGlobalUserVSpace[BIT(seL4_VSpaceIndexBits)] VISIBLE; 25extern pgde_t armKSGlobalKernelPGD[BIT(PGD_INDEX_BITS)] VISIBLE; 26 27extern pude_t armKSGlobalKernelPUD[BIT(PUD_INDEX_BITS)] VISIBLE; 28extern pde_t armKSGlobalKernelPDs[BIT(PUD_INDEX_BITS)][BIT(PD_INDEX_BITS)] VISIBLE; 29extern pte_t armKSGlobalKernelPT[BIT(PT_INDEX_BITS)] VISIBLE; 30 31#ifdef CONFIG_ARM_HYPERVISOR_SUPPORT 32 33extern asid_t armKSHWASIDTable[BIT(hwASIDBits)] VISIBLE; 34extern hw_asid_t armKSNextASID VISIBLE; 35#endif 36 37#ifdef CONFIG_KERNEL_LOG_BUFFER 38pde_t *armKSGlobalLogPDE; 39#endif 40 41 42#ifdef CONFIG_ARM_SMMU 43extern bool_t smmuStateSIDTable[SMMU_MAX_SID]; 44extern cte_t smmuStateSIDNode[BIT(SMMU_SID_CNODE_SLOT_BITS)]; 45extern bool_t smmuStateCBTable[SMMU_MAX_CB]; 46extern cte_t smmuStateCBNode[BIT(SMMU_CB_CNODE_SLOT_BITS)]; 47#endif 48