From f928cd0722ce638db0c6ec81d6fa5c622e9f6ee1 Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Thu, 27 Jul 2023 15:52:32 -0300 Subject: [PATCH] refactor: move DTB before RAM and increase its size to 1MB --- lib/machine-emulator-defines | 2 +- src/test-machine-c-api.cpp | 4 ++-- src/tests/machine-bind.lua | 6 +++--- src/tests/machine-test.lua | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/machine-emulator-defines b/lib/machine-emulator-defines index 250330354..b58103519 160000 --- a/lib/machine-emulator-defines +++ b/lib/machine-emulator-defines @@ -1 +1 @@ -Subproject commit 2503303544a146997d9a00e8e32df99af0e06884 +Subproject commit b5810351908f7505c4bdb7cab6fb26da608012d8 diff --git a/src/test-machine-c-api.cpp b/src/test-machine-c-api.cpp index d4fa3e1b8..ab5ddcfbf 100644 --- a/src/test-machine-c-api.cpp +++ b/src/test-machine-c-api.cpp @@ -1496,11 +1496,11 @@ BOOST_FIXTURE_TEST_CASE_NOLINT(get_initial_config_flash_drive_test, flash_drive_ BOOST_FIXTURE_TEST_CASE_NOLINT(dump_pmas_null_placeholder_test, flash_drive_machine_fixture) { std::array dump_list{ "0000000000000000--0000000000001000.bin", // shadow state - "0000000000001000--000000000000f000.bin", // dtb "0000000000010000--0000000000001000.bin", // shadow pmas "0000000000020000--0000000000006000.bin", // shadow tlb "0000000002000000--00000000000c0000.bin", // clint "0000000040008000--0000000000001000.bin", // htif + "000000007ff00000--0000000000100000.bin", // dtb "0000000080000000--0000000000100000.bin", // ram "0080000000000000--0000000003c00000.bin" // flash drive }; @@ -1517,11 +1517,11 @@ BOOST_FIXTURE_TEST_CASE_NOLINT(dump_pmas_null_placeholder_test, flash_drive_mach BOOST_FIXTURE_TEST_CASE_NOLINT(dump_pmas_basic_test, flash_drive_machine_fixture) { std::array dump_list{ "0000000000000000--0000000000001000.bin", // shadow state - "0000000000001000--000000000000f000.bin", // dtb "0000000000010000--0000000000001000.bin", // shadow pmas "0000000000020000--0000000000006000.bin", // shadow tlb "0000000002000000--00000000000c0000.bin", // clint "0000000040008000--0000000000001000.bin", // htif + "000000007ff00000--0000000000100000.bin", // dtb "0000000080000000--0000000000100000.bin", // ram "0080000000000000--0000000003c00000.bin" // flash drive }; diff --git a/src/tests/machine-bind.lua b/src/tests/machine-bind.lua index 558d28dae..063a7f44d 100755 --- a/src/tests/machine-bind.lua +++ b/src/tests/machine-bind.lua @@ -248,15 +248,15 @@ end local pmas_file_names = { "0000000000000000--0000000000001000.bin", -- shadow state - "0000000000001000--000000000000f000.bin", -- dtb "0000000000010000--0000000000001000.bin", -- shadow pmas "0000000000020000--0000000000006000.bin", -- shadow tlb "0000000002000000--00000000000c0000.bin", -- clint "0000000040008000--0000000000001000.bin", -- htif - "0000000080000000--0000000000100000.bin", -- ram "0000000070000000--0000000000010000.bin", -- uarch ram + "000000007ff00000--0000000000100000.bin", -- dtb + "0000000080000000--0000000000100000.bin", -- ram } -local pmas_sizes = { 4096, 61440, 4096, 24576, 786432, 4096, 1048576, 65536, 65536 } +local pmas_sizes = { 0x1000, 0x1000, 0x6000, 0xc0000, 0x1000, 0x10000, 0x100000, 0x100000 } local remote local function build_machine(type) diff --git a/src/tests/machine-test.lua b/src/tests/machine-test.lua index 7e0cc360c..32f6861b8 100755 --- a/src/tests/machine-test.lua +++ b/src/tests/machine-test.lua @@ -149,21 +149,21 @@ end local pmas_file_names = { "0000000000000000--0000000000001000.bin", -- shadow state - "0000000000001000--000000000000f000.bin", -- dtb "0000000000010000--0000000000001000.bin", -- shadow pmas "0000000000020000--0000000000006000.bin", -- shadow tlb "0000000002000000--00000000000c0000.bin", -- clint "0000000040008000--0000000000001000.bin", -- htif "0000000080000000--0000000000100000.bin", -- ram + "000000007ff00000--0000000000100000.bin", -- dtb } local pmas_file_names_with_uarch = { "0000000000000000--0000000000001000.bin", -- shadow state - "0000000000001000--000000000000f000.bin", -- dtb "0000000000010000--0000000000001000.bin", -- shadow pmas "0000000000020000--0000000000006000.bin", -- shadow tlb "0000000002000000--00000000000c0000.bin", -- clint "0000000040008000--0000000000001000.bin", -- htif + "000000007ff00000--0000000000100000.bin", -- dtb "0000000080000000--0000000000100000.bin", -- ram "0000000070000000--0000000000100000.bin", -- uarch ram }