From 122374c362ba8bb9082385da3c82e264ab594f15 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 7 Jul 2024 07:00:43 +0300 Subject: smp now seems to work + Had some minor issues with a wraparound of size_t that effectively meant that some regions were allocated twice. Also, booting should be a bit more reliable now, turned out that the previous iteration of the booting was just accidentally working due to the kernel being placed 'close enough' in RAM to where it was linked to. Fixed by allocating a vmem of O1 that maps the kernel to a 2MiB boundary at boot, pretty nifty. --- src/pmem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/pmem.c') diff --git a/src/pmem.c b/src/pmem.c index fac7731..5516d30 100644 --- a/src/pmem.c +++ b/src/pmem.c @@ -397,8 +397,10 @@ static pm_t __maybe_populate_bucket(size_t n, pm_t cont, enum mm_order order, if (n) { struct mm_bmap *bmap = (struct mm_bmap *)cont; - if (populate) + if (populate) { + memset(bmap, 0, set_size); bmap->size = n; + } if (first && populate) __attach_set(bucket, bmap); -- cgit v1.3