Skip to content

Commit 7a45be2

Browse files
committed
Expand the table
1 parent d576fe3 commit 7a45be2

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

openhcl/openhcl_boot/src/host_params/dma_hint.rs

+32-2
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,44 @@ use super::PartitionInfo;
1313
/// Max VTL2 memory known today is 24838 MiB.
1414
/// (vp_count, vtl2_memory_mb, dma_hint_mb)
1515
const LOOKUP_TABLE: &[(u16, u16, u16)] = &[
16+
(2, 96, 2),
1617
(2, 98, 4),
18+
(2, 100, 4),
19+
(2, 104, 4),
20+
(4, 108, 2),
1721
(4, 110, 6),
22+
(4, 112, 6),
23+
(4, 118, 8),
24+
(4, 130, 12),
25+
(8, 140, 4),
1826
(8, 148, 10),
19-
(16, 256, 18),
27+
(8, 170, 20),
28+
(8, 176, 20),
29+
(16, 234, 12),
30+
(16, 256, 18), // There is another configuration with '20'.
31+
(16, 268, 38),
32+
(16, 282, 54),
33+
(24, 420, 66),
34+
(32, 404, 22),
2035
(32, 516, 36),
36+
(32, 538, 74), // There is another configuration with '52'.
37+
(48, 558, 32),
2138
(48, 718, 52),
39+
(48, 730, 52),
40+
(48, 746, 78),
41+
(64, 712, 42),
2242
(64, 924, 68),
43+
(64, 938, 68),
44+
(96, 1030, 64),
45+
(96, 1042, 114), // Can be '64'.
46+
(96, 1058, 114), // Can be '106'.
2347
(96, 1340, 102),
48+
(96, 1358, 104),
49+
(96, 1382, 120),
50+
(112, 1566, 288),
51+
(128, 1342, 84),
52+
(128, 1360, 84),
53+
// (896, 12912, 516), // Needs to be validated as the vNIC number is unknown.
2454
];
2555

2656
/// Round up to next 2MiB.
@@ -139,7 +169,7 @@ mod test {
139169
mem_type: MemoryMapEntryType::VTL2_PROTECTABLE,
140170
vnode: 0,
141171
});
142-
assert_eq!(vtl2_calculate_dma_hint(112, &storage), 2560);
172+
assert_eq!(vtl2_calculate_dma_hint(112, &storage), 5632);
143173

144174
// Test unusual VP count.
145175
storage.vtl2_ram.clear();

0 commit comments

Comments
 (0)