summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKinsey Moore <kinsey.moore@oarcorp.com>2023-02-02 15:21:10 -0600
committerJoel Sherrill <joel@rtems.org>2023-02-08 14:14:26 -0600
commit5e742dce516de51af73faa85444207534baec397 (patch)
tree19d2ffa9bd462070f3604e92af2b7c737eebacf3
parentrtemslwip: Resolve conflicts involving xparameters (diff)
downloadrtems-lwip-5e742dce516de51af73faa85444207534baec397.tar.bz2
rtemslwip/xil_shims: Improve error messages
The error message produced in the case of MMU mapping failures was insufficient to track down the cause. This improves the out to assist the user in tracking down the issue.
-rw-r--r--rtemslwip/zynqmp/xil_shims.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/rtemslwip/zynqmp/xil_shims.c b/rtemslwip/zynqmp/xil_shims.c
index 5284ded..f0b1b9b 100644
--- a/rtemslwip/zynqmp/xil_shims.c
+++ b/rtemslwip/zynqmp/xil_shims.c
@@ -28,6 +28,7 @@
#include <rtems/rtems/cache.h>
#include <rtems/rtems/intr.h>
#include <libcpu/mmu-vmsav8-64.h>
+#include <stdio.h>
#define TWO_MB (2*1024*1024)
#define ONE_GB (1024*1024*1024)
@@ -45,8 +46,12 @@ void Xil_SetTlbAttributes( UINTPTR Addr, u64 attrib )
Addr < 0x100000000 ? TWO_MB : ONE_GB,
attrib
);
- if ( sc != RTEMS_SUCCESSFUL ) {
- printf("Failed setting TLB attribs on ptr %p: 0x%lx\n", Addr, attrib);
+ if ( sc == RTEMS_NO_MEMORY ) {
+ printf("Out of memory setting MMU attributes on ptr %p: 0x%lx\n", (void*)Addr, attrib);
+ } else if ( sc == RTEMS_INVALID_ADDRESS ) {
+ printf("Attempted to set MMU attributes on invalid ptr %p: 0x%lx\n", (void*)Addr, attrib);
+ } else if ( sc != RTEMS_SUCCESSFUL ) {
+ printf("Failed setting MMU attributes on ptr %p: 0x%lx\n", (void*)Addr, attrib);
}
}