-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hypervisor: arm64: minimum stubs to allow building on AArch64
Add the minimum stub functions expected by the rest of the codebase to enable building on AArch64. We may implement the missing AArch64 functionality from here. Signed-off-by: Antonios Motakis <antonios.motakis@huawei.com>
- Loading branch information
Showing
14 changed files
with
262 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# | ||
# Jailhouse AArch64 support | ||
# | ||
# Copyright (C) 2015 Huawei Technologies Duesseldorf GmbH | ||
# | ||
# Authors: | ||
# Antonios Motakis <antonios.motakis@huawei.com> | ||
# | ||
# This work is licensed under the terms of the GNU GPL, version 2. See | ||
# the COPYING file in the top-level directory. | ||
# | ||
|
||
include $(CONFIG_MK) | ||
|
||
KBUILD_AFLAGS := $(filter-out -include asm/unified.h,$(KBUILD_AFLAGS)) | ||
|
||
always := built-in.o | ||
|
||
obj-y := entry.o setup.o control.o mmio.o | ||
obj-y += ../arm/mmu_cell.o ../arm/paging.o ../arm/dbg-write.o ../arm/lib.o | ||
|
||
obj-$(CONFIG_SERIAL_AMBA_PL011) += ../arm/dbg-write-pl011.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Jailhouse AArch64 support | ||
* | ||
* Copyright (C) 2015 Huawei Technologies Duesseldorf GmbH | ||
* | ||
* Authors: | ||
* Antonios Motakis <antonios.motakis@huawei.com> | ||
* | ||
* This work is licensed under the terms of the GNU GPL, version 2. See | ||
* the COPYING file in the top-level directory. | ||
*/ | ||
|
||
#include <jailhouse/gen-defines.h> | ||
|
||
void common(void); | ||
|
||
void common(void) | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/* | ||
* Jailhouse AArch64 support | ||
* | ||
* Copyright (C) 2015 Huawei Technologies Duesseldorf GmbH | ||
* | ||
* Authors: | ||
* Antonios Motakis <antonios.motakis@huawei.com> | ||
* | ||
* This work is licensed under the terms of the GNU GPL, version 2. See | ||
* the COPYING file in the top-level directory. | ||
*/ | ||
|
||
#include <jailhouse/control.h> | ||
#include <jailhouse/printk.h> | ||
|
||
int arch_cell_create(struct cell *cell) | ||
{ | ||
return trace_error(-EINVAL); | ||
} | ||
|
||
void arch_flush_cell_vcpu_caches(struct cell *cell) | ||
{ | ||
/* AARCH64_TODO */ | ||
trace_error(-EINVAL); | ||
} | ||
|
||
void arch_cell_destroy(struct cell *cell) | ||
{ | ||
trace_error(-EINVAL); | ||
while (1); | ||
} | ||
|
||
void arch_config_commit(struct cell *cell_added_removed) | ||
{ | ||
} | ||
|
||
void arch_shutdown(void) | ||
{ | ||
trace_error(-EINVAL); | ||
while (1); | ||
} | ||
|
||
void arch_suspend_cpu(unsigned int cpu_id) | ||
{ | ||
trace_error(-EINVAL); | ||
while (1); | ||
} | ||
|
||
void arch_resume_cpu(unsigned int cpu_id) | ||
{ | ||
trace_error(-EINVAL); | ||
while (1); | ||
} | ||
|
||
void arch_reset_cpu(unsigned int cpu_id) | ||
{ | ||
trace_error(-EINVAL); | ||
while (1); | ||
} | ||
|
||
void arch_park_cpu(unsigned int cpu_id) | ||
{ | ||
trace_error(-EINVAL); | ||
while (1); | ||
} | ||
|
||
void arch_shutdown_cpu(unsigned int cpu_id) | ||
{ | ||
trace_error(-EINVAL); | ||
while (1); | ||
} | ||
|
||
void __attribute__((noreturn)) arch_panic_stop(void) | ||
{ | ||
trace_error(-EINVAL); | ||
while (1); | ||
} | ||
|
||
void arch_panic_park(void) | ||
{ | ||
trace_error(-EINVAL); | ||
while (1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Jailhouse AArch64 support | ||
* | ||
* Copyright (C) 2015 Huawei Technologies Duesseldorf GmbH | ||
* | ||
* Authors: | ||
* Antonios Motakis <antonios.motakis@huawei.com> | ||
* | ||
* This work is licensed under the terms of the GNU GPL, version 2. See | ||
* the COPYING file in the top-level directory. | ||
*/ | ||
|
||
/* Entry point for Linux loader module on JAILHOUSE_ENABLE */ | ||
.text | ||
.globl arch_entry | ||
arch_entry: | ||
mov x0, -22 | ||
ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Jailhouse AArch64 support | ||
* | ||
* Copyright (C) 2015 Huawei Technologies Duesseldorf GmbH | ||
* | ||
* Authors: | ||
* Antonios Motakis <antonios.motakis@huawei.com> | ||
* | ||
* This work is licensed under the terms of the GNU GPL, version 2. See | ||
* the COPYING file in the top-level directory. | ||
*/ | ||
|
||
#ifndef _JAILHOUSE_ASM_HEAD_H | ||
#define _JAILHOUSE_ASM_HEAD_H_ | ||
|
||
#endif /* !_JAILHOUSE_ASM_HEAD_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Jailhouse AArch64 support | ||
* | ||
* Copyright (C) 2015 Huawei Technologies Duesseldorf GmbH | ||
* | ||
* Authors: | ||
* Antonios Motakis <antonios.motakis@huawei.com> | ||
* | ||
* This work is licensed under the terms of the GNU GPL, version 2. See | ||
* the COPYING file in the top-level directory. | ||
*/ | ||
|
||
#ifndef _JAILHOUSE_ASM_PLATFORM_H | ||
#define _JAILHOUSE_ASM_PLATFORM_H | ||
|
||
#include <jailhouse/config.h> | ||
|
||
#endif /* !_JAILHOUSE_ASM_PLATFORM_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Jailhouse AArch64 support | ||
* | ||
* Copyright (C) 2015 Huawei Technologies Duesseldorf GmbH | ||
* | ||
* Authors: | ||
* Antonios Motakis <antonios.motakis@huawei.com> | ||
* | ||
* This work is licensed under the terms of the GNU GPL, version 2. See | ||
* the COPYING file in the top-level directory. | ||
*/ | ||
|
||
#include <jailhouse/entry.h> | ||
#include <jailhouse/mmio.h> | ||
#include <jailhouse/printk.h> | ||
|
||
unsigned int arch_mmio_count_regions(struct cell *cell) | ||
{ | ||
/* not entirely a lie :) */ | ||
return 0; | ||
} | ||
|
||
void arm_mmio_perform_access(unsigned long base, struct mmio_access *mmio) | ||
{ | ||
trace_error(-EINVAL); | ||
while (1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Jailhouse AArch64 support | ||
* | ||
* Copyright (C) 2015 Huawei Technologies Duesseldorf GmbH | ||
* | ||
* Authors: | ||
* Antonios Motakis <antonios.motakis@huawei.com> | ||
* | ||
* This work is licensed under the terms of the GNU GPL, version 2. See | ||
* the COPYING file in the top-level directory. | ||
*/ | ||
|
||
#include <jailhouse/entry.h> | ||
#include <jailhouse/printk.h> | ||
|
||
int arch_init_early(void) | ||
{ | ||
return trace_error(-EINVAL); | ||
} | ||
|
||
int arch_cpu_init(struct per_cpu *cpu_data) | ||
{ | ||
return trace_error(-EINVAL); | ||
} | ||
|
||
int arch_init_late(void) | ||
{ | ||
return trace_error(-EINVAL); | ||
} | ||
|
||
void __attribute__((noreturn)) arch_cpu_activate_vmm(struct per_cpu *cpu_data) | ||
{ | ||
trace_error(-EINVAL); | ||
while (1); | ||
} | ||
|
||
void arch_cpu_restore(struct per_cpu *cpu_data, int return_code) | ||
{ | ||
trace_error(-EINVAL); | ||
while (1); | ||
} |
Empty file.
Empty file.
Empty file.