#include <uk/config.h>
#include <uk/assert.h>
#include <uk/essentials.h>
+#include <uk/arch/paging.h>
#include <uk/arch/types.h>
#include <uk/plat/memory.h>
return ukplat_memregion_list_insert(list, &mrd);
}
+
+#if defined(CONFIG_HAVE_SMP)
+extern void *x86_start16_begin[];
+extern void *x86_start16_end[];
+extern __uptr x86_start16_addr; /* target address */
+
+static inline int
+ukplat_memregion_alloc_sipi_vect(void)
+{
+ __sz len;
+
+ len = (__sz)((__uptr)x86_start16_end - (__uptr)x86_start16_begin);
+ len = PAGE_ALIGN_UP(len);
+ x86_start16_addr = (__uptr)ukplat_memregion_alloc(len,
+ UKPLAT_MEMRT_RESERVED,
+ UKPLAT_MEMRF_READ |
+ UKPLAT_MEMRF_WRITE |
+ UKPLAT_MEMRF_MAP);
+ if (unlikely(!x86_start16_addr || x86_start16_addr >= X86_HI_MEM_START))
+ return -ENOMEM;
+
+ return 0;
+}
+#else
+static inline int
+ukplat_memregion_alloc_sipi_vect(void)
+{
+ return 0;
+}
+#endif
#endif
/**