The present invention provides a data processing apparatus and method for
controlling access to a memory. The data processing apparatus has a
secure domain and a non-secure domain, in the secure domain the data
processing apparatus having access to secure data which is not accessible
in the non-secure domain. The data processing apparatus comprises a
device coupled to a memory via a device bus, and operable, when an item
of data in the memory is required by the device, to issue onto the device
bus a memory access request pertaining to either the secure domain or the
non-secure domain. The memory is operable to store data required by the
device, and contains secure memory for storing secure data and non-secure
memory for storing non-secure data. In accordance with the present
invention, the data processing apparatus further comprises partition
checking logic coupled to the device bus and operable whenever the memory
access request as issued by the device pertains to the non-secure domain,
to detect if the memory access request is seeking to access the secure
memory and upon such detection to prevent the access specified by that
memory request. This approach significantly improves the security of data
contained within a secure portion of memory.