[PATCH RTEMS] mvme3100: Add BSP fatal extension
Joel Sherrill
joel at rtems.org
Tue Aug 1 20:29:45 UTC 2023
On Tue, Aug 1, 2023 at 2:52 PM Vijay Kumar Banerjee <vijay at rtems.org> wrote:
>
>
> On Tue, Aug 1, 2023, 12:20 Joel Sherrill <joel at rtems.org> wrote:
>
>>
>>
>> On Tue, Aug 1, 2023, 11:41 AM Vijay Kumar Banerjee <vijay at rtems.org>
>> wrote:
>>
>>> ---
>>> bsps/powerpc/mvme3100/start/bspclean.c | 25 +++++++++++++++++++
>>> .../bsps/powerpc/mvme3100/bspmvme3100.yml | 1 +
>>> 2 files changed, 26 insertions(+)
>>> create mode 100644 bsps/powerpc/mvme3100/start/bspclean.c
>>>
>>> diff --git a/bsps/powerpc/mvme3100/start/bspclean.c
>>> b/bsps/powerpc/mvme3100/start/bspclean.c
>>> new file mode 100644
>>> index 0000000000..251d47a46d
>>> --- /dev/null
>>> +++ b/bsps/powerpc/mvme3100/start/bspclean.c
>>> @@ -0,0 +1,25 @@
>>>
>>
>> There is no copyright, licence, or Doxygen file header block.
>>
>> +#include <bsp.h>
>>> +#include <bsp/bootcard.h>
>>> +#include <rtems/bspIo.h>
>>> +
>>> +void bsp_fatal_extension(
>>> + rtems_fatal_source source,
>>> + bool always_set_to_false,
>>> + rtems_fatal_code error
>>> +)
>>> +{
>>> + printk("fatal source: %s\n", rtems_fatal_source_text(source));
>>> +
>>> + if (source == RTEMS_FATAL_SOURCE_EXCEPTION) {
>>> + rtems_exception_frame_print((const rtems_exception_frame *) error);
>>> + }
>>> +
>>> + /* We can't go back to MotLoad since we blew it's memory area
>>> + * and vectors. Just pull the reset line...
>>> + */
>>> + printk(
>>> + "bsp_fatal_extension(): RTEMS terminated -- no way back to MotLoad "
>>> + "so I reset the card\n"
>>> + );
>>> + bsp_reset();
>>> +}
>>>
>>
>> What does Motorola PowerPC or the other similar bsps do?
>>
>> Can the behaviour be unified and shared?
>>
>
> Thanks for the suggestion!
> Motorola powerpc uses bspfatal-default.c from bsps/shared. It was not
> working with mvme3100 because it added the bspreset-empty in the build.
> Just removing the empty reset makes it work. This patch is no longer
> needed. I'll send a smaller patch with this much neater solution using the
> shared defaults.
>
Wow! Good to hear. Probably should check beatnik and the other mvme* ppc
BSPs as well,
>
>
> Thanks!
>
No problem.
--joel
>
>
>> diff --git a/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
>>> b/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
>>> index 1667c1617a..dc04e4dd36 100644
>>> --- a/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
>>> +++ b/spec/build/bsps/powerpc/mvme3100/bspmvme3100.yml
>>> @@ -64,6 +64,7 @@ source:
>>> - bsps/powerpc/mvme3100/pci/detect_host_bridge.c
>>> - bsps/powerpc/mvme3100/rtc/todcfg.c
>>> - bsps/powerpc/mvme3100/start/bspstart.c
>>> +- bsps/powerpc/mvme3100/start/bspclean.c
>>> - bsps/powerpc/mvme3100/start/misc.c
>>> - bsps/powerpc/shared/btimer/btimer-ppc-dec.c
>>> - bsps/powerpc/shared/cache/cache.c
>>> --
>>> 2.39.3
>>>
>>> _______________________________________________
>>> devel mailing list
>>> devel at rtems.org
>>> http://lists.rtems.org/mailman/listinfo/devel
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20230801/69495106/attachment-0001.htm>
More information about the devel
mailing list