Skip to content

Commit

Permalink
Arm: set kernel_entry_addr
Browse files Browse the repository at this point in the history
The VMM will calculate the entry address, but it should be explicitly
set by the user.

Signed-off-by: Chris Guikema <[email protected]>
  • Loading branch information
chrisguikema authored and axel-h committed Jan 31, 2024
1 parent b7a8e61 commit 1faeedb
Show file tree
Hide file tree
Showing 16 changed files with 53 additions and 13 deletions.
4 changes: 3 additions & 1 deletion apps/Arm/odroid_vm/vm_odroid.camkes
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define VM_RAM_SIZE 0x20000000
#define VM_DTB_ADDR 0x4F000000
#define VM_INITRD_ADDR 0x4D700000
#define VM_ENTRY_ADDR 0x40080000

import <std_connector.camkes>;

Expand Down Expand Up @@ -219,7 +220,8 @@ assembly {
"ram_offset" : VAR_STRINGIZE(VM_RAM_OFFSET),
"dtb_addr" : VAR_STRINGIZE(VM_DTB_ADDR),
"initrd_max_size" : VAR_STRINGIZE(VM_INITRD_MAX_SIZE),
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR)
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR),
"kernel_entry_addr" : VAR_STRINGIZE(VM_ENTRY_ADDR),
};
vm.vm_image_config = {
"map_one_to_one" : true,
Expand Down
4 changes: 3 additions & 1 deletion apps/Arm/vm_cross_connector/exynos5422/devices.camkes
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#define VM_RAM_SIZE 0x10000000
#define VM_DTB_ADDR 0x4F000000
#define VM_INITRD_ADDR 0x4D700000
#define VM_ENTRY_ADDR 0x40008000

assembly {
composition {}
Expand All @@ -24,7 +25,8 @@ assembly {
"ram_offset" : VAR_STRINGIZE(VM_RAM_OFFSET),
"dtb_addr" : VAR_STRINGIZE(VM_DTB_ADDR),
"initrd_max_size" : VAR_STRINGIZE(VM_INITRD_MAX_SIZE),
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR)
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR),
"kernel_entry_addr" : VAR_STRINGIZE(VM_ENTRY_ADDR)
};
vm0.vm_image_config = {
"kernel_bootcmdline" : "console=ttySAC2,115200n8 root=/dev/ram0 nosmp rw debug loglevel=8 pci=nomsi initcall_blacklist=clk_disable_unused",
Expand Down
4 changes: 3 additions & 1 deletion apps/Arm/vm_cross_connector/qemu-arm-virt/devices.camkes
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define VM_RAM_OFFSET 0x00000000
#define VM_DTB_ADDR 0x4F000000
#define VM_INITRD_ADDR 0x4D700000
#define VM_ENTRY_ADDR 0x40080000

assembly {
composition {}
Expand All @@ -24,7 +25,8 @@ assembly {
"ram_offset" : VAR_STRINGIZE(VM_RAM_OFFSET),
"dtb_addr" : VAR_STRINGIZE(VM_DTB_ADDR),
"initrd_max_size" : VAR_STRINGIZE(VM_INITRD_MAX_SIZE),
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR)
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR),
"kernel_entry_addr" : VAR_STRINGIZE(VM_ENTRY_ADDR),
};
vm0.vm_image_config = {
"kernel_bootcmdline" : "pci=nomsi,realloc=off,bios initcall_blacklist=clk_disable_unused",
Expand Down
4 changes: 3 additions & 1 deletion apps/Arm/vm_introspect/exynos5422/devices.camkes
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define VM_RAM_OFFSET 0x00000000
#define VM_DTB_ADDR 0x45801000
#define VM_INITRD_ADDR 0x46c01000
#define VM_ENTRY_ADDR 0x40008000

assembly {
composition {}
Expand All @@ -27,7 +28,8 @@ assembly {
"ram_offset" : VAR_STRINGIZE(VM_RAM_OFFSET),
"dtb_addr" : VAR_STRINGIZE(VM_DTB_ADDR),
"initrd_max_size" : VAR_STRINGIZE(VM_INITRD_MAX_SIZE),
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR)
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR),
"kernel_entry_addr" : VAR_STRINGIZE(VM_ENTRY_ADDR),
};

