Skip to content

Commit 9b772bb

Browse files
committed
vspace: use ASIDPoolBits for the ASIDPool untypes
This was working because ASIDPoolBits == PageBits on all existing platforms, but this might not always be the case. Signed-off-by: julia <git.ts@trainwit.ch>
1 parent 8dd7ac4 commit 9b772bb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

apps/sel4test-tests/src/tests/vspace.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ test_asid_pool_make(env_t env)
135135
{
136136
vka_t *vka = &env->vka;
137137
cspacepath_t path;
138-
seL4_CPtr pool = vka_alloc_untyped_leaky(vka, seL4_PageBits);
138+
seL4_CPtr pool = vka_alloc_untyped_leaky(vka, seL4_ASIDPoolBits);
139139
test_assert(pool);
140140
int ret = vka_cspace_alloc_path(vka, &path);
141141
ret = seL4_ARCH_ASIDControl_MakePool(env->asid_ctrl, pool, env->cspace_root, path.capPtr, path.capDepth);
@@ -161,7 +161,7 @@ test_alloc_multi_asid_pools(env_t env)
161161
int i, ret;
162162

163163
for (i = 0; i < N_ASID_POOLS - 1; i++) { /* Obviously there is already one ASID allocated */
164-
pool = vka_alloc_untyped_leaky(vka, seL4_PageBits);
164+
pool = vka_alloc_untyped_leaky(vka, seL4_ASIDPoolBits);
165165
test_assert(pool);
166166
ret = vka_cspace_alloc_path(vka, &path);
167167
ret = seL4_ARCH_ASIDControl_MakePool(env->asid_ctrl, pool, env->cspace_root, path.capPtr, path.capDepth);
@@ -180,15 +180,15 @@ test_run_out_asid_pools(env_t env)
180180
int i, ret;
181181

182182
for (i = 0; i < N_ASID_POOLS - 1; i++) {
183-
pool = vka_alloc_untyped_leaky(vka, seL4_PageBits);
183+
pool = vka_alloc_untyped_leaky(vka, seL4_ASIDPoolBits);
184184
test_assert(pool);
185185
ret = vka_cspace_alloc_path(vka, &path);
186186
test_eq(ret, seL4_NoError);
187187
ret = seL4_ARCH_ASIDControl_MakePool(env->asid_ctrl, pool, env->cspace_root, path.capPtr, path.capDepth);
188188
test_eq(ret, seL4_NoError);
189189
}
190190

191-
pool = vka_alloc_untyped_leaky(vka, seL4_PageBits);
191+
pool = vka_alloc_untyped_leaky(vka, seL4_ASIDPoolBits);
192192
test_assert(pool);
193193
ret = vka_cspace_alloc_path(vka, &path);
194194
test_eq(ret, seL4_NoError);
@@ -208,7 +208,7 @@ test_overassign_asid_pool(env_t env)
208208
vka_object_t vspaceroot;
209209
int i, ret;
210210

211-
pool = vka_alloc_untyped_leaky(vka, seL4_PageBits);
211+
pool = vka_alloc_untyped_leaky(vka, seL4_ASIDPoolBits);
212212
test_assert(pool);
213213
ret = vka_cspace_alloc_path(vka, &path);
214214
ret = seL4_ARCH_ASIDControl_MakePool(env->asid_ctrl, pool, env->cspace_root, path.capPtr, path.capDepth);
@@ -249,7 +249,7 @@ static int test_create_asid_pools_and_touch(env_t env)
249249
int i, ret;
250250

251251
for (i = 0; i < N_ASID_POOLS - 1; i++) {
252-
pool = vka_alloc_untyped_leaky(vka, seL4_PageBits);
252+
pool = vka_alloc_untyped_leaky(vka, seL4_ASIDPoolBits);
253253
test_assert(pool);
254254
ret = vka_cspace_alloc_path(vka, &poolCap);
255255
ret = seL4_ARCH_ASIDControl_MakePool(env->asid_ctrl, pool, env->cspace_root, poolCap.capPtr, poolCap.capDepth);

0 commit comments

Comments
 (0)