SPARC Leon baremetal layer
Konrad Eisele
konrad@gaisler.com
Tue Nov 29 16:50:00 GMT 2011
I regenerated the patch,
ftp://gaisler.com/gaisler.com/linux/patches/0002-sparc-leon-libleonbare-baremetal-layer.patch
I used "indent" to reformat and changed the copyleft notice.
Can someone take a look and (maybe apply?)...
-- Konrad
Mike Frysinger wrote:
> On Monday 28 November 2011 06:08:10 Konrad Eisele wrote:
>> I would like to a patch that add a baremetal layer to newlibc-1.19.0 for the SPARC-v8 variant LEON (www.gaisler.com). Is it possible to get a review so that I can streamline the patch to be added to the newlibc repository?
>
>> --- a/libgloss/configure.in +++ b/libgloss/configure.in @@ -52,6 +52,9 @@ case "${target}" in i960-*-coff) AC_CONFIG_SUBDIRS([i960]) ;; + sparc-*leon*-elf* | sparc-*leon*-none**) + AC_CONFIG_SUBDIRS([sparc_leon]) + ;; sparclet-*-aout* | sparc-*-elf* | sparc64-*-elf* | sparc86x-*-* |
> sparclite-*-*)
>> AC_CONFIG_SUBDIRS([sparc]) ;;
>
> gcc uses "sparc-leon*-*" ... maybe this should use the same style ?
>
>> --- /dev/null +++ b/libgloss/link.c
>>
>> +int +_DEFUN (_link, (existing, new), + char *existing _AND + char *new) +{ + errno = EIO; + return (-1); +}
>
> this looks like it belongs in libgloss/libnosys/
>
> it should also be "return -1;"
>
>> +
>
> please no trailing newlines in files
>
>> --- /dev/null +++ b/libgloss/sparc_leon/amba.c
>
> does libgloss have a standard for sub-arches ? my reaction would be that this should be sparc/leon/, but it seems the newlib standard is for sub-arches to be in the same level as the overall ISA.
>
>> +/* Structure containing address to devices found on the Amba Plug&Play bus
> */
>
> looks like a lot of these comments need converting to the GNU style. so this should have a period at the end, and two spaces after that ...
>
>> +#define amba_insert_device(tab, address) \ +{ \ + if (LEON3_BYPASS_LOAD_PA(address)) \ + { \ + (tab)->addr[(tab)->devnr] = (address); \ + (tab)->devnr ++; \ + } \ +} while(0)
>
> seems to have more GNU style issues. also, is this correct ? shouldn't there be a "do" before that first opening brace ?
>
>> +void amba_init(void) +{ + unsigned int *cfg_area; /* address to configuration area */
>
> GNU style issues: this should be spacing for initial indentation; not tabs
>
>> + Copyright (C) 2004 Gaisler Research AB
>
> does libgloss require copyright assignment to the FSF ?
>
> i imagine these issues are going to apply to the entire code base ... -mike
More information about the Newlib
mailing list