1. 30 Jan, 2015 1 commit
    • Martin Dorwig's avatar
      Export redesign · 49cad547
      Martin Dorwig authored
      this is an atempt to make the export of functions typesafe.
      I replaced the jumptable void ** by a struct (jt_funcs) with function pointers.
      The EXPORT_FUNC macro now has 3 fixed parameters and one
      variadic parameter
      The first is the name of the exported function,
      the rest of the parameters are used to format a functionpointer
      in the jumptable,
      
      the EXPORT_FUNC macros are expanded three times,
      1. to declare the members of the struct
      2. to initialize the structmember pointers
      3. to call the functions in stubs.c
      Signed-off-by: 's avatarMartin Dorwig <dorwig@tetronik.com>
      Acked-by: 's avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: 's avatarSimon Glass <sjg@chromium.org>
      (resending to the list since my tweaks are not quite trivial)
      49cad547
  2. 27 Oct, 2014 1 commit
  3. 21 Oct, 2011 1 commit
  4. 04 Jul, 2010 1 commit
    • Wolfgang Denk's avatar
      Make sure that argv[] argument pointers are not modified. · 54841ab5
      Wolfgang Denk authored
      The hush shell dynamically allocates (and re-allocates) memory for the
      argument strings in the "char *argv[]" argument vector passed to
      commands.  Any code that modifies these pointers will cause serious
      corruption of the malloc data structures and crash U-Boot, so make
      sure the compiler can check that no such modifications are being done
      by changing the code into "char * const argv[]".
      
      This modification is the result of debugging a strange crash caused
      after adding a new command, which used the following argument
      processing code which has been working perfectly fine in all Unix
      systems since version 6 - but not so in U-Boot:
      
      int main (int argc, char **argv)
      {
      	while (--argc > 0 && **++argv == '-') {
      /* ====> */	while (*++*argv) {
      			switch (**argv) {
      			case 'd':
      				debug++;
      				break;
      			...
      			default:
      				usage ();
      			}
      		}
      	}
      	...
      }
      
      The line marked "====>" will corrupt the malloc data structures and
      usually cause U-Boot to crash when the next command gets executed by
      the shell.  With the modification, the compiler will prevent this with
      an
      	error: increment of read-only location '*argv'
      
      N.B.: The code above can be trivially rewritten like this:
      
      	while (--argc > 0 && **++argv == '-') {
      		char *arg = *argv;
      		while (*++arg) {
      			switch (*arg) {
      			...
      Signed-off-by: 's avatarWolfgang Denk <wd@denx.de>
      Acked-by: 's avatarMike Frysinger <vapier@gentoo.org>
      54841ab5
  5. 28 May, 2010 1 commit
  6. 03 Oct, 2009 1 commit
  7. 02 Sep, 2009 1 commit
  8. 14 Feb, 2008 1 commit
    • Wolfgang Denk's avatar
      PPC: Use r2 instead of r29 as global data pointer · e7670f6c
      Wolfgang Denk authored
      R29 was an unlucky choice as with recent toolchains (gcc-4.2.x) gcc
      will refuse to use load/store multiple insns; instead, it issues a
      list of simple load/store instructions upon function entry and exit,
      resulting in bigger code size, which in turn makes the build for a
      few boards fail.
      
      Use r2 instead.
      Signed-off-by: 's avatarWolfgang Denk <wd@denx.de>
      e7670f6c
  9. 05 Feb, 2008 1 commit
  10. 26 Jul, 2003 1 commit
    • wdenk's avatar
      * Allow crc32 to be used at address 0x000 · 77846748
      wdenk authored
      * Provide consistent interface to standalone applications to access
        the 'global_data' structure
        Provide a doc/README.standalone more useful to users/developers.
      
      * Make IceCube MGT5100 FEC driver work
      77846748
  11. 24 Jul, 2003 1 commit