sel4: disable large mappings for device memory

Issue #2044
This commit is contained in:
Alexander Boettcher 2016-07-12 18:14:24 +02:00 committed by Christian Helmuth
parent 657dd5faad
commit 4d10a28411
3 changed files with 17 additions and 1 deletions

View File

@ -0,0 +1,11 @@
--- src/kernel/sel4/src/arch/x86/kernel/boot.c
+++ src/kernel/sel4/src/arch/x86/kernel/boot.c
@@ -83,7 +83,7 @@ create_device_frames(
/* use large frames if possible, otherwise use 4K frames */
if (IS_ALIGNED(dev_reg.start, LARGE_PAGE_BITS) &&
IS_ALIGNED(dev_reg.end, LARGE_PAGE_BITS)) {
- frame_size = X86_LargePage;
+ frame_size = X86_SmallPage;
} else {
frame_size = X86_SmallPage;
}

View File

@ -1 +1 @@
4a35ff120456dea8de73ace7d9af53ace91da540
c8947bc79b1c29d570be6ad917c8310bc79d39e1

View File

@ -144,6 +144,11 @@ void Platform::_init_allocators()
for (unsigned region = 0; region < bi.numDeviceRegions; region++) {
size_t const frame_size = 1UL << bi.deviceRegions[region].frameSizeBits;
if (frame_size != 4096) {
error("unsupported device memory frame size of ", Hex(frame_size));
class Unsupported_dev_memory_framesize{};
throw Unsupported_dev_memory_framesize();
}
for (uint64_t sel = bi.deviceRegions[region].frames.start,
phys_addr = bi.deviceRegions[region].basePaddr;