IP Library Granted Patent US 7,130,977
Granted Patent B1
US 7,130,977 · App. 10/419,085 · Granted Oct 31, 2006

Controlling access to a control register of a microprocessor

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,130,977
App. No.
10/419,085
Granted
Oct 31, 2006
Kind
B1
Abstract

Controlling access to a control register of a microprocessor. A method of controlling access to a control register such as CR 3, for example, of a processor having a normal execution mode and a secure execution mode may include storing address translation table information in the control register, allowing a software invoked write access to modify the address translation table information during the normal execution mode and selectively inhibiting the software invoked write during the secure execution mode.

Claims (71)

1. A method of controlling access to a control register of processor having a normal execution mode and a secure execution mode, said method comprising:

storing address translation table information in said control register, the address translation table information comprising a base address of a memory page containing an address translation table;

protection logic allowing a software invoked write access to modify said address translation table information within said control register during said normal execution mode; and

security logic selectively inhibiting said software invoked write access during operation in said secure execution mode by:

accessing a root page vector data structure comprising a plurality of bits, each bit configured to indicate whether a corresponding base address of a memory page is a root page;

allowing said software invoked write access to proceed in response to determining that said base address included in said software invoked write access is a root page; and

inhibiting said software invoked write access from proceeding in response to determining that said base address included in said software invoked write access is not a root page.

2. The method as recited in claim 1 further comprising allowing said software invoked write access to modify said address translation table information within said control register in response to said processor is operating in a secure kernel mode.

3. The method as recited in claim 2 , wherein said secure kernel mode includes:

a current privilege level (CPL) state being equal to zero within a code segment descriptor corresponding to a currently executing code sequence during said secure execution mode; and

said processor entering a trusted execution mode.

4. The method as recited in claim 1 , wherein said control register is control register number 3 (CR 3 ).

5. The method as recited in claim 4 , wherein said software invoked write access includes a load instruction specifying CR 3 as a destination operand.

6. The method as recited in claim 1 , wherein said software invoked write access includes a control transfer via a task gate.

7. The method as recited in claim 1 , further comprising generating a security exception in response to determining that said address included in said software invoked write access is not a root page when said processor is operating in a normal kernel mode.

8. The method as recited in claim 7 , wherein said address translation information includes cache control flags.

9. The method as recited in claim 8 further comprising determining that said software invoked write access would result in setting said cache control flags.

10. The method as recited in claim 9 further comprising generating a security exception in response to determining that said software invoked write access would result in setting said cache control flags when said processor is operating in a normal kernel mode.

11. The method as recited in claim 10 , wherein said normal kernel mode includes a current privilege level state being equal to zero within a code segment descriptor corresponding to a currently executing code sequence during said secure execution mode.

12. A processor having a normal execution mode and a secure execution mode, said processor comprising:

execution logic configured to execute code;

a control register configured to store address translation table information comprising a base address of a memory page containing an address translation table;

protection logic coupled to said control register and configured to allow a software invoked write access to modify said address translation table information within said control register during operation in said normal mode; and

wherein said protection logic includes security logic configured to selectively inhibit said software invoked write access during said secure execution mode;

wherein said security logic is further configured to:

access a root page vector data structure comprising a plurality of bits, each bit configured to indicate whether a corresponding base address of a memory page is a root page;

allow said software invoked write access to proceed in response to determining that said base address included in said software invoked write access is a root page, and

inhibit said software invoked write access from proceeding in response to determining that said base address included in said software invoked write access is not a root page.

13. The processor as recited in claim 12 , wherein said security logic is further configured to allow said software invoked write access to modify said address translation table information within said control register in response to said processor operating in a secure kernel mode.

14. The processor as recited in claim 13 , wherein said secure kernel mode includes:

a current privilege level state being equal to zero within a code segment descriptor corresponding to a currently executing code sequence during said secure execution mode; and

said processor entering a trusted execution mode.

15. The processor as recited in claim 12 , wherein said control register is control register number 3 (CR 3 ).

16. The processor as recited in claim 15 , wherein said software invoked write access includes a load instruction specifying CR 3 as a destination operand.

17. The processor as recited in claim 12 , wherein said software invoked write access includes a control transfer via a task gate.

