Patent ID: 7917716

Claim:
A method for protecting data in a system, the method comprising: in response to a power-on-reset, enabling access to a memory of the system, wherein said enabling access to the memory comprises: providing a first control value to masking logic coupled to the memory, wherein the masking logic is configured to perform a first logical operation using the first control value and second data read from the memory, and wherein the first logical operation leaves the second data read from the memory unchanged; reading first data from the memory in response to said enabling, wherein the first data are usable to perform security operations for the system prior to boot-up of a main processor in the system, wherein the system comprises an embedded controller, wherein the first data comprises initialization code for the system, wherein the initialization code has an address range, wherein said enabling access to the memory comprises enabling access to the address range in the memory; after the first data are used to perform one or more security operations for the system, disabling access to the memory, wherein after said disabling the memory is not accessible at least until a subsequent power-on-reset, wherein said disabling access to the memory comprises: providing a second control value to the masking logic, wherein the masking logic is configured to perform a second logical operation using the second control value and second data read from the memory, wherein the second logical operation masks the second data read from the memory, wherein said disabling access to the memory comprises disabling access to the address range of the memory, and wherein said providing the second control value to the masking logic comprises: setting a third control value to enable said providing the second control value; and subsequent to said setting the third control value, determining that the embedded controller is attempting to access the memory outside the address range, and generating an indication that the embedded controller is attempting to access the memory outside the address range; and disabling access to the address range of the memory in response to said third control value and said indication.