This is the mail archive of the ecos-discuss@sources.redhat.com 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]

PowerPC vector base location


Hi guys,

I'd like to introduce an extra configuration option into the powerPC
HAL.
The powerpc architecture allows the vectorbase to be located at
0x00000000
or fff00000. Not every board however has memory at 0xfff00000. Depending
on
the platform, 0x00000000 can be RAM or FLASH or ... 

Therefore I think that it makes sense to rewrite the CDL option for the
vector
base as follows.

    cdl_option CYGHWR_HAL_POWERPC_VECTOR_BASE {
        display       "Exception vectors location"
        description   "
            PowerPC exception vectors can reside either at 0x00000000 or
            0xfff00000. The startup type and platform HAL controls which
            is used."
        flavor        data
        calculated { (! CYGHWR_HAL_POWERPC_FORCE_VECTOR_BASE_LOW &&
                       (CYGHWR_HAL_POWERPC_FORCE_VECTOR_BASE_HIGH ||
                       (CYG_HAL_STARTUP != "RAM" &&
                        ! CYGSEM_HAL_POWERPC_COPY_VECTORS)))
                      ? 0xfff00000 : 0x00000000 }
    }

If the platform HAL does not define
CYGHWR_HAL_POWERPC_FORCE_VECTOR_BASE_LOW,
nothing changes, so there is no risk of breaking existing code. It
leaves however
the option to force the vector base at zero with copying (for RAM at
0x0000) or 
WITHOUT copying the vectors. (FLASH 0x0000000)

This would be good to have for e.g. MPC555. Copying the vectors is than
usefull for
platforms that disable the internal flash and dual map it to a RAM
region. Not copying
allows for using the Internal flash. (an attempt to write to that one
will result in 
an illegal instruction exception)

Any comments, suggestions ??

Regards,
Bob


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