From 37c0ccb23c89b0debf737ca5f6801e6356702553 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 30 Aug 2011 12:16:24 +0000 Subject: 2011-08-30 Joel Sherrill * bootcard.c: Revert patch and add comment clarifying code and need for cast. --- c/src/lib/libbsp/shared/ChangeLog | 5 +++++ c/src/lib/libbsp/shared/bootcard.c | 17 +++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) (limited to 'c') diff --git a/c/src/lib/libbsp/shared/ChangeLog b/c/src/lib/libbsp/shared/ChangeLog index 68bdf9e832..f5da4d8aaf 100644 --- a/c/src/lib/libbsp/shared/ChangeLog +++ b/c/src/lib/libbsp/shared/ChangeLog @@ -1,3 +1,8 @@ +2011-08-30 Joel Sherrill + + * bootcard.c: Revert patch and add comment clarifying code and need for + cast. + 2011-08-29 Joel Sherrill * bootcard.c: Correct printk() format. diff --git a/c/src/lib/libbsp/shared/bootcard.c b/c/src/lib/libbsp/shared/bootcard.c index 10723ab783..e431412b96 100644 --- a/c/src/lib/libbsp/shared/bootcard.c +++ b/c/src/lib/libbsp/shared/bootcard.c @@ -39,7 +39,7 @@ * Thanks to Chris Johns for the idea * to move C++ global constructors into the first task. * - * COPYRIGHT (c) 1989-2008. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -176,11 +176,20 @@ uint32_t boot_card( } #endif + /* + * If the user has configured a set of objects which will require more + * workspace than is actually available, print a message indicating + * such and return to the invoking initialization code. + * + * NOTE: Output from printk() may not work at this point on some BSPs. + * + * NOTE: Use cast to (void *) and %p since these are uintptr_t types. + */ if ( work_area_size <= Configuration.work_space_size ) { printk( - "bootcard: work space too big for work area: 0x%08x > 0x%08x\n", - Configuration.work_space_size, - work_area_size + "bootcard: work space too big for work area: %p > %p\n", + (void *) Configuration.work_space_size, + (void *) work_area_size ); bsp_cleanup(1); return 1; -- cgit v1.2.3