Branch target address cache for predicting instruction decryption keys in a microprocessor that fetches and decrypts encrypted instructions
First Claim
1. A microprocessor, comprising:
- a branch target address cache (BTAC), configured to cache history information associated with a plurality of previously executed branch and switch key instructions, wherein the history information includes a target address and an identifier for identifying key values associated with each of the previously executed branch and switch key instructions; and
a fetch unit, coupled to the BTAC, configured to;
receive from the BTAC a prediction that the fetch unit fetched one of the plurality of previously executed branch and switch key instructions and receive from the BTAC the target address and identifier associated with the fetched branch and switch key instruction; and
fetch encrypted instruction data at the associated target address and decrypt the fetched encrypted instruction data based on the key values identified by the identifier, in response to receiving the prediction;
wherein the history information further comprises a taken/not taken indicator associated with each of the plurality of previously executed branch and switch key instructions, wherein the fetch unit is configured to fetch encrypted instruction data at the associated target address and decrypt the fetched encrypted instruction data based on the key values identified by the identifier, in response to receiving the prediction only if the taken/not taken indicator received from the BTAC predicts the fetched one of the plurality of previously executed branch and switch key instructions will be taken.
1 Assignment
0 Petitions
Accused Products
Abstract
A branch target address cache (BTAC) caches history information associated with branch and switch key instructions previously executed by a microprocessor. The history information includes a target address and an identifier (index into a register file) for identifying key values associated with each of the previous branch and switch key instructions. A fetch unit receives from the BTAC a prediction that the fetch unit fetched a previous branch and switch key instruction and receives the target address and identifier associated with the fetched branch and switch key instruction. The fetch unit also fetches encrypted instruction data at the associated target address and decrypts (via XOR) the fetched encrypted instruction data based on the key values identified by the identifier, in response to receiving the prediction. If the BTAC predicts correctly, a pipeline flush normally associated with the branch and switch key instruction is avoided.
-
Citations
20 Claims
-
1. A microprocessor, comprising:
-
a branch target address cache (BTAC), configured to cache history information associated with a plurality of previously executed branch and switch key instructions, wherein the history information includes a target address and an identifier for identifying key values associated with each of the previously executed branch and switch key instructions; and a fetch unit, coupled to the BTAC, configured to; receive from the BTAC a prediction that the fetch unit fetched one of the plurality of previously executed branch and switch key instructions and receive from the BTAC the target address and identifier associated with the fetched branch and switch key instruction; and fetch encrypted instruction data at the associated target address and decrypt the fetched encrypted instruction data based on the key values identified by the identifier, in response to receiving the prediction; wherein the history information further comprises a taken/not taken indicator associated with each of the plurality of previously executed branch and switch key instructions, wherein the fetch unit is configured to fetch encrypted instruction data at the associated target address and decrypt the fetched encrypted instruction data based on the key values identified by the identifier, in response to receiving the prediction only if the taken/not taken indicator received from the BTAC predicts the fetched one of the plurality of previously executed branch and switch key instructions will be taken. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A microprocessor, comprising:
-
a branch target address cache (BTAC), configured to cache history information associated with a plurality of previously executed branch and switch key instructions, wherein the history information includes a target address and an identifier for identifying key values associated with each of the previously executed branch and switch key instructions, wherein the identifier comprises an index into a location within a register file configured to store the key values; a fetch unit, coupled to the BTAC, configured to; receive from the BTAC a prediction that the fetch unit fetched one of the plurality of previously executed branch and switch key instructions and receive from the BTAC the target address and identifier associated with the fetched branch and switch key instruction; and fetch encrypted instruction data at the associated target address and decrypt the fetched encrypted instruction data based on the key values identified by the identifier, in response to receiving the prediction; wherein the fetch unit further comprises; a master key register file, configured to store a plurality of key values used by the fetch unit to decrypt fetched encrypted instruction data; and key switch logic, coupled to the BTAC and to the master key register file, configured to update the master key register file with the key values stored in the location within the register file at the index received from the BTAC. - View Dependent Claims (8)
-
-
9. A microprocessor comprising:
-
a branch target address cache (BTAC), wherein the BTAC is configured to cache history information associated with a plurality of previously executed switch key instructions, wherein the history information includes a target address and an identifier for identifying key values associated with each of the previously executed switch key instructions, wherein the history information associated with both branch and switch key instructions and switch key instructions specifies a type indication for indicating whether the branch instruction is a branch and switch key instruction or a switch key instruction; and a fetch unit, coupled to the BTAC, configured to; receive from the BTAC a prediction that the fetch unit fetched one of the plurality of previously executed branch and switch key instructions and receive from the BTAC the target address and identifier associated with the fetched branch and switch key instruction; and fetch encrypted instruction data at the associated target address and decrypt the fetched encrypted instruction data based on the key values identified by the identifier, in response to receiving the prediction.
-
-
10. A method for operating a microprocessor, the method comprising:
-
caching history information associated with a plurality of previously executed branch and switch key instructions in a branch target address cache (BTAC), wherein the history information includes a target address and an identifier for identifying key values associated with each of the previously executed branch and switch key instructions, wherein the history information further comprises a taken/not taken indicator associated with each of the plurality of previously executed branch and switch key instructions; receiving from the BTAC a prediction that one of the plurality of previously executed branch and switch key instructions was fetched and receiving the target address and identifier associated with the fetched branch and switch key instruction; and fetching encrypted instruction data at the associated target address and decrypting the fetched encrypted instruction data based on the key values identified by the identifier, in response to said receiving the prediction only if the taken/not taken indicator received from the BTAC predicts the fetched one of the plurality of previously executed branch and switch key instructions will be taken. - View Dependent Claims (11, 12, 13, 14, 15)
-
-
16. A method for operating a microprocessor, the method comprising:
-
storing in a master key register file a plurality of key values used to decrypt fetched encrypted instruction data; caching history information associated with a plurality of previously executed branch and switch key instructions in a branch target address cache (BTAC), wherein the history information includes a target address and an identifier for identifying key values associated with each of the previously executed branch and switch key instructions, wherein the identifier comprises an index into a location within a register file configured to store key values; receiving from the BTAC a prediction that one of the plurality of previously executed branch and switch key instructions was fetched and receiving the target address and identifier associated with the fetched branch and switch key instruction; updating the master key register file with the key values stored in the location within the register file at the index received from the BTAC, in response to said receiving the prediction; and fetching encrypted instruction data at the associated target address and decrypting the fetched encrypted instruction data based on the key values identified by the identifier, in response to said receiving the prediction. - View Dependent Claims (17)
-
-
18. A method for operating a microprocessor, the method comprising:
-
caching history information associated with a plurality of previously executed branch and switch key instructions in a branch target address cache (BTAC), wherein the history information includes a target address and an identifier for identifying key values associated with each of the previously executed branch and switch key instructions; and
wherein the history information associated with both branch and switch key instructions and switch key instructions specifies a type indication for indicating whether the branch instruction is a branch and switch key instruction or a switch key instructionreceiving from the BTAC a prediction that one of the plurality of previously executed branch and switch key instructions was fetched and receiving the target address and identifier associated with the fetched branch and switch key instruction; and fetching encrypted instruction data at the associated target address and decrypting the fetched encrypted instruction data based on the key values identified by the identifier, in response to said receiving the prediction.
-
-
19. A computer program product encoded in at least one non-transitory computer readable storage medium for use with a computing device, the computer program product comprising:
computer readable program code embodied in said medium, for specifying a microprocessor, the computer readable program code comprising; first program code for specifying a branch target address cache (BTAC), configured to cache history information associated with a plurality of previously executed branch and switch key instructions, wherein the history information includes a target address and an identifier for identifying key values associated with each of the previously executed branch and switch key instructions; and second program code for specifying a fetch unit, coupled to the BTAC, configured to; receive from the BTAC a prediction that the fetch unit fetched one of the plurality of previously executed branch and switch key instructions and receive from the BTAC the target address and identifier associated with the fetched branch and switch key instruction; and fetch encrypted instruction data at the associated target address and decrypt the fetched encrypted instruction data based on the key values identified by the identifier, in response to receiving the prediction; wherein the history information further comprises a taken/not taken indicator associated with each of the plurality of previously executed branch and switch key instructions, wherein the fetch unit is configured to fetch encrypted instruction data at the associated target address and decrypt the fetched encrypted instruction data based on the key values identified by the identifier, in response to receiving the prediction only if the taken/not taken indicator received from the BTAC predicts the fetched one of the plurality of previously executed branch and switch key instructions will be taken. - View Dependent Claims (20)
Specification