This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to validate a SWI handle?

Hello,

I am having a crash that I beleive is due to SWI handle corruption. From the BIOS API I did not see a way to validate the handle which would be useful in trying to track down my corruption. I proved my assertion by doing a SWI_post(0x0)  and the processor crashes and never returns from the call. Is there some way to validate the handle? The API's do not have return codes so I am looking for some suggestions. I am using BIOS 5.33 on c55x.

Thanks.  Jordon

  • Hi Jordon,

    I don't think there is a good way to check for a invalid SWI handle because there is no way of determining a valid handle from an invalid one (except checking for it being NULL).

    I would check on why the handle would become corrupt in the first place. How are you creating the SWI object? Statically or dynamically? Are you checking for the SWI_create()'s return value? Is your system stack large enough? From where are you calling the SWI_post? If you are calling it from a HWI, have you wrapped it with a HWI_enter and HWI_exit?

    You could also place the SWI Object in a different memory segment if you think it might be getting corrupt by another task.