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

Claim 28:
29. A non-transitory computer-readable medium having contents which configure a microcontroller to perform a method, the method comprising:
maintaining, under control of a microprocessor of the microcontroller, the 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 microprocessor, in operation, responds to a failure of a configuration to satisfy secure-service criteria by generating an error message in response to the secure service request, the error message indicating the configuration does not satisfy secure-service criteria; and
the executing unsecure user-application responds to the error message by submitting a second secure service request, the second secure service request including a request to modify the configuration to satisfy the secure-service criteria.