Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 65 additions & 50 deletions build_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,172 +180,187 @@ class KernelPath:
gcc_cpu="cortex-a35",
loader_link_address=0x90000000,
smp_cores=4,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_AARCH64 | {
"KernelPlatform": "tqma8xqp1gb",
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
},
),
BoardInfo(
name="zcu102",
arch=KernelArch.AARCH64,
gcc_cpu="cortex-a53",
loader_link_address=0x40000000,
smp_cores=4,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_AARCH64 | {
"KernelPlatform": "zynqmp",
"KernelARMPlatform": "zcu102",
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
},
),
BoardInfo(
name="maaxboard",
arch=KernelArch.AARCH64,
gcc_cpu="cortex-a53",
loader_link_address=0x50000000,
smp_cores=4,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_AARCH64 | {
"KernelPlatform": "maaxboard",
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
},
),
BoardInfo(
name="imx8mm_evk",
arch=KernelArch.AARCH64,
gcc_cpu="cortex-a53",
loader_link_address=0x41000000,
smp_cores=4,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_AARCH64 | {
"KernelPlatform": "imx8mm-evk",
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
},
),
BoardInfo(
name="imx8mp_evk",
arch=KernelArch.AARCH64,
gcc_cpu="cortex-a53",
loader_link_address=0x41000000,
smp_cores=4,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_AARCH64 | {
"KernelPlatform": "imx8mp-evk",
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
},
),
BoardInfo(
name="imx8mq_evk",
arch=KernelArch.AARCH64,
gcc_cpu="cortex-a53",
loader_link_address=0x41000000,
smp_cores=4,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_AARCH64 | {
"KernelPlatform": "imx8mq-evk",
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
},
),
BoardInfo(
name="imx8mp_iotgate",
arch=KernelArch.AARCH64,
gcc_cpu="cortex-a53",
loader_link_address=0x50000000,
smp_cores=4,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_AARCH64 | {
"KernelPlatform": "imx8mp-evk",
"KernelCustomDTS": Path("custom_dts/iot-gate.dts"),
"KernelCustomDTSOverlay": KernelPath(path="src/plat/imx8m-evk/overlay-imx8mp-evk.dts"),
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
},
),
BoardInfo(
name="odroidc2",
arch=KernelArch.AARCH64,
gcc_cpu="cortex-a53",
loader_link_address=0x20000000,
smp_cores=4,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_AARCH64 | {
"KernelPlatform": "odroidc2",
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
},
),
BoardInfo(
name="odroidc4",
arch=KernelArch.AARCH64,
gcc_cpu="cortex-a55",
loader_link_address=0x20000000,
smp_cores=4,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_AARCH64 | {
"KernelPlatform": "odroidc4",
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
},
),
BoardInfo(
name="ultra96v2",
arch=KernelArch.AARCH64,
gcc_cpu="cortex-a53",
loader_link_address=0x40000000,
smp_cores=4,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_AARCH64 | {
"KernelPlatform": "zynqmp",
"KernelARMPlatform": "ultra96v2",
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
},
),
BoardInfo(
name="qemu_virt_aarch64",
arch=KernelArch.AARCH64,
gcc_cpu="cortex-a53",
loader_link_address=0x70000000,
smp_cores=4,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_AARCH64 | {
"KernelPlatform": "qemu-arm-virt",
"QEMU_MEMORY": "2048",
# There is no peripheral timer, so we use the ARM
# architectural timer
"KernelArmExportPTMRUser": True,
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
},
),
BoardInfo(
name="qemu_virt_aarch64_kvm",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, now that all the code changes are done: this should be called probably "_el1" or otherwise "non_hyp"; it's not for KVM more just a seeming limitation of KVM that it can't emulate EL2.

And you should add this board to the manual.md.

arch=KernelArch.AARCH64,
gcc_cpu="cortex-a53",
loader_link_address=0x70000000,
smp_cores=4,
kernel_options=DEFAULT_KERNEL_OPTIONS_AARCH64 | {
"KernelPlatform": "qemu-arm-virt",
"KernelArmHypervisorSupport": False,
"QEMU_MEMORY": "2048",
# There is no peripheral timer, so we use the ARM
# architectural timer
"KernelArmExportPTMRUser": True,
},
),
BoardInfo(
name="qemu_virt_riscv64",
arch=KernelArch.RISCV64,
gcc_cpu=None,
loader_link_address=0x90000000,
smp_cores=4,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_RISCV64 | {
"KernelPlatform": "qemu-riscv-virt",
"QEMU_MEMORY": "2048",
} | DEFAULT_KERNEL_OPTIONS_RISCV64,
},
),
BoardInfo(
name="rpi4b_1gb",
arch=KernelArch.AARCH64,
gcc_cpu="cortex-a72",
loader_link_address=0x10000000,
smp_cores=4,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_AARCH64 | {
"KernelPlatform": "bcm2711",
"RPI4_MEMORY": 1024,
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
},
),
BoardInfo(
name="rpi4b_2gb",
arch=KernelArch.AARCH64,
gcc_cpu="cortex-a72",
loader_link_address=0x10000000,
smp_cores=4,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_AARCH64 | {
"KernelPlatform": "bcm2711",
"RPI4_MEMORY": 2048,
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
},
),
BoardInfo(
name="rpi4b_4gb",
arch=KernelArch.AARCH64,
gcc_cpu="cortex-a72",
loader_link_address=0x10000000,
smp_cores=4,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_AARCH64 | {
"KernelPlatform": "bcm2711",
"RPI4_MEMORY": 4096,
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
},
),
BoardInfo(
name="rpi4b_8gb",
arch=KernelArch.AARCH64,
gcc_cpu="cortex-a72",
loader_link_address=0x10000000,
smp_cores=4,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_AARCH64 | {
"KernelPlatform": "bcm2711",
"RPI4_MEMORY": 8192,
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
},
),
BoardInfo(
name="rockpro64",
Expand All @@ -355,88 +370,88 @@ class KernelPath:
# ROCKPRO64 has 4 Cortex-A53 cores and 2 Cortex-A72 cores,
# we always run on the Cortex-A53s.
smp_cores=4,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_AARCH64 | {
"KernelPlatform": "rockpro64",
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
},
),
BoardInfo(
name="rock3b",
arch=KernelArch.AARCH64,
gcc_cpu="cortex-a55",
loader_link_address=0x30000000,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_AARCH64 | {
"KernelPlatform": "rk3568",
} | DEFAULT_KERNEL_OPTIONS_AARCH64,
},
),
BoardInfo(
name="hifive_p550",
arch=KernelArch.RISCV64,
gcc_cpu=None,
loader_link_address=0x90000000,
smp_cores=4,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_RISCV64 | {
"KernelPlatform": "hifive-p550",
} | DEFAULT_KERNEL_OPTIONS_RISCV64,
},
),
BoardInfo(
name="star64",
arch=KernelArch.RISCV64,
gcc_cpu=None,
loader_link_address=0x60000000,
smp_cores=4,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_RISCV64 | {
"KernelPlatform": "star64",
} | DEFAULT_KERNEL_OPTIONS_RISCV64,
},
),
BoardInfo(
name="ariane",
arch=KernelArch.RISCV64,
gcc_cpu=None,
loader_link_address=0x90000000,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_RISCV64 | {
"KernelPlatform": "ariane",
} | DEFAULT_KERNEL_OPTIONS_RISCV64,
},
),
BoardInfo(
name="cheshire",
arch=KernelArch.RISCV64,
gcc_cpu=None,
loader_link_address=0x90000000,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_RISCV64 | {
"KernelPlatform": "cheshire",
} | DEFAULT_KERNEL_OPTIONS_RISCV64,
},
),
BoardInfo(
name="serengeti",
arch=KernelArch.RISCV64,
gcc_cpu=None,
loader_link_address=0x90000000,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_RISCV64 | {
"KernelPlatform": "cheshire",
} | DEFAULT_KERNEL_OPTIONS_RISCV64,
},
),
BoardInfo(
name="x86_64_generic",
arch=KernelArch.X86_64,
gcc_cpu="generic",
loader_link_address=None,
smp_cores=DEFAULT_X86_NUM_CPUS,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_X86_64 | {
"KernelSupportPCID": False,
"KernelVTX": False,
} | DEFAULT_KERNEL_OPTIONS_X86_64,
},
),
BoardInfo(
name="x86_64_generic_vtx",
arch=KernelArch.X86_64,
gcc_cpu="generic",
loader_link_address=None,
smp_cores=DEFAULT_X86_NUM_CPUS,
kernel_options={
kernel_options=DEFAULT_KERNEL_OPTIONS_X86_64 | {
"KernelSupportPCID": False,
"KernelVTX": True,
"KernelX86_64VTX64BitGuests": True,
} | DEFAULT_KERNEL_OPTIONS_X86_64,
},
),
)

Expand Down
4 changes: 4 additions & 0 deletions loader/src/aarch64/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
#if defined(CONFIG_PLAT_ZYNQMP_ZCU102) || defined(CONFIG_PLAT_ZYNQMP_ULTRA96V2) || defined(CONFIG_PLAT_QEMU_ARM_VIRT)
static void configure_gicv2(void)
{
if (current_el() == EL1) {
return;
}

/* The ZCU102 start in EL3, and then we drop to EL1(NS).
*
* The GICv2 supports security extensions (as does the CPU).
Expand Down
7 changes: 0 additions & 7 deletions tool/microkit/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,13 +401,6 @@ fn main() -> Result<(), String> {
std::process::exit(1);
}

if let Arch::Aarch64 = kernel_config.arch {
assert!(
kernel_config.hypervisor,
"Microkit tool expects a kernel with hypervisor mode enabled on AArch64."
);
}

assert!(
kernel_config.word_size == 64,
"Microkit tool has various assumptions about the word size being 64-bits."
Expand Down