From fcabdef37016cd568a40c82e0d97a264b86ee6d4 Mon Sep 17 00:00:00 2001 From: Axel Heider Date: Thu, 4 Apr 2024 20:12:48 +0200 Subject: [PATCH 1/2] CI: use proper step name Signed-off-by: Axel Heider --- .github/workflows/sel4test-sim.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sel4test-sim.yml b/.github/workflows/sel4test-sim.yml index 33436c89..38969fbf 100644 --- a/.github/workflows/sel4test-sim.yml +++ b/.github/workflows/sel4test-sim.yml @@ -22,7 +22,7 @@ concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: - cparser: + simulation: name: Simulation runs-on: ubuntu-latest strategy: From cf1982c1f9e544648141af1e8416b86f0d773c7d Mon Sep 17 00:00:00 2001 From: Axel Heider Date: Tue, 28 Jun 2022 19:12:42 +0200 Subject: [PATCH 2/2] WIP libsel4platsupport: debug log --- libsel4muslcsys/src/sys_morecore.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/libsel4muslcsys/src/sys_morecore.c b/libsel4muslcsys/src/sys_morecore.c index c5240f63..3d83bb62 100644 --- a/libsel4muslcsys/src/sys_morecore.c +++ b/libsel4muslcsys/src/sys_morecore.c @@ -68,6 +68,11 @@ long sys_mmap_impl(void *addr, size_t length, int prot, int flags, int fd, off_t if (length > morecore_top - morecore_base) { return -ENOMEM; } + + ZF_LOGI( + "morecore %p - %p, len %#x, return address: 0x%"PRIxPTR, + morecore_base, morecore_top, length, morecore_top-length); + /* Steal from the top */ morecore_top -= length; return morecore_top; @@ -116,6 +121,8 @@ static void init_morecore_region(void) morecore_base = (uintptr_t) morecore_area; morecore_top = (uintptr_t) &morecore_area[morecore_size]; } + + ZF_LOGI("morecore %p - %p (%#zd)", morecore_base, morecore_top, morecore_size); } static long sys_brk_static(va_list ap) @@ -199,8 +206,16 @@ static long sys_mmap_impl_static(void *addr, size_t length, int prot, int flags, if (base < morecore_base) { return -ENOMEM; } + ZF_LOGF_IF( + (base % 0x1000) != 0, + "morecore %p - %p, len %#zx, return address: %p (not 4 KiB aligned)", + (void*)morecore_base, (void*)morecore_top, length, (void*)base); + + ZF_LOGI( + "morecore %p - %p, len %#zx, return address: %p", + (void*)morecore_base, (void*)morecore_top, length, (void*)base); + morecore_top = base; - ZF_LOGF_IF((base % 0x1000) != 0, "return address: 0x%"PRIxPTR" requires alignment: 0x%x ", base, 0x1000); return base; } assert(!"not implemented");