This is the mail archive of the mailing list for the newlib project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch ARM] Add support for bare-metal cpu initialization on A profile cores.


Increasingly we've found the need for a start-up routine required for bare-metal applications that need to initialize the mmu and the caches for use during hardware bring-up and/or for bare-metal testing on ARM's propreitary models as well as allow for semi-hosting to happen at the same time. This has been found to be useful in a number of situations and this is just the initial patch set required for this to work on A profile CPUs. I would recommend that this not be used for earlier cores without testing.

The way this is implemented is by adding a new weak function called _rdimon_init_hook that deals with this initialization. I expect this to work on newer hardware because our testing involves testing with the AEM models that model the newer hardware but I don't have access to any such hardware to test this right now.

The SMP enable bit in the ACTLR is enabled only for A15 and A7 but not for any other cores as this is needed only on those cores. We use this internally for some of our GCC test runs on our fast models, we've tried it in the past to run some simple applications on bare-metal A7 and A15 boards.

This necessitates the use of a new specs file aprofile-ve.specs which I've added and provided as an example. I have tested this on an AEM model but am confident that this will work just fine on a bare-metal board connected via D-Stream or anything that implements the standard Angel API.

If people want to use a different base address for the text section and / or for the vectors page in the cpu init code this is available by doing --defsym _rdimon_vector_base=FOO or -Ttext_section=BAR . The specs file only eases the use for this.

Tested with an arm-eabi bare-metal GCC multilib build across architecture variants, Thumbness and fpu abi variants using the new specs file in my baremetal build script and tested with --specs=aprofile-ve.specs passed by default in my site.exp - tested on AEM VE model internally .

Ok to apply ?


<DATE>  Matthew Gretton-Dann  <>
     Ramana Radhakrishnan  <>
     Greta Yorsh  <>

        * arm/ Add support for cpu-init directory and add
        * arm/ Likewise.
        * arm/configure: Regenerate.
        * arm/cpu-init: New directory.
        * arm/cpu-init/ New file.
        * arm/cpu-init/rdimon-aem.S: Likewise.
        * arm/crt0.S: Call _rdimon_init_hook
        * arm/elf-aprofile-ve.specs: New file.

Attachment: final.txt
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]