Patent ID: 11921655
Assignee: STMICROELECTRONICS S.R.L.
Field: Computer technology (Electrical engineering)
Classification: CPC G  H | IPC G  H

Claim 16:
17. A method, comprising:
maintaining, under control of a microprocessor of a microcontroller having a memory and one or more direct memory access controllers, one or more memory protection (MP) configurations to control access to protected memory areas of the microcontroller;
executing an unsecure user-application; and
responding, under control of the microprocessor, to a secure service call of the executing unsecure user-application by:
disabling interrupt requests;
determining whether one or more DMA controller configurations satisfy DMA secure-service criteria associated with the secure service request;
determining whether one or more MP configurations satisfy MP secure-service criteria associated with the secure service request;
in response to determining the DMA secure-service criteria and the MP secure-service criteria are satisfied:
executing at least one secure operation associated with the secure service call, the at least one secure operation accessing at least one protected memory area; and
cleaning one or more memory areas accessed during the execution of the at least one secure operation; and

enabling the interrupt requests, wherein,

the determining whether a MP configuration satisfies the MP secure-service criteria comprises determining whether the MP configuration permits access to one or more of the protected memory areas, and
the method comprises responding to a failure of a MP configuration to satisfy the MP secure-service criteria by:
storing the MP configuration;
modifying access permissions of the MP configuration; and
restoring the stored memory protection configuration after the cleaning.