summaryrefslogtreecommitdiffstats
path: root/efi_memtest
diff options
context:
space:
mode:
authorRegina König2021-03-30 02:10:19 +0200
committerRegina König2021-03-30 02:10:19 +0200
commit9cb21148f0447c6802b562f0191bc564651905cc (patch)
tree70ca6726779251c809cebd589bf218b7516d6dcb /efi_memtest
parentAdded additional entry to allocation_map: depth of d&cc algorithm (diff)
downloadmemtest86-9cb21148f0447c6802b562f0191bc564651905cc.tar.gz
memtest86-9cb21148f0447c6802b562f0191bc564651905cc.tar.xz
memtest86-9cb21148f0447c6802b562f0191bc564651905cc.zip
trying to allocate only segment 5
Diffstat (limited to 'efi_memtest')
-rw-r--r--efi_memtest/memtest86+/efi/page_allocator.h2
-rw-r--r--efi_memtest/memtest86+/efi/test.c4
-rw-r--r--efi_memtest/memtest86+/main.c6
3 files changed, 7 insertions, 5 deletions
diff --git a/efi_memtest/memtest86+/efi/page_allocator.h b/efi_memtest/memtest86+/efi/page_allocator.h
index 44feefd..427ae05 100644
--- a/efi_memtest/memtest86+/efi/page_allocator.h
+++ b/efi_memtest/memtest86+/efi/page_allocator.h
@@ -4,7 +4,7 @@ struct allocation_map_entry {
int iteration; // As there are loops over the tests and windows, we want to track WHEN this page could be allocated
int window;
int testpatn;
- int d_n_c_depth; // track how many divide steps where needed to allocate this pages
+ int d_n_c_depth; // track how many divide steps were needed to allocate this pages
unsigned long * start;
int no_of_pages;
};
diff --git a/efi_memtest/memtest86+/efi/test.c b/efi_memtest/memtest86+/efi/test.c
index 235c41b..1ab87bf 100644
--- a/efi_memtest/memtest86+/efi/test.c
+++ b/efi_memtest/memtest86+/efi/test.c
@@ -468,9 +468,9 @@ void addr_tst2(int me)
unsliced_foreach_segment(nullptr, me, addr_tst2_init_segment);
{ BAILR }
- /*if (logflag) {
+ if (logflag) {
print_log("addr_tst2(): starting addr_tst2_check_segment", 45);
- }*/
+ }
/* Each address should have its own address */
unsliced_foreach_segment(nullptr, me, addr_tst2_check_segment);
diff --git a/efi_memtest/memtest86+/main.c b/efi_memtest/memtest86+/main.c
index b2a6aeb..fdfaa42 100644
--- a/efi_memtest/memtest86+/main.c
+++ b/efi_memtest/memtest86+/main.c
@@ -1030,9 +1030,9 @@ int do_test(int my_ord)
if (1 /*pages_allocated == 1*/) {
- //print_pmap();
+ print_pmap();
- //print_map();
+ print_map();
if (logflag) {
@@ -1050,8 +1050,10 @@ int do_test(int my_ord)
}
for (int i = 0; i < vv->msegs; i++) {
+
ulong * p = (ulong *) (vv->pmap[i].start * 4096);
ulong page_no = ((ulong) vv->pmap[i].end - (ulong) vv->pmap[i].start);
+
allocate_pages(page_no, p); // TODO provide allocate-map structure
}