From ebfe3d8ff025bce9ee174c22638e53891a7f759c Mon Sep 17 00:00:00 2001 From: Reto Buerki Date: Thu, 12 Mar 2015 10:05:23 +0100 Subject: [PATCH] hw: Use mtc_size from Cpu class for mtc::SIZE This decouples the size of the mode transition control region from the minimal mapping size of the page tables implementation. Rather, the CPU architecture is able to specify the actual size. Rationale: For x86_64, we need the mtc region to span two pages in order to store all the tables required to perform the mode switch. --- repos/base-hw/src/core/include/kernel/pd.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/repos/base-hw/src/core/include/kernel/pd.h b/repos/base-hw/src/core/include/kernel/pd.h index c815099dc5..816fe44120 100644 --- a/repos/base-hw/src/core/include/kernel/pd.h +++ b/repos/base-hw/src/core/include/kernel/pd.h @@ -151,8 +151,7 @@ class Kernel::Mode_transition_control public: enum { - SIZE_LOG2 = Genode::Translation_table::MIN_PAGE_SIZE_LOG2, - SIZE = 1 << SIZE_LOG2, + SIZE = Cpu::mtc_size, VIRT_BASE = Cpu::exception_entry, ALIGN_LOG2 = Genode::Translation_table::ALIGNM_LOG2, ALIGN = 1 << ALIGN_LOG2,