IP Library Granted Patent US 7,840,773
Granted Patent B1
US 7,840,773 · App. 12/403,628 · Granted Nov 23, 2010

Providing memory management within a system management mode

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,840,773
App. No.
12/403,628
Granted
Nov 23, 2010
Kind
B1
Abstract

Methods, systems, and computer-readable media are provided for managing memory within a system management mode (“SMM”). According to the method, a memory management program is executed within the SMM. The memory management program is operative to maintain a singly linked list having one or more descriptors for identifying allocated regions of system management random access memory (“SMRAM”). In particular, each descriptor identifies a region of SMRAM that has been allocated by the memory management program by storing an indication of the base memory address of the allocated region, an indication of the ending memory address for the allocated region, and a pointer to the next descriptor.

Claims (55)

1. A computer-implemented method for managing a system management random-access memory (“SMRAM”) within a system management mode (“SMM”) of a microprocessor, the method comprising:

creating a first memory reserved table in the SMRAM, the first memory reserved table comprising a predetermined number of descriptors and a number of used descriptors counter, wherein each of the predetermined number of descriptors is configured to represent an allocated region of SMRAM;

initializing the predetermined number of descriptors in the first memory reserved table to default values indicating an unused state;

receiving a request from a program executing within the SMM to allocate a requested region of SMRAM;

locating a first descriptor having the unused state from the predetermined number of descriptors in the first memory reserved table;

transforming the first descriptor to refer to the requested region of SMRAM indicating a used state and incrementing the number of used descriptors counter, wherein each of the predetermined number of descriptors having the used state are maintained in a singly linked list;

determining whether all of the predetermined number of descriptors in the first memory reserved table indicate the used state;

upon determining that all of the predetermined number of descriptors in the first memory reserved table indicate the used state, creating a second memory reserved table in the SMRAM; and

initializing the predetermined number of descriptors in the second memory reserved table to default values indicating the unused state.

2. The computer-implemented method of claim 1 , wherein each of the predetermined number of descriptors comprises an indication of a base memory location of the region of allocated SMRAM and an ending memory location of the region of allocated SMRAM.

3. The computer-implemented method of claim 2 , wherein transforming the first descriptor to refer to the requested region of SMRAM comprises modifying the indication of the base memory location of the first descriptor to indicate the base memory location of the requested region of SMRAM and modifying the indication of the ending memory location of the first descriptor to indicate the ending memory location of the requested region of SMRAM.

4. The computer-implemented method of claim 2 , wherein each of the predetermined number of descriptors further comprises a pointer to a next used descriptor in the singly linked list.

5. The computer-implemented method of claim 1 , wherein the request to allocate a requested region of SMRAM comprises a request for a specific size of the requested region of SMRAM.

6. The computer-implemented method of claim 5 , wherein the request to allocate a requested region of SMRAM further comprises a request for a specific address of the requested region of SMRAM.

7. The computer-implemented method of claim 1 , further comprising:

receiving a request to deallocate a region of SMRAM;

identifying one or more of the predetermined number of descriptors corresponding to the region of SMRAM to be deallocated;

modifying the one or more of the predetermined number of descriptors to indicate the unused state; and

removing the one or more of the predetermined number of descriptors from the singly linked list.

8. A computer storage media having computer-executable instructions stored thereon that, when executed by a microprocessor in a system management mode (“SMM”), cause the microprocessor to:

create a first memory reserved table in a system management random-access memory (“SMRAM”), the first memory reserved table comprising a predetermined number of descriptors and a number of used descriptors counter, wherein each of the predetermined number of descriptors is configured to represent an allocated region of SMRAM;

initialize the predetermined number of descriptors in the first memory reserved table to default values indicating an unused state;

receive a request from a program executing within the SMM to allocate a requested region of SMRAM;

locate a first descriptor having the unused state from the predetermined number of descriptors in the first memory reserved table;

transform the first descriptor to refer to the requested region of SMRAM indicating a used state and increment the number of used descriptors counter, wherein each of the predetermined number of descriptors having the used state are maintained in a singly linked list;

determine whether all of the predetermined number of descriptors in the first memory reserved table indicate the used state;

upon determining that all of the predetermined number of descriptors in the first memory reserved table indicate the used state, create a second memory reserved table in the SMRAM; and

initialize the predetermined number of descriptors in the second memory reserved table to default values indicating the unused state.

9. The computer storage media of claim 8 , wherein each of the predetermined number of descriptors comprises an indication of a base memory location of the region of allocated SMRAM and an ending memory location of the region of allocated SMRAM.

10. The computer storage media of claim 9 , wherein transforming the first descriptor to refer to the requested region of SMRAM comprises modifying the indication of the base memory location of the first descriptor to indicate the base memory location of the requested region of SMRAM and modifying the indication of the ending memory location of the first descriptor to indicate the ending memory location of the requested region of SMRAM.

11. The computer storage media of claim 9 , wherein each of the predetermined number of descriptors further comprises a pointer to a next used descriptor in the singly linked list.

12. The computer storage media of claim 8 , having further computer-executable instructions stored thereon that, when executed by the microprocessor, cause the microprocessor to:

receive a request to deallocate a region of SMRAM;

identify one or more of the predetermined number of descriptors corresponding to the region of SMRAM to be deallocated;

modify the one or more of the predetermined number of descriptors to indicate the unused state; and

remove the one or more of the predetermined number of descriptors from the singly linked list.

13. A system for providing management of a system management random-access memory (“SMRAM”) within a system management mode (“SMM”) of a microprocessor comprising:

a microprocessor supporting the SMM;

a firmware stored in non-volatile memory operatively connected to the microprocessor; and

an SMM memory manager module contained in the firmware and configured to

create a first memory reserved table in the SMRAM, the first memory reserved table comprising a plurality of descriptors, each of the plurality of descriptors configured to represent an allocated region of SMRAM,

initialize the plurality of descriptors in the first memory reserved table to default values indicating an unused state,

receive a request from a program executing within the SMM to allocate a requested region of SMRAM,

locate a first descriptor having the unused state from the plurality of descriptors in the first memory reserved table,

transform the first descriptor to refer to the requested region of SMRAM indicating a used state, wherein each of the plurality of descriptors having the used state are maintained in a singly linked list,

determine whether all of the plurality of descriptors in the first memory reserved table indicate the used state,

upon determining that all of the plurality of descriptors in the first memory reserved table indicate the used state, create a second memory reserved table in the SMRAM, and

initialize the plurality of descriptors in the second memory reserved table to default values indicating the unused state.

14. The system of claim 13 , wherein each of the plurality of descriptors comprises an indication of a base memory location of the region of allocated SMRAM, an ending memory location of the region of allocated SMRAM, and a pointer to a next used descriptor in the singly linked list.

15. The system of claim 13 , wherein the SMM memory manager module is further configured to:

receive a request to deallocate a region of SMRAM;

identify one or more of the plurality of descriptors corresponding to the region of SMRAM to be deallocated;

modify the one or more of the plurality of descriptors to indicate the unused state; and

remove the one or more of the plurality of descriptors from the singly linked list.

16. The system of claim 13 , wherein the SMM memory manager module complies with an Extensible Firmware Interface (“EFI”) standard.

Assignments (4)
RELEASE OF SECURITY INTEREST Recorded Oct 17, 2024
From: MIDCAP FINANCIAL TRUST
To: AMERICAN MEGATRENDS INTERNATIONAL, LLC
Reel/Frame 069205/0795 →
SECURITY INTEREST Recorded May 6, 2019
From: AMERICAN MEGATRENDS INTERNATIONAL, LLC
To: MIDCAP FINANCIAL TRUST, AS COLLATERAL AGENT
Reel/Frame 049087/0266 →
ENTITY CONVERSION Recorded Apr 15, 2019
From: AMERICAN MEGATRENDS, INC.
To: AMERICAN MEGATRENDS INTERNATIONAL, LLC
Reel/Frame 049091/0973 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 13, 2009
From: WILSON, MARK ERIC
To: AMERICAN MEGATRENDS, INC.
Reel/Frame 022392/0127 →