vm0.vm_image_config = {
Expand Down
4 changes: 3 additions & 1 deletion apps/Arm/vm_introspect/qemu-arm-virt/devices.camkes
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define VM_RAM_OFFSET 0x00000000
#define VM_DTB_ADDR 0x47381000
#define VM_INITRD_ADDR 0x46701000
#define VM_ENTRY_ADDR 0x40080000

assembly {
composition {}
Expand All @@ -27,7 +28,8 @@ assembly {
"ram_offset" : VAR_STRINGIZE(VM_RAM_OFFSET),
"dtb_addr" : VAR_STRINGIZE(VM_DTB_ADDR),
"initrd_max_size" : VAR_STRINGIZE(VM_INITRD_MAX_SIZE),
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR)
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR),
"kernel_entry_addr" : VAR_STRINGIZE(VM_ENTRY_ADDR),
};

vm0.vm_image_config = {
Expand Down
4 changes: 3 additions & 1 deletion apps/Arm/vm_minimal/exynos5422/devices.camkes
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#define VM_RAM_SIZE 0x10000000
#define VM_DTB_ADDR 0x4F000000
#define VM_INITRD_ADDR 0x4D700000
#define VM_ENTRY_ADDR 0x40008000

assembly {
composition {}
Expand All @@ -25,7 +26,8 @@ assembly {
"ram_offset" : VAR_STRINGIZE(VM_RAM_OFFSET),
"dtb_addr" : VAR_STRINGIZE(VM_DTB_ADDR),
"initrd_max_size" : VAR_STRINGIZE(VM_INITRD_MAX_SIZE),
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR)
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR),
"kernel_entry_addr" : VAR_STRINGIZE(VM_ENTRY_ADDR),
};

vm0.vm_image_config = {
Expand Down
4 changes: 3 additions & 1 deletion apps/Arm/vm_minimal/odroidc2/devices.camkes
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#define VM_RAM_SIZE 0x10000000
#define VM_DTB_ADDR 0x2F000000
#define VM_INITRD_ADDR 0x2D700000
#define VM_ENTRY_ADDR 0x20080000

assembly {
composition {}
Expand All @@ -24,7 +25,8 @@ assembly {
"ram_offset" : VAR_STRINGIZE(VM_RAM_OFFSET),
"dtb_addr" : VAR_STRINGIZE(VM_DTB_ADDR),
"initrd_max_size" : VAR_STRINGIZE(VM_INITRD_MAX_SIZE),
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR)
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR),
"kernel_entry_addr" : VAR_STRINGIZE(VM_ENTRY_ADDR),
};

vm0.vm_image_config = {
Expand Down
4 changes: 3 additions & 1 deletion apps/Arm/vm_minimal/qemu-arm-virt/devices.camkes
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define VM_RAM_OFFSET 0x00000000
#define VM_DTB_ADDR 0x4F000000
#define VM_INITRD_ADDR 0x4D700000
#define VM_ENTRY_ADDR 0x40080000

assembly {
composition {}
Expand All @@ -24,7 +25,8 @@ assembly {
"ram_offset" : VAR_STRINGIZE(VM_RAM_OFFSET),
"dtb_addr" : VAR_STRINGIZE(VM_DTB_ADDR),
"initrd_max_size" : VAR_STRINGIZE(VM_INITRD_MAX_SIZE),
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR)
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR),
"kernel_entry_addr" : VAR_STRINGIZE(VM_ENTRY_ADDR),
};

