2/01/2013

Unified boot cookie

Background
A cookie is needed to be set in AMSS for a number of features that are triggered from AMSS but executed in boot.
the cookie is stored in the first 2K of IRAM because the higher 2K of IRAM is used by AMSS clock switch.

Implementation

the unified boot cookie has the following set of properties:
1. A boot cookie gets set in AMSS context. Setting can be triggered from Modem or from Apps through proc.comm
2. Once the cookie is set, the boot_set_cookie API never returns. It enables WATCHDOG and goes into an infinite
loop so the phone resets and enters BOOT.
3. Reset of the phone can be avoided by using an overriding argument: reset
4. The supported boot cookies are added in an enumeration list: boot_cookie_t
5. Once in BOOT, boot_get_cookie will be called in appropriate places for the needed action.

boot_set_cookie() can be called from AMSS and it sets the boot cookie,
boot_get_cookie() can be called from Boot or AMSS and it retrieves the saved cookie.

Customization

Customer can add their own cookie per their requirement befor BOOT_COOKIE_MAX
typedef enum
{
BOOT_COOKIE_SD_IMG_UPGRADE,
BOOT_COOKIE_BACKUP,
BOOT_COOKIE_RECOVERY,

/*****************************
** ADD YOUR ENUM ABOVE THIS **
*****************************/
BOOT_COOKIE_MAX
}boot_cookie_t;

No comments:

Post a Comment