Semaphoring system between system firmware and hardware manipulation subsystem
First Claim
1. A method of semaphoring between a system firmware and Advanced Configuration and Power Interface (ACPI) subsystem, the method comprising:
- prior to entering a critical section of a shared memory by a first entity, checking, by the first entity, a turn flag to determine if the first entity or a second entity has a turn to access the critical section of the shared memory, wherein the turn flag has a first value if the first entity has the turn to access the critical section and wherein the turn flag has a second value if the second entity has the turn to access the critical section;
if the first entity will attempt to access the critical section and if the first entity has the turn to access the critical section of the shared memory, then changing, by the first entity, a value in the turn flag from the first value to the second value so that the second entity will have the turn to access the critical section of the shared memory;
if the first entity will attempt to access the critical section and if the second entity has the turn to access the critical section of the shared memory, then checking, by the first entity, a second In flag that is associated with the second entity so that the first entity determines if the second entity is in the critical section, wherein the second In flag has the first value if the second entity is in the critical section and has the second value if the second entity is not in the critical section;
if the first entity will attempt to access the critical section and if the second entity is in the critical section, then avoiding to enter the critical section by the first entity until after the second entity exits the critical section;
changing, by the second entity, the second In flag to the second value after the second entity exits the critical section;
changing, by the first entity, a first In flag that is associated with the first entity to the first value prior to the first entity entering the critical section, wherein the first In flag has the first value if the first entity is in the critical section and has the second value if the first entity is not in the critical section; and
entering the critical section by the first entity after the second entity exits the critical section and after the first entity has set the first In flag to the first value.
2 Assignments
0 Petitions
Accused Products
Abstract
In one embodiment of the invention, a method of semaphoring between a system firmware and ACPI subsystem, includes: prior to entering a critical section by a first entity, checking a turn flag to determine if a second entity has a turn to access a critical section; if the second entity has the turn, then checking an In flag of the second entity to determine if the second entity is in the critical section; if the second entity is in the critical section, then waiting for the second entity to exit the critical section; and entering the critical section by the first entity. The method may further include: if the second entity is not in the critical section, then entering the critical section by the first entity.
12 Citations
19 Claims
-
1. A method of semaphoring between a system firmware and Advanced Configuration and Power Interface (ACPI) subsystem, the method comprising:
-
prior to entering a critical section of a shared memory by a first entity, checking, by the first entity, a turn flag to determine if the first entity or a second entity has a turn to access the critical section of the shared memory, wherein the turn flag has a first value if the first entity has the turn to access the critical section and wherein the turn flag has a second value if the second entity has the turn to access the critical section; if the first entity will attempt to access the critical section and if the first entity has the turn to access the critical section of the shared memory, then changing, by the first entity, a value in the turn flag from the first value to the second value so that the second entity will have the turn to access the critical section of the shared memory; if the first entity will attempt to access the critical section and if the second entity has the turn to access the critical section of the shared memory, then checking, by the first entity, a second In flag that is associated with the second entity so that the first entity determines if the second entity is in the critical section, wherein the second In flag has the first value if the second entity is in the critical section and has the second value if the second entity is not in the critical section; if the first entity will attempt to access the critical section and if the second entity is in the critical section, then avoiding to enter the critical section by the first entity until after the second entity exits the critical section; changing, by the second entity, the second In flag to the second value after the second entity exits the critical section; changing, by the first entity, a first In flag that is associated with the first entity to the first value prior to the first entity entering the critical section, wherein the first In flag has the first value if the first entity is in the critical section and has the second value if the first entity is not in the critical section; and entering the critical section by the first entity after the second entity exits the critical section and after the first entity has set the first In flag to the first value. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. An apparatus for semaphoring between a system firmware and Advanced Configuration and Power Interface (ACPI) subsystem, the apparatus comprising:
-
a first entity; a second entity; a shared memory; a semaphoring system between the first entity and second entity, wherein prior to the first entity entering a critical section of the shared memory, wherein the first entity is configured to check a turn flag to determine if the first entity or the second entity has a turn to access the critical section of the shared memory, wherein the turn flag has a first value if the first entity has the turn to access the critical section and wherein the turn flag has a second value if the second entity has the turn to access the critical section; wherein if the first entity will attempt to access the critical section and if the first entity has the turn to access the critical section of the shared memory, then the first entity changes a value in the turn flag from the first value to the second value so that the second entity will have the turn to access the critical section of the shared memory; wherein if the first entity will attempt to access the critical section, then the first entity is configured to check a second In flag that is associated with the second entity so that the first entity determines if the second entity is in the critical section, if the second entity has the turn to access the critical section, wherein the second In flag has the first value if the second entity is in the critical section and has the second value if the second entity is not in the critical section; wherein the second entity changes the second In flag to the second value after the second entity exits the critical section; wherein the first entity changes a first In flag that is associated with the first entity to the first value prior to the first entity entering the critical section, wherein the first In flag has the first value if the first entity is in the critical section and has the second value if the first entity is not in the critical section; wherein the first entity is configured to avoid to enter the critical section until after the second entity exits the critical section, and to enter the critical section after exit of the critical section by the second entity and after the first entity has set the first In flag to the first value. - View Dependent Claims (9, 10, 11, 12, 13)
-
-
14. An apparatus for semaphoring between a system firmware and Advanced Configuration and Power Interface (ACPI) subsystem, the apparatus comprising:
-
means for checking a turn flag to determine if a first entity or a second entity has a turn to access a critical section of a shared memory, prior to entering the critical section by a first entity, wherein the turn flag has a first value if the first entity has the turn to access the critical section and wherein the turn flag has a second value if the second entity has the turn to access the critical section; means for changing a value in the turn flag from the first value to the second value so that the second entity will have the turn to access the critical section of the shared memory if the first entity has the turn to access the critical section of the shared memory and if the first entity will attempt to access the critical section; means for checking a second In flag that is associated with the second entity so that the first entity determines if the second entity is in the critical section of the shared memory, if the second entity has the turn to access the critical section and if the first entity will attempt to access the critical section, wherein the second In flag has the first value if the second entity is in the critical section and has the second value if the second entity is not in the critical section; means for avoiding to enter the critical section by the first entity until after the second entity exits the critical section; means for changing, by the second entity, the second In flag to the second value after the second entity exits the critical section; means for changing, by the first entity, a first In flag that is associated with the first entity to the first value prior to the first entity entering the critical section, wherein the first In flag has the first value if the first entity is in the critical section and has the second value if the first entity is not in the critical section; and means for entering the critical section by the first entity after the second entity exits the critical section and after the first entity has set the first In flag to the first value. - View Dependent Claims (15, 16)
-
-
17. An article of manufacture, comprising:
-
a machine-readable storage medium having stored thereon instructions to permit a computer to perform a method comprising; prior to entering a critical section by a first entity, checking a turn flag to determine if the first entity or a second entity has a turn to access the critical section of the shared memory, wherein the turn flag has a first value if the first entity has the turn to access the critical section and wherein the turn flag has a second value if the second entity has the turn to access the critical section; if the first entity will attempt to access the critical section and if the first entity has the turn to access the critical section of the shared memory, then changing, by the first entity, a value in the turn flag from the first value to the second value so that the second entity will have the turn to access the critical section of the shared memory; if the first entity will attempt to access the critical section and if the second entity has the turn to access the critical section of the shared memory, then checking a second In flag that is associated with the second entity so that the first entity determines if the second entity is in the critical section, wherein the second In flag has the first value if the second entity is in the critical section and has the second value if the second entity is not in the critical section; if the first entity will attempt to access the critical section and if the second entity is in the critical section, then avoiding to enter the critical section by the first entity until after the second entity exits the critical section; changing, by the second entity, the second In flag to the second value after the second entity exits the critical section; changing, by the first entity, a first In flag that is associated with the first entity to the first value prior to the first entity entering the critical section, wherein the first In flag has the first value if the first entity is in the critical section and has the second value if the first entity is not in the critical section; and entering the critical section by the first entity after the second entity exits the critical section and after the first entity has set the first In flag to the first value. - View Dependent Claims (18, 19)
-
Specification