vm0.vm_image_config = {
Expand Down
4 changes: 3 additions & 1 deletion apps/Arm/vm_minimal/tk1/devices.camkes
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#define VM_RAM_OFFSET 0x30000000
#define VM_DTB_ADDR 0x82000000
#define VM_INITRD_ADDR 0x80700000
#define VM_ENTRY_ADDR 0x80080000

assembly {
composition {}
Expand All @@ -25,7 +26,8 @@ assembly {
"ram_offset" : VAR_STRINGIZE(VM_RAM_OFFSET),
"dtb_addr" : VAR_STRINGIZE(VM_DTB_ADDR),
"initrd_max_size" : VAR_STRINGIZE(VM_INITRD_MAX_SIZE),
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR)
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR),
"kernel_entry_addr" : VAR_STRINGIZE(VM_ENTRY_ADDR),
};

vm0.vm_image_config = {
Expand Down
2 changes: 2 additions & 0 deletions apps/Arm/vm_minimal/tx1/devices.camkes
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define VM_RAM_OFFSET 0
#define VM_DTB_ADDR 0x82000000
#define VM_INITRD_ADDR 0x80700000
#define VM_ENTRY_ADDR 0x80080000

assembly {
composition {}
Expand All @@ -25,6 +26,7 @@ assembly {
"dtb_addr" : VAR_STRINGIZE(VM_DTB_ADDR),
"initrd_max_size" : VAR_STRINGIZE(VM_INITRD_MAX_SIZE),
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR),
"kernel_entry_addr" : VAR_STRINGIZE(VM_ENTRY_ADDR),
};
vm0.num_vcpus = 4;

Expand Down
4 changes: 3 additions & 1 deletion apps/Arm/vm_minimal/tx2/devices.camkes
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define VM_RAM_OFFSET 0
#define VM_DTB_ADDR 0xF2000000
#define VM_INITRD_ADDR 0xF7000000
#define VM_ENTRY_ADDR 0xF1080000

assembly {
composition {}
Expand All @@ -24,7 +25,8 @@ assembly {
"ram_offset" : VAR_STRINGIZE(VM_RAM_OFFSET),
"dtb_addr" : VAR_STRINGIZE(VM_DTB_ADDR),
"initrd_max_size" : VAR_STRINGIZE(VM_INITRD_MAX_SIZE),
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR)
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR),
"kernel_entry_addr" : VAR_STRINGIZE(VM_ENTRY_ADDR),
};

