From 96a0820e89c6eb12f3022fc906053eedbe373540 Mon Sep 17 00:00:00 2001
From: Reto Buerki <reet@codelabs.ch>
Date: Tue, 21 Apr 2015 17:05:34 +0200
Subject: [PATCH] Add Muen-specific platform_support.cc

The file specifies Muen-specific MMIO regions: Sinfo and paravirt timer
pages.
---
 repos/base-hw/lib/mk/x86_64_muen/core.mk      |  2 +-
 .../core/spec/x86_64_muen/platform_support.cc | 32 +++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 repos/base-hw/src/core/spec/x86_64_muen/platform_support.cc

diff --git a/repos/base-hw/lib/mk/x86_64_muen/core.mk b/repos/base-hw/lib/mk/x86_64_muen/core.mk
index f0c7b2351c..8497051d64 100644
--- a/repos/base-hw/lib/mk/x86_64_muen/core.mk
+++ b/repos/base-hw/lib/mk/x86_64_muen/core.mk
@@ -17,8 +17,8 @@ SRC_S += spec/x86_64/kernel/crt0_translation_table.s
 SRC_S += spec/x86_64/crt0.s
 
 # add C++ sources
+SRC_CC += spec/x86_64_muen/platform_support.cc
 SRC_CC += spec/x86_64/kernel/thread_base.cc
-SRC_CC += spec/x86_64/platform_support.cc
 SRC_CC += spec/x86_64/idt.cc
 SRC_CC += spec/x86_64/tss.cc
 SRC_CC += spec/x86/platform_support.cc
diff --git a/repos/base-hw/src/core/spec/x86_64_muen/platform_support.cc b/repos/base-hw/src/core/spec/x86_64_muen/platform_support.cc
new file mode 100644
index 0000000000..d8b2fbd2af
--- /dev/null
+++ b/repos/base-hw/src/core/spec/x86_64_muen/platform_support.cc
@@ -0,0 +1,32 @@
+/*
+ * \brief   Platform implementations specific for x86_64_muen
+ * \author  Reto Buerki
+ * \author  Adrian-Ken Rueegsegger
+ * \date    2015-04-21
+ */
+
+/*
+ * Copyright (C) 2015 Genode Labs GmbH
+ *
+ * This file is part of the Genode OS framework, which is distributed
+ * under the terms of the GNU General Public License version 2.
+ */
+
+/* core includes */
+#include <platform.h>
+
+using namespace Genode;
+
+Native_region * Platform::_core_only_mmio_regions(unsigned const i)
+{
+	static Native_region _regions[] =
+	{
+		/* Sinfo pages */
+		{ 0x000e00000000, 0x7000 },
+		/* Timer page */
+		{ 0x000e00010000, 0x1000 },
+	};
+	return i < sizeof(_regions)/sizeof(_regions[0]) ? &_regions[i] : 0;
+}
+
+void Platform::setup_irq_mode(unsigned, unsigned, unsigned) { }