On Thu, Sep 12, 2013 at 2:55 PM, Gedare Bloom <ged...@rtems.org> wrote:
> On Thu, Sep 12, 2013 at 2:59 AM, Hesham AL-Matary > <heshamelmat...@gmail.com> wrote: > > --- > > c/src/lib/libbsp/shared/include/mm.h | 36 > +++++++++++++++++++++++ > > c/src/lib/libbsp/shared/src/no_memorymanagement.c | 21 +++++++++++++ > > 2 files changed, 57 insertions(+) > > create mode 100644 c/src/lib/libbsp/shared/include/mm.h > > create mode 100644 c/src/lib/libbsp/shared/src/no_memorymanagement.c > > > > diff --git a/c/src/lib/libbsp/shared/include/mm.h > b/c/src/lib/libbsp/shared/include/mm.h > > new file mode 100644 > > index 0000000..f2ac71c > > --- /dev/null > > +++ b/c/src/lib/libbsp/shared/include/mm.h > > @@ -0,0 +1,36 @@ > > +/* > > + * Copyright (c) 2013 Gedare Bloom. > > + * > > + * The license and distribution terms for this file may be > > + * found in the file LICENSE in this distribution or at > > + * http://www.rtems.com/license/LICENSE. > > + */ > > + > > +#ifndef __LIBBSP_MM_H > > +#define __LIBBSP_MM_H > > + > > +#include <stdint.h> > > +#include <stdlib.h> > > + > > +#ifdef __cplusplus > > +extern "C" { > > +#endif > > + > > +typedef struct { > > + uint32_t begin; > > + uint32_t end; > > + uint32_t flags; > > +} mm_init_start_config; > Should begin/end be uintptr_t? This structure appears to be unused > here, so perhaps it should be left out? > > I copied the struct definition from arm-cp15-start.h so that mm_config_table.c can include it and recognize such a type. I can't include arm-cp15-start.h (which it has an exact definition) to mm_config_table.c because there will be a multiple-definition compilation error (as arm-cp15-start.h implements some routines) because mm.c also includes it. > > + > > +void bsp_memory_management_initialize(void); > > + > > +void bsp_memory_management_set_attributes( > > + uintptr_t base, > > + size_t size, > > + uint32_t attr > > +); > > + > > +#ifdef __cplusplus > > +} > > +#endif > > +#endif > > diff --git a/c/src/lib/libbsp/shared/src/no_memorymanagement.c > b/c/src/lib/libbsp/shared/src/no_memorymanagement.c > > new file mode 100644 > > index 0000000..1a5fc63 > > --- /dev/null > > +++ b/c/src/lib/libbsp/shared/src/no_memorymanagement.c > > @@ -0,0 +1,21 @@ > > +/* > > + * Copyright (c) 2013 Hesham AL-Matary > > + * Copyright (c) 2013 Gedare Bloom. > > + * > > + * The license and distribution terms for this file may be > > + * found in the file LICENSE in this distribution or at > > + * http://www.rtems.com/license/LICENSE. > > + */ > > + > > +#include <rtems.h> > > +#include <libbsp/mm.h> > > + > > +void bsp_memory_management_initialize( void ) { } > > + > > +void bsp_memory_management_set_attributes( > > + uintptr_t base, > > + size_t size, > > + uint32_t flags > > +) > > +{ > > +} > > -- > > 1.8.3.1 > > > > _______________________________________________ > > rtems-devel mailing list > > rtems-devel@rtems.org > > http://www.rtems.org/mailman/listinfo/rtems-devel >
_______________________________________________ rtems-devel mailing list rtems-devel@rtems.org http://www.rtems.org/mailman/listinfo/rtems-devel