--- /dev/null
+/*
+ * Jailhouse, a Linux-based partitioning hypervisor
+ *
+ * Copyright (c) Siemens AG, 2014
+ *
+ * Authors:
+ * Jan Kiszka <jan.kiszka@siemens.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2. See
+ * the COPYING file in the top-level directory.
+ *
+ *
+ * Use with tiny-demo config e.g.
+ */
+
+#include <inmate.h>
+
+#ifdef CONFIG_UART_OXPCIE952
+#define UART_BASE 0xe000
+#else
+#define UART_BASE 0x2f8
+#endif
+
+#define IA32_EFER 0xc0000080
+
+void inmate_main(void)
+{
+ printk_uart_base = UART_BASE;
+ printk("This runs in 32-bit mode (EFER: %x)\n", read_msr(IA32_EFER));
+}
LIBDIR := ../../lib/x86
-INMATES := tiny-demo.bin apic-demo.bin ioapic-demo.bin
+INMATES := tiny-demo.bin apic-demo.bin ioapic-demo.bin 32-bit-demo.bin
tiny-demo-y := tiny-demo.o \
$(LIBDIR)/header.o $(LIBDIR)/printk.o $(LIBDIR)/timing.o
$(LIBDIR)/header.o $(LIBDIR)/printk.o $(LIBDIR)/mem.o \
$(LIBDIR)/int.o $(LIBDIR)/ioapic.o
+$(eval $(call DECLARE_32_BIT,32-bit-demo))
+32-bit-demo-y := 32-bit-demo.o \
+ $(LIBDIR)/header-32.o $(LIBDIR)/printk-32.o
+
$(eval $(call DECLARE_TARGETS,$(INMATES)))