18. The processor as recited in claim 12 , wherein said security logic is further configured to cause a security exception to be generated in response to determining that said address included in said software invoked write access is not a root page when said processor is operating in a normal kernel mode.

19. The processor as recited in claim 18 , wherein said address translation information includes cache control flags.

20. The processor as recited in claim 19 , wherein said security logic is further configured to determine that said software invoked write access would result in setting said cache control flags.

21. The processor as recited in claim 20 , wherein said security logic is further configured to cause a security exception to be generated in response to determining that said software invoked write access would result in setting said control flags when said processor is operating in a normal kernel mode.

22. The processor as recited in claim 21 , wherein said normal kernel mode includes a current privilege level state being equal to zero within a code segment descriptor corresponding to a currently executing code sequence during said secure execution mode.

23. A computer system comprising:

a processor having a normal execution mode and a secure execution mode;

a memory coupled to said processor and configured to store instructions and data;

wherein said processor includes:

execution logic configured to execute code;

a control register configured to store address translation table information comprising a base address of a memory page containing an address translation table;

protection logic coupled to said control register and configured to allow a software invoked write access to modify said address translation table information within said control register during said normal mode; and

wherein said protection logic includes security logic configured to selectively inhibit said software invoked write access during operation in said secure execution mode;

wherein said security logic is further configured to:

access a root page vector data structure comprising a plurality of bits, each bit configured to indicate whether a corresponding base address of a memory page is a root page;

allow said software invoked write access to proceed in response to determining that said base address included in said software invoked write access is a root page; and

inhibit said software invoked write access from proceeding in response to determining that said base address included in said software invoked write access is not a root page.

24. The computer system as recited in claim 23 , wherein said security logic is further configured to allow said software invoked write access to modify said address translation table information within said control register in response to said processor operating in a secure kernel mode.

25. The computer system as recited in claim 24 , wherein said secure kernel mode includes:

a current privilege level state being equal to zero within a code segment descriptor corresponding to a currently executing code sequence during said secure execution mode; and

said processor entering a trusted execution mode.

26. The computer system as recited in claim 23 , wherein said control register is control register number 3 (CR 3 ).

27. The computer system as recited in claim 26 , wherein said software invoked write access includes a load instruction specifying CR 3 as a destination operand.

28. The computer system as recited in claim 26 , wherein said software invoked write access includes a control transfer via a task gate.

29. The computer system as recited in claim 23 , wherein said security logic is further configured to cause a security exception to be generated in response to determining that said address included in said software invoked write access is not a root page when said processor is operating in a normal kernel mode.

30. The computer system as recited in claim 29 , wherein said address translation information includes cache control flags.

31. The computer system as recited in claim 30 , wherein said security logic is further configured to determine that said software invoked write access would result in setting said cache control flags.

32. The computer system as recited in claim 31 , wherein said security logic is further configured to cause a security exception to be generated in response to determining that said software invoked write access would result in setting said cache control flags when said processor is operating in a normal kernel mode.

33. The computer system as recited in claim 32 , wherein said normal kernel mode includes a current privilege level state being equal to zero within a code segment descriptor corresponding to a currently executing code sequence during said secure execution mode.

34. A method of controlling access to a control register of processor having a normal execution mode and a secure execution mode, said method comprising:

means for storing within said control register, address translation table information comprising a base address of a memory page containing an address translation table;

means for allowing a software invoked write access to modify said address translation table information within said control register during said normal execution mode; and

means for selectively inhibiting said software invoked write access during operation in said secure execution mode comprising:

accessing a root page vector data structure comprising a plurality of bits, each bit configured to indicate whether a corresponding base address of a memory page is a root page;

allowing said software invoked write access to proceed in response to determining that said base address included in said software invoked write access is a root page; and

inhibiting said software invoked write access from proceeding in response to determining that said base address included in said software invoked write access is not a root page.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 28, 2015
From: ADVANCED MICRO DEVICES, INC.
To: ADVANCED SILICON TECHNOLOGIES, LLC
Reel/Frame 036700/0001 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 21, 2003
From: CHRISTIE, DAVID S.; MCGRATH, KEVIN J.
To: ADVANCED MICRO DEVICES, INC.
Reel/Frame 013990/0213 →