vm0.vm_image_config = {
Expand Down
6 changes: 6 additions & 0 deletions apps/Arm/vm_multi/exynos5422/devices.camkes
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@
#define VM0_RAM_SIZE 0x8000000
#define VM0_DTB_ADDR 0x47000000 //VM0_RAM_BASE + 0x7000000
#define VM0_INITRD_ADDR 0x45700000 //VM0_DTB_ADDR - VM_INITRD_MAX_SIZE
#define VM0_ENTRY_ADDR 0x40008000 //VM0_RAM_BASE + 0x8000

#define VM1_RAM_BASE 0x48000000
#define VM1_RAM_SIZE 0x8000000
#define VM1_DTB_ADDR 0x4f000000 //VM1_RAM_BASE + 0x7000000
#define VM1_INITRD_ADDR 0x4d700000 //VM1_DTB_ADDR - VM_INITRD_MAX_SIZE
#define VM1_ENTRY_ADDR 0x48008000 //VM1_RAM_BASE + 0x8000

#define VM2_RAM_BASE 0x50000000
#define VM2_RAM_SIZE 0x8000000
#define VM2_DTB_ADDR 0x57000000 //VM2_RAM_BASE + 0x7000000
#define VM2_INITRD_ADDR 0x55700000 //VM2_DTB_ADDR - VM_INITRD_MAX_SIZE
#define VM2_ENTRY_ADDR 0x50008000 //VM2_RAM_BASE + 0x8000

assembly {
composition {}
Expand All @@ -36,6 +39,7 @@ assembly {
"dtb_addr" : VAR_STRINGIZE(VM0_DTB_ADDR),
"initrd_max_size" : VAR_STRINGIZE(VM_INITRD_MAX_SIZE),
"initrd_addr" : VAR_STRINGIZE(VM0_INITRD_ADDR),
"kernel_entry_addr" : VAR_STRINGIZE(VM0_ENTRY_ADDR),
};
vm0.vm_image_config = {
"kernel_bootcmdline" : "console=hvc0 root=/dev/ram0 nosmp rw debug loglevel=8 pci=nomsi,realloc=off,bios initcall_blacklist=clk_disable_unused",
Expand Down Expand Up @@ -75,6 +79,7 @@ assembly {
"dtb_addr" : VAR_STRINGIZE(VM1_DTB_ADDR),
"initrd_max_size" : VAR_STRINGIZE(VM_INITRD_MAX_SIZE),
"initrd_addr" : VAR_STRINGIZE(VM1_INITRD_ADDR),
"kernel_entry_addr" : VAR_STRINGIZE(VM1_ENTRY_ADDR),
};
vm1.vm_image_config = {
"kernel_bootcmdline" : "console=hvc0 root=/dev/ram0 nosmp rw debug loglevel=8 pci=nomsi initcall_blacklist=clk_disable_unused",
Expand Down Expand Up @@ -103,6 +108,7 @@ assembly {
"dtb_addr" : VAR_STRINGIZE(VM2_DTB_ADDR),
"initrd_max_size" : VAR_STRINGIZE(VM_INITRD_MAX_SIZE),
"initrd_addr" : VAR_STRINGIZE(VM2_INITRD_ADDR),
"kernel_entry_addr" : VAR_STRINGIZE(VM2_ENTRY_ADDR),
};
vm2.vm_image_config = {
"kernel_bootcmdline" : "console=hvc0 root=/dev/ram0 nosmp rw debug loglevel=8 pci=nomsi initcall_blacklist=clk_disable_unused",
Expand Down
6 changes: 6 additions & 0 deletions apps/Arm/vm_multi/qemu-arm-virt/devices.camkes
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@
#define VM0_RAM_SIZE 0x8000000
#define VM0_DTB_ADDR 0x47000000 //VM0_RAM_BASE + 0x7000000
#define VM0_INITRD_ADDR 0x43e00000 //VM0_DTB_ADDR - VM_INITRD_MAX_SIZE
#define VM0_ENTRY_ADDR 0x40080000 //VM0_RAM_BASE + 0x80000

#define VM1_RAM_BASE 0x48000000
#define VM1_RAM_SIZE 0x8000000
#define VM1_DTB_ADDR 0x4f000000 //VM1_RAM_BASE + 0x7000000
#define VM1_INITRD_ADDR 0x4be00000 //VM1_DTB_ADDR - VM_INITRD_MAX_SIZE
#define VM1_ENTRY_ADDR 0x48080000 //VM1_RAM_BASE + 0x80000

#define VM2_RAM_BASE 0x50000000
#define VM2_RAM_SIZE 0x8000000
#define VM2_DTB_ADDR 0x57000000 //VM2_RAM_BASE + 0x7000000
#define VM2_INITRD_ADDR 0x53e00000 //VM2_DTB_ADDR - VM_INITRD_MAX_SIZE
#define VM2_ENTRY_ADDR 0x50080000 //VM2_RAM_BASE + 0x80000

assembly {
composition {}
Expand All @@ -36,6 +39,7 @@ assembly {
"dtb_addr" : VAR_STRINGIZE(VM0_DTB_ADDR),
"initrd_max_size" : VAR_STRINGIZE(VM_INITRD_MAX_SIZE),
"initrd_addr" : VAR_STRINGIZE(VM0_INITRD_ADDR),
"kernel_entry_addr" : VAR_STRINGIZE(VM0_ENTRY_ADDR),
};
vm0.vm_image_config = {
"kernel_bootcmdline" : "console=hvc0 nosmp rw debug loglevel=8 pci=nomsi,realloc=off,bios initcall_blacklist=clk_disable_unused",
Expand Down Expand Up @@ -68,6 +72,7 @@ assembly {
"dtb_addr" : VAR_STRINGIZE(VM1_DTB_ADDR),
"initrd_max_size" : VAR_STRINGIZE(VM_INITRD_MAX_SIZE),
"initrd_addr" : VAR_STRINGIZE(VM1_INITRD_ADDR),
"kernel_entry_addr" : VAR_STRINGIZE(VM1_ENTRY_ADDR),
};
vm1.vm_image_config = {
"kernel_bootcmdline" : "console=hvc0 nosmp rw debug loglevel=8 pci=nomsi,realloc=off,bios initcall_blacklist=clk_disable_unused",
Expand All @@ -94,6 +99,7 @@ assembly {
"dtb_addr" : VAR_STRINGIZE(VM2_DTB_ADDR),
"initrd_max_size" : VAR_STRINGIZE(VM_INITRD_MAX_SIZE),
"initrd_addr" : VAR_STRINGIZE(VM2_INITRD_ADDR),
"kernel_entry_addr" : VAR_STRINGIZE(VM2_ENTRY_ADDR),
};
vm2.vm_image_config = {
"kernel_bootcmdline" : "console=hvc0 nosmp rw debug loglevel=8 pci=nomsi,realloc=off,bios initcall_blacklist=clk_disable_unused",
Expand Down
4 changes: 3 additions & 1 deletion apps/Arm/vm_serial_server/exynos5422/devices.camkes
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#define VM_RAM_SIZE 0x10000000
#define VM_DTB_ADDR 0x4F000000
#define VM_INITRD_ADDR 0x4D700000
#define VM_ENTRY_ADDR 0x40008000

assembly {
composition {}
Expand All @@ -24,7 +25,8 @@ assembly {
"ram_offset" : VAR_STRINGIZE(VM_RAM_OFFSET),
"dtb_addr" : VAR_STRINGIZE(VM_DTB_ADDR),
"initrd_max_size" : VAR_STRINGIZE(VM_INITRD_MAX_SIZE),
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR)
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR),
"kernel_entry_addr" : VAR_STRINGIZE(VM_ENTRY_ADDR),
};

vm.vm_image_config = {
Expand Down
4 changes: 3 additions & 1 deletion apps/Arm/vm_virtio_net/exynos5422/devices.camkes
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#define VM_RAM_SIZE 0x10000000
#define VM_DTB_ADDR 0x4F000000
#define VM_INITRD_ADDR 0x4D700000
#define VM_ENTRY_ADDR 0x40008000

assembly {
composition {}
Expand All @@ -24,7 +25,8 @@ assembly {
"ram_offset" : VAR_STRINGIZE(VM_RAM_OFFSET),
"dtb_addr" : VAR_STRINGIZE(VM_DTB_ADDR),
"initrd_max_size" : VAR_STRINGIZE(VM_INITRD_MAX_SIZE),
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR)
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR),
"kernel_entry_addr" : VAR_STRINGIZE(VM_ENTRY_ADDR),
};

vm0.vm_image_config = {
Expand Down
4 changes: 3 additions & 1 deletion apps/Arm/vm_virtio_net/tx2/devices.camkes
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define VM_RAM_OFFSET 0
#define VM_DTB_ADDR 0xF2000000
#define VM_INITRD_ADDR 0xF7000000
#define VM_ENTRY_ADDR 0xF1080000

assembly {
composition {}
Expand All @@ -24,7 +25,8 @@ assembly {
"ram_offset" : VAR_STRINGIZE(VM_RAM_OFFSET),
"dtb_addr" : VAR_STRINGIZE(VM_DTB_ADDR),
"initrd_max_size" : VAR_STRINGIZE(VM_INITRD_MAX_SIZE),
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR)
"initrd_addr" : VAR_STRINGIZE(VM_INITRD_ADDR),
"kernel_entry_addr" : VAR_STRINGIZE(VM_ENTRY_ADDR),
};

vm0.vm_image_config = {
Expand Down

0 comments on commit 1faeedb

Please sign in to comment.