return 0;
}
+
+int ukplat_memregion_count(void)
+{
+ struct ukplat_bootinfo *bi = ukplat_bootinfo_get();
+
+ UK_ASSERT(bi);
+
+ return (int)bi->mrds.count;
+}
+
+int ukplat_memregion_get(int i, struct ukplat_memregion_desc **mrd)
+{
+ struct ukplat_bootinfo *bi = ukplat_bootinfo_get();
+
+ UK_ASSERT(bi);
+ UK_ASSERT(i >= 0);
+
+ if (unlikely((__u32)i >= bi->mrds.count))
+ return -1;
+
+ *mrd = &bi->mrds.mrds[i];
+ return 0;
+}
LIBKVMPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(LIBKVMPLAT_BASE)/x86/intctrl.c
LIBKVMPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(LIBKVMPLAT_BASE)/x86/tscclock.c
LIBKVMPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(LIBKVMPLAT_BASE)/x86/time.c
-LIBKVMPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(LIBKVMPLAT_BASE)/x86/memory.c
ifeq ($(findstring y,$(CONFIG_KVM_KERNEL_VGA_CONSOLE) $(CONFIG_KVM_DEBUG_VGA_CONSOLE)),y)
LIBKVMPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(LIBKVMPLAT_BASE)/x86/vga_console.c
endif
LIBKVMPLAT_SRCS-$(CONFIG_ARCH_ARM_64) += $(LIBKVMPLAT_BASE)/arm/intctrl.c
LIBKVMPLAT_SRCS-$(CONFIG_ARCH_ARM_64) += $(LIBKVMPLAT_BASE)/arm/memory.c
-LIBKVMPLAT_SRCS-y += $(LIBKVMPLAT_BASE)/shutdown.c
-LIBKVMPLAT_SRCS-y += $(LIBKVMPLAT_BASE)/irq.c
-LIBKVMPLAT_SRCS-y += $(LIBKVMPLAT_BASE)/io.c
-LIBKVMPLAT_SRCS-y += $(UK_PLAT_COMMON_BASE)/lcpu.c|common
-LIBKVMPLAT_SRCS-y += $(UK_PLAT_COMMON_BASE)/memory.c|common
-LIBKVMPLAT_SRCS-y += $(UK_PLAT_KVM_DEF_LDS)
+LIBKVMPLAT_SRCS-y += $(LIBKVMPLAT_BASE)/shutdown.c
+LIBKVMPLAT_SRCS-$(CONFIG_ARCH_X86_64) += $(LIBKVMPLAT_BASE)/memory.c
+LIBKVMPLAT_SRCS-y += $(LIBKVMPLAT_BASE)/irq.c
+LIBKVMPLAT_SRCS-y += $(LIBKVMPLAT_BASE)/io.c
+LIBKVMPLAT_SRCS-y += $(UK_PLAT_COMMON_BASE)/lcpu.c|common
+LIBKVMPLAT_SRCS-y += $(UK_PLAT_COMMON_BASE)/memory.c|common
+LIBKVMPLAT_SRCS-y += $(UK_PLAT_KVM_DEF_LDS)
##
## PCI library definitions
--- /dev/null
+/* SPDX-License-Identifier: BSD-3-Clause */
+/* Copyright (c) 2022, Unikraft GmbH and The Unikraft Authors.
+ * Licensed under the BSD-3-Clause License (the "License").
+ * You may not use this file except in compliance with the License.
+ */
+
+int _ukplat_mem_mappings_init(void)
+{
+ return 0;
+}
+++ /dev/null
-/* SPDX-License-Identifier: BSD-3-Clause */
-/* Copyright (c) 2022, Unikraft GmbH and The Unikraft Authors.
- * Licensed under the BSD-3-Clause License (the "License").
- * You may not use this file except in compliance with the License.
- */
-
-#include <uk/plat/common/memory.h>
-#include <uk/plat/common/bootinfo.h>
-
-int ukplat_memregion_count(void)
-{
- struct ukplat_bootinfo *bi = ukplat_bootinfo_get();
-
- UK_ASSERT(bi);
-
- return (int)bi->mrds.count;
-}
-
-int ukplat_memregion_get(int i, struct ukplat_memregion_desc **mrd)
-{
- struct ukplat_bootinfo *bi = ukplat_bootinfo_get();
-
- UK_ASSERT(bi);
- UK_ASSERT(i >= 0);
-
- if (unlikely((__u32)i >= bi->mrds.count))
- return -1;
-
- *mrd = &bi->mrds.mrds[i];
- return 0;
-}
-
-int _ukplat_mem_mappings_init(void)
-{
- return 0;
-}