Re: [U-Boot] [PATCH] Replace references to extern console_buffer with a function call
Dear Peter Tyser, what is the purpose of this patch? As far as I can see we gain nothing, but we lose on memory footpint. I guess there is some problem you're trying to fix, but you did not mention it? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED] The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence. -- Edsger W. Dijkstra, SIGPLAN Notices, Volume 17, Number 5 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Replace references to extern console_buffer with a function call
what is the purpose of this patch? As far as I can see we gain nothing, but we lose on memory footpint. I guess there is some problem you're trying to fix, but you did not mention it? I've added a basic debug serial console which relies on this patch. The debug console is a simple command prompt which allows the user to issue commands before relocating to SDRAM. We've found this feature very useful for operations such as initially programming SPD data, debugging hardware issues (SDRAM/I2C). I'll submit the debug console patches shortly. I'm not sure if the debug console will be accepted to mainline, but I think this patch alone is an improvement over the current implementation of using a global string and multiple external console_buffer references. I've always thought global variables should be avoided if there is a reasonable alternative Best, Peter ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Replace references to extern console_buffer with a function call
I'm not sure if the debug console will be accepted to mainline, but I think this patch alone is an improvement over the current implementation Frankly, I don't think so - it just makes the code bigger for no good use to 99.9% of the users. of using a global string and multiple external console_buffer references. I've always thought global variables should be avoided if there is a reasonable alternative But this is a boot loader, and size matters. I had assumed gcc/ld would be smart enough to optimize the function call away, seeing as there is no conditional code in it. I just tested, and the size was increased by 48 bytes for the MPC8548CDS reference board after applying the patch. Inlining the console_buffer_addr() didn't get rid of the 48 bytes of bloat. I guess this patch's fate will be the same as [RFC] Add support for early serial debug console... Thanks, Peter ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot