System and methods for sharing platform data with an ACPI module of a computer system

A method and system for sharing platform data are described. The method for sharing platform data includes during a boot sequence of system firmware, accessing a first data structure tag associated with a resource accessible by the operating system. Also during the boot sequence of the system firmware, the method includes determining a memory address corresponding to platform specific data associated with the resource. During a boot time sequence of the system firmware, run time code is parsed. The method includes accessing a second tag that is visible to the operating system and associating it with the location of the platform specific data. This allows for the platform specific data to be consumed by an operating system during runtime in accordance with the industry common interfaces defined in ACPI.

BACKGROUND

Advanced Configuration and Power Interface (ACPI) is a standard that has been developed to define parameters for an operation system of a computer to recognize available resources. ACPI can be used to describe resources information such as a number of available CPUs (Central Processing Units), amount of memory, peripherals, etc.

DETAILED DESCRIPTION

Reference will now be made in detail to embodiments of the present technology, examples of which are illustrated in the accompanying drawings. While the technology will be described in conjunction with various embodiment(s), it will be understood that they are not intended to limit the present technology to these embodiments. On the contrary, the present technology is intended to cover alternatives, modifications and equivalents, which may be included within the spirit and scope of the various embodiments as defined by the appended claims.

Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the present technology. However, the present technology may be practiced without these specific details. In other instances, well known methods, procedures, components, and circuits have not been described in detail as not to unnecessarily obscure aspects of the present embodiments.

Unless specifically stated otherwise as apparent from the following discussions, it is appreciated that throughout the present detailed description, discussions utilizing terms such as “receiving”, “determining”, “enabling”, “accessing”, “identifying”, “associating”, “indexing”, “parsing”, “generating”, “tagging,” or the like, refer to the actions and processes of a computer system, or similar electronic computing device. The computer system or similar electronic computing device manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission, or display devices. The present technology is also well suited to the use of other computer systems such as, for example, optical and mechanical computers.

Embodiments of the present technology provide a mechanism for dynamically sharing platform information available in data structures with AML (ACPI machine language). The present technology in one embodiment eliminates the need to rely on ACPI Operation Regions that use fixed address locations for consuming system data. Using fixed Operation Regions can result in the need to rebuild firmware images which makes using fixed Operation Regions unattractive for code bases that need to support multiple platforms. Embodiments of the present technology enable the use of a single code base to support multiple platforms.

Embodiments of the present invention use data structures that are tagged in main memory which removes the requirement of the AML code tracking the location of data structures every time the system is booted. Embodiments of the present technology enable the AML code to be flexible and unsusceptible to choosing random memory locations for the data structures during boot. In other words, the AML code is unsusceptible to where the allocation of data structures occur in memory during boot.

FIG. 1is a block diagram of sharing platform data between a boot time environment102and a AML code106consumed by the Operating System at run time environment in accordance with embodiments of the present technology. In one embodiment, during boot time102, a first resource120is associated with a tag125. The tag125is associated with resource data at a particular address150corresponding to the resource120.

Embodiments of the present technology enable the resource data memory address150of the platform data to replace a dummy value185associated with a tag180that is also associated with resource120while processing AML code106. In one embodiment, the replacement occurs during boot time and not OS runtime. In one embodiment, tag180is an ObjectName declared in ASL.

Tagging on the boot time side serves the purpose of linking a data structure to an identifier. In one embodiment, the data structure tag comprises three characteristics. The first characteristic of the tag is related to its address. The address of the tag represents the address of the data structure. InFIG. 1, the resource data memory address150represents the address of the data structure for resource120.

The second characteristic of the tag is related to its value. The value of the tag must match the value of an Object name that can be used to point to the Boot time structure (e.g., a C-coded structure) from the ASL (e.g., tag180) in AML code106.

The third characteristic is related to uniqueness. The tag must be unique to avoid collisions in the namespace in addition to any conflict that may occur with similar tags or ObjectNames during a parsing phase.

In addition to data structure tagging, ASL tagging is required. ASL tagging allows for an ObjectName (e.g., tag180) to serve as an identifier that holds the memory address of the data structure. The ObjectName can be then passed to an operation region which can be used for reading and writing data fields corresponding to the data structure.

The final step is to perform AML parsing. The purpose of parsing the code is to update the dummy value185of the ASL declared object name (tag180) with the correct address (address150) of the structure used in boot time102.

FIG. 2is a flow diagram of a method200for modifying machine language to enable sharing of platform data in accordance with embodiments of the present technology.

At202, performing data structure tagging may be performed by the following example:

At206, performing AML parsing may be performed by the following example:

1. Load the AML file that needs to be parsed into memory.

2. Lookup the tag field that corresponds to the data structure intended for sharing.

3. Parse the ACPI file for the AML op-code corresponding to the ObjectName declaration followed by the ObjectName that corresponds to the tag included in the data structure.

4. Update the Object field in the Name( ) declaration with the address of the tag declared in the data structure.

5. Publish the updated AML file for consumption by the operating system.

FIG. 3is a flow diagram of an exemplary method300for sharing platform data in accordance with embodiments of the present technology.

At302,300includes during a boot sequence of system firmware, accessing a first data structure tag associated with a resource accessible by the operating system. For example, the resource could be a CPU or memory. In one embodiment, the first data structure tag is associated with a C based data structure containing platform data which is consumed by the operating system via AML methods. In one embodiment, the first data structure tag is an ASL based ObjectName.

At304,300includes during the boot sequence of the system firmware, determining a memory address corresponding to platform specific data associated with the resource. In one embodiment, the memory address is an address in main memory associated with the platform.

At306,300includes using a second tag associated with the first resource. In one embodiment, the second tag is associated with ASL for enabling an AML code sequence. In one embodiment, the second tag is an ObjectName.

At308,300includes using ASL code to associate the second tag with the platform specific data associated with the resource. In one embodiment,308further includes loading an ACPI table and replacing a dummy entry of the object name in the table with the address determined in304. The address determined in304represents the location of platform specific data. In one embodiment,304is performed by the boot time code which parses the runtime code that will be executed by the operating system.

Example Computer System Environment

With reference now toFIG. 4, portions of the technology for sharing platform data are composed of computer-readable and computer-executable instructions that reside, for example, in computer-usable storage media of a computer system. That is,FIG. 4illustrates one example of a type of computer that can be used to implement embodiments, which are discussed below, of the present technology.

FIG. 4illustrates an example computer system400used in accordance with embodiments of the present technology. It is appreciated that system400ofFIG. 4is an example only and that the present technology can operate on or within a number of different computer systems that use ACPI, including blade servers, general purpose networked computer systems, embedded computer systems, routers, switches, server devices, user devices, various intermediate devices/artifacts, stand alone computer systems, mobile phones, personal data assistants, and the like. It is also appreciated that system400may be one of a plurality of like systems that can be combined and partitioned in accordance with embodiments of the present technology. In one embodiment, system400is a single blade computer system of a multi-blade server system. However, in another embodiment, system400is a multi-blade computer server system.

As shown inFIG. 4, computer system400ofFIG. 4is well adapted to having peripheral computer readable media402such as, for example, a floppy disk, a compact disc, and the like coupled thereto.

System400ofFIG. 4includes an address/data bus404for communicating information, and a processor406A coupled to bus404for processing information and instructions. As depicted inFIG. 4, system400is also well suited to a multi-processor environment in which a plurality of processors406A,406B, and406C are present. Conversely, system400is also well suited to having a single processor such as, for example, processor406A. Processors406A,406B, and406C may be any of various types of microprocessors. System400also includes data storage features such as a computer usable volatile memory408, e.g. random access memory (RAM), coupled to bus404for storing information and instructions for processors406A,406B, and406C.

System400also includes computer usable non-volatile memory410, e.g. read only memory (ROM), coupled to bus404for storing static information and instructions for processors406A,406B, and406C. Also present in system400is a data storage unit412(e.g., a magnetic or optical disk and disk drive) coupled to bus404for storing information and instructions. System400also includes an optional alpha-numeric input device414including alphanumeric and function keys coupled to bus404for communicating information and command selections to processor406A or processors406A,406B, and406C. System400also includes an optional cursor control device416coupled to bus404for communicating user input information and command selections to processor406A or processors406A,406B, and406C. System400of the present embodiment also includes an optional display device418coupled to bus404for displaying information.

Referring still toFIG. 4, optional display device418ofFIG. 4may be a liquid crystal device, cathode ray tube, plasma display device or other display device suitable for creating graphic images and alpha-numeric characters recognizable to a user. Optional cursor control device416allows the computer user to dynamically signal the movement of a visible symbol (cursor) on a display screen of display device418. Many implementations of cursor control device416are known in the art including a trackball, mouse, touch pad, joystick or special keys on alpha-numeric input device414capable of signaling movement of a given direction or manner of displacement. Alternatively, it will be appreciated that a cursor can be directed and/or activated via input from alpha-numeric input device414using special keys and key sequence commands.

System400is also well suited to having a cursor directed by other means such as, for example, voice commands. System400also includes an I/O device420for coupling system400with external entities. For example, in one embodiment, I/O device420is a modem for enabling wired or wireless communications between system400and an external network such as, but not limited to, the Internet.

Referring still toFIG. 4, various other components are depicted for system400. Specifically, when present, an operating system422, applications424, platform data sharing module200, and data428are shown as typically residing in one or some combination of computer usable volatile memory408, e.g. random access memory (RAM), and data storage unit412. However, it is appreciated that in some embodiments, operating system422may be stored in other locations such as on a network or on a flash drive; and that further, operating system422may be accessed from a remote location via, for example, a coupling to the internet. In one embodiment, the present technology, is stored as BIOS/System Firmware499in memory locations within RAM408and memory areas ROM410. The present technology is applied to BIOS/system firmware to enable data sharing with operating system422during run time.

The computing system400is only one example of a suitable computing environment and is not intended to suggest any limitation as to the scope of use or functionality of the present technology. Neither should the computing environment400be interpreted as having any dependency or requirement relating to any one or combination of components illustrated in the example computing system400.