This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos 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]

Re: powerpc8270 exception management and redboot and ecos interaction


Nelly PISON wrote:
> Hello,
>
> I use redboot and an ecos application on a powerpc 8270 board.
>
> 1 - powerpc exception management I use a function _reset developped on
> our hardware platform that made an exception (parity error) : this
> exception provoque the hard reset of the 8270:can you tell me where
> is  the source that treat  this exception.
>
> the code that made this exception is:
>
> {
>    unsigned long hid0, int_state;
>
>    // Need interrupts off to force checkstop
>    HAL_DISABLE_INTERRUPTS(int_state);
>    IMM->clocks_rmr |= 0x01;  // Checkstop Reset Enable
>    // Force a checkstop by turning on parity which is not implemented
>    CYGARC_MFSPR(CYGARC_REG_HID0, hid0);
>    hid0 |= 0x30000000;
>    CYGARC_MTSPR(CYGARC_REG_HID0, hid0);
>    while (1) ;
> }

There is no handler for this (in fact, it's pretty hard to write one!). 
This exception causes a checkstop
which in turn is setup to force a hardware reset (HRESET).
>
> 2 - reboot and ecos interaction
>
> - Where is the Dynamic memory allocation zone for redboot (if any) and
> the ecos application allocation : is that the same? ,
> if yes how can this work ?
> if not where can we see where is mapped the zone for each?

RedBoot uses fixed memory - eCos applications are set up to use
everything else.  Look at the
information printed when RedBoot starts to figure out the limits & layout.
>
>
> - Does the ecos application  call redboot after the appication is
> started?

Yes, RedBoot does provide _some_ limited services to the eCos
application.  In particular, diagnostic I/O
>
> If yes , What part of the ecos application can call the
> flash_get_config function with type  CONFIG_BOOL and key
> "info_console_force"?
Use the Virtual Vector interface for this.  The attached program shows
an example.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

#include <stdio.h>
#include <cyg/kernel/kapi.h>
#include <cyg/hal/hal_if.h>
#include <network.h>

#define CONFIG_IP 5

int
main(int argc, char *argv[])
{
    struct in_addr addr;

    if (CYGACC_CALL_IF_FLASH_CFG_OP(CYGNUM_CALL_IF_FLASH_CFG_GET, 
                                    "bootp_my_ip", 
                                    &addr, 
                                    CONFIG_IP)) {
        printf("My IP = %s\n", inet_ntoa(addr));
    } else {
        printf("Can't get 'bootp_my_ip'\n");
    }
    printf("fconfig_test done\n");
    return 0;
}

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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