Notebook Hardware Control
Home  |  Main  |  Professional  |  Download  |  FAQ  |  Advanced  |  Contact
Notebook Hardware Control advanced information
 
 
 
 
G o o g l e   l i n k s
 
Google
Web www.pbus-167.com
Programming the ACPI Control System (open source)
 
With the ACPI Control System you can visualize and control and hardware components like LCD brightness, WLAN, notebook temperature or fan of the notebook.
 
You can upload and download new ACPI Control System open source classes at
Please upload the c# source and xml files compressed with
 
The ACPI Control System is controlled by open source classes with the programming language c#. For each manufacturer and notebook model it is possible to define a new class and adapt it to the notebook hardware easily. The following steps should give you some information how to program the ACPI Control System.
 
1. Get the System Description Table (DSDT) from your system
 
All the information in the ACPI Namespace comes from the Differentiated System Description Table (DSDT).
 
The ACPI Namespace is a hierarchical tree structure in OS-controlled memory that contains named objects. These objects may be data objects, control method objects, bus/device package objects, and so on.
 
The NHC ACPI Control System allows you to control and change these objects.
 
Get the System Description Table (DSDT) with the Intel iASL Compiler
 
 
You can use the Intel iASL Compiler to obtain the DSDT from your system.
The iASL Compiler command iasl.exe -d will generate this two files containing the DSDT:
 
- ACPI Machine Language (AML) Pseudo-code for a virtual machine supported by an ACPI-compatible OS and in which ACPI control methods and objects are written.
- ACPI Source Language (ASL) The programming language equivalent for AML. ASL is compiled into AML images.
 
You need the second ACPI Source Language (ASL) file. In this file you will see all ACPI data objects, control method objects and bus/device packages of the system.
 
Intel iASL Compiler Download:
 
 
2. Control the ACPI objects listed in the System Description Table (DSDT) with NHC
 
NHC supports the following functions to control, read and write the objects in the ACPI Namespace:
 
ACPI Control System Methods
 
 
In the ACPI Namespace method objects are similar to function. For example, the _TMP() method returns the thermal zone's current operating temperature. With the NHC ACPI Control System you can call methods with and without arguments. Valid arguments are BYTE (8 Bit), WORD (16 Bit), or DWORD (32 Bit) values/arrays.
 
bool ACPI.METHOD.Call (string method);
 
bool ACPI.METHOD.Call (string method, int[] inArg, int inArgCount, ref int[] outArg, int outArgCount);
 
bool ACPI.METHOD.GetValue (string method, ref int value);
 
bool ACPI.METHOD.SetValue (string method, int value);
 
bool ACPI.METHOD.SetValueWithReturn (string method, int value, ref int returnValue);
 
Examples:
 
 
 
 
bool result = ACPI.METHOD.SetValue ("_SB.ATKD.WLED", 1);
 
-> Method in the source language file (ASL) ACPI Source Language (ASL)

DefinitionBlock ("DSDT.aml", "DSDT", 1, "INTEL ", "ALVISO ", 100925440)
{
    Scope (_SB)
    {
        Device (ATKD)
        {
            Method(WLED, 0x1, NotSerialized)         // <- NHC will call this method
            {
                If(Arg0)
                {
                    Store(Zero, WLON)
                }
                else
                {
                    Store(One, WLON)
                }
                SWSM(0x82, Arg0)
            }
        }
    }
}

 
 
ACPI Control System functions to read and write PACKAGE objects
 
 
In the ACPI Namespace a PACKAGE object is similar to a array of objects. It is also possible to read or write a package with one or more child packages. Note that with the following functions it is only possible to read or write BYTE (8 Bit), WORD (16 Bit), or DWORD (32 Bit) values. It is also possible to read and write PACKAGE objects defined in ACPI methods. The ACPI Control System supports the following function to read or write PACKAGE objects:
 
bool ACPI.PACKAGE.Read (string name, string path, ref int value);
 
bool ACPI.PACKAGE.Write (string name, string path, int value);
 
bool ACPI.PACKAGE.Read (string method, string name, string path, ref int value);
 
bool ACPI.PACKAGE.Write (string method, string name, string path, int value);
 
Examples:
 
bool result = ACPI.PACKAGE.Read ("_TZ.CMP0", "PKG[0].PKG[1].PKG[3]",ref int value);
 
bool result = ACPI.PACKAGE.Write ("_TZ.CMP0", "PKG[0].PKG[1].PKG[3]", 0x35);
 
-> Package in the source language file (ASL) ACPI Source Language (ASL)

DefinitionBlock ("DSDT.aml", "DSDT", 1, "INTEL ", "ALVISO ", 100925440)
{
    Scope (_TZ)
    {
        Name (CMP0, Package (0x02)
        {
            Package (0x02)
            {
                Package (0x0A)
                {
                    Zero,
                    0x2D,
                    0x39,
                    0x44,
                    0x54,
                    0x64,
                    0x69,
                    Zero,
                    0x09,
                    0x32
                },

                Package (0x07)
                {
                    Zero,
                    Zero,
                    0x23,
                    0x35,         // <- NHC will read/write the value 0x35
                    0x3F,
                    0x51,
                    0x5E
                }
            },
            ...
            ...
        }
    }
}

 
 
ACPI Control System functions to read and write BUFFER objects
 
 
In the ACPI Namespace a BUFFER object is similar to an array of Bytes (8 Bit). It is also possible to read and write BUFFER objects defined in ACPI methods. The NHC ACPI Control System supports the following function to read or write BUFFER objects:
 
bool ACPI.BUFFER.Read (string name, int index, ref byte value);
 
bool ACPI.BUFFER.Write (string name, int index, byte value);
 
bool ACPI.BUFFER.Read (string method, string name, int index, ref byte value);
 
bool ACPI.BUFFER.Write (string method, string name, int index, byte value);
 
 
 
ACPI Control System functions to read and write NAME objects
 
 
In the ACPI Namespace a NAME object defination is similar to a variable defination. Note that with the following functions it is only possible to read or write BYTE (8 Bit), WORD (16 Bit), or DWORD (32 Bit) values. It is also possible to read and write NAME objects defined in ACPI methods. The NHC ACPI Control System supports the following function to read or write NAME objects:
 
bool ACPI.NAME.Read (string name, ref int value);
 
bool ACPI.NAME.Write (string name, int value);
 
bool ACPI.NAME.Read (string method, string name, ref int value);
 
bool ACPI.NAME.Write (string method, string name, int value);
 
 
 
ACPI Control System functions to read and write FIELD objects
 
 
In the ACPI Namespace a FILED object is a collection of register. The location of a FILED is defined in the OperationRegion object. For Example if the OperationRegion points to the SystemMemory then the registers in the FILED are in the SystemMemory. The NHC ACPI Control System supports the following function to read or write FIELD objects:
 
Note #1:
 
If you read the field by the name you have to specify the name of the filed (and if necessary the path). In this case you don't have to add the name of the Operation Region.
 
Note #2:
 
If you read the Field by offset you have to use the name (and if necessary the path) of the Operation Region to specify the location of the Field.
 
bool ACPI.FIELD.Read (string name, ref int value);
 
bool ACPI.FIELD.Write (string name, int value);
 
bool ACPI.FIELD.ReadByOffset (string name, ref int value, int offset, byte dataSize);
 
bool ACPI.FIELD.WriteByOffset (string name, int value, int offset, byte dataSize);
 
If you read the Filed by the namein the normal way you have to use the Examples:
 
bool result = ACPI.FIELD.Read ("_SB.PCI0.LPCB.EC0.SSTS", ref value);
 
bool result = ACPI.FIELD.Write ("_SB.PCI0.LPCB.EC0.SSTS", 0x7D);
 
-> Field in the source language file (ASL) ACPI Source Language (ASL)

DefinitionBlock ("DSDT.aml", "DSDT", 1, "INTEL ", "ALVISO ", 100925440)
{
    Scope (_SB)
    {
        Device(PCI0)
        {
            Device(LPCB)
            {
                Device(EC0_)
                {
                    OperationRegion(ERAM, EmbeddedControl, Zero, 0xff)
                    Field(ERAM, ByteAcc, NoLock, Preserve)
                    {
                                Offset (0x18),
                        SPTR,   8,
                        SSTS,   8,    // <- NHC will read/write this value
                        SADR,   8,
                    }
                }
            }
        }
    }
}

 
bool result = ACPI.FIELD.ReadByOffset ("_SB.PCI0.LPCB.EC0.ERAM", ref value, 0x19, 8);
 
bool result = ACPI.FIELD.WriteByOffset ("_SB.PCI0.LPCB.EC0.ERAM", 0x7D, 0x19, 8);
 
-> Field in the source language file (ASL) ACPI Source Language (ASL)

DefinitionBlock ("DSDT.aml", "DSDT", 1, "INTEL ", "ALVISO ", 100925440)
{
    Scope (_SB)
    {
        Device(PCI0)
        {
            Device(LPCB)
            {
                Device(EC0_)
                {
                    OperationRegion(ERAM, EmbeddedControl, Zero, 0xff)
                    Field(ERAM, ByteAcc, NoLock, Preserve)
                    {
                                Offset (0x18),
                        SPTR,   8,
                        SSTS,   8,    // <- NHC will read/write at offset 0x19 one byte (8 Bits)
                        SADR,   8,
                    }
                }
            }
        }
    }
}

 
 
Read and write FIELD objects by offset with custom FieldFlags
 
 
The above functions ACPI.FIELD.ReadbyOffset() and ACPI.FIELD.WriteByOffset() will use the default
FieldFlags AccessType="ByteAcc", LockRule="NoLock" and UpdateRule="Preserve".
 
With the following functions it is possible to define custom FieldFlags:
 
bool ACPI.FIELD.ReadByOffset (string name, ref int value, int offset, byte dataSize, string accessType,
                                                  string lockRule, string updateRule);
 
bool ACPI.FIELD.WriteByOffset (string name, int value, int offset, byte dataSize, string accessType,
                                                  string lockRule, string updateRule);
 
The following FieldFlags are available:
 
AccessType = "AnyAcc" or "ByteAcc" or "WordAcc" or "DWordAcc" or "QWordAcc" or "BufferAcc"
LockRule = "NoLock" or "Lock"
UpdateRule = "Preserve" or "WriteAsOnes" or "WriteAsZeros"
 
(Note: EmbeddedControl and CMOS support only ByteAcc; SMBus support only BufferAcc)
 
Examples:
 
bool result = ACPI.FIELD.ReadByOffset ("_SB.PCI0.LPCB.EC0.ERAM", ref value, 0x19, 8, "ByteAcc", "Lock",
                                                           "Preserve");
 
bool result = ACPI.FIELD.WriteByOffset ("_SB.PCI0.LPCB.EC0.ERAM", 0x7D, 0x19, 8, "ByteAcc", "Lock",
                                                           "Preserve");
 
 
Read and write FIELD objects with custom overwrite functions (advanced functions)
 
 
To write an ACPI Field value NHC needs the body of a ACPI Method. By default the field read and write functions will use temporally the body of the System Wake (_WAK) control method.
 
If the _WAK method is not available or the body of the _WAK method is too short you can specify with the following functions another ACPI method. (How use the advanced function) To write an ACPI Field value NHC needs the body of a ACPI Method.
  The ACPI.FIELD functions will use temporally the body of the System Wake (_WAK) control method. Normally this control method is available on all systems. After the system wakes from a sleeping state, it will invoke the \_WAK method. On normal operation the system will not invoke this method and NHC can use the body of the \_WAK method without interferes with the system. (after the system wakes from a sleeping state NHC is not running)   If the _WAK method is not available or the body of the _WAK method is too short you can specify with the advanced function another ACPI method. For example you can use the \_BFS method. This control method is executed immediately after a wake event.   Probably you can use every ACPI Method because NHC will use the method body only on call of the FIELD function. To be safe NHC will use the \_WAK Method by default.

 
bool ACPI.FIELD.WriteAdvanced (string name, int value, string function);
 
bool ACPI.FIELD.ReadByOffsetAdvanced (string name, ref int value, int offset, byte dataSize, string
                                                                 function);
 
bool ACPI.FIELD.WriteByOffsetAdvanced (string name, int value, int offset, byte dataSize, string
                                                                 function);
 
bool ACPI.FIELD.ReadByOffsetAdvanced (string name, ref int value, int offset, byte dataSize, string
                                                                 accessType, string lockRule, string updateRule, string
                                                                 function);
 
bool ACPI.FIELD.WriteByOffsetAdvanced (string name, int value, int offset, byte dataSize, string
                                                                 accessType, string lockRule, string updateRule, string
                                                                 function);
 
Examples:
 
bool result = ACPI.FIELD.WriteAdvanced ("_SB.PCI0.LPCB.EC0.SSTS", 0x7D,"_WAK");
 
bool result = ACPI.FIELD.ReadByOffsetAdvanced ("_SB.PCI0.LPCB.EC0.ERAM", ref value, 0x19, 8, "_WAK");
 
 
 
3. Write the ACPI Control System source code class for a new system
 
To use the ACPI Control on systems with different hardware it is necessary to create a new ACPI Control System class for each of this systems.
 
NHC will distinguish the different systems with the manufacturer name and product (model) name. Each manufacturer has its own ACPI Control System source file. This source files must be saved in the subdirectory "acpi". You will find the "acpi" subdirectory in the NHC program directory.
 
Manufacturer name and model name
 
 
The manufacturer name and model name can be found in the "Computer Hardware Info" window under the SYSTEM, PRODUCT and MAINBOARD section.
 
Manufacturer name:
The manufacturer name must not be complete. For example if the manufacturer name is "Samsung Electronics" the short name "Samsung" can be used. The space character " " and the minus character "-" are interpreted as the underline character "_". For example if the manufacturer name is "Hewlett-Packard" you have to use "Hewlett_Packard".
In the SYSTEM and MAINBOARD section you will find the manufacturer name under "Manufacturer" and in the PRODUCT section you will find the manufacturer name under "Vendor".
 
Product name:
The model name must be complete. Short name are not allowed.
In the SYSTEM section you will find the model name under "Model", in the PRODUCT section you will find the model name under "Name" and in the MAINBOARD section you will find the model name under "Product".
 
XML definition files
 
 
NHC will use XML definition files to load the right class for the detected hardware. The XML filename and the first node must have the manufacturer name (full or short name). The second node of the xml file must have the name Model and defined the parameter name, location, class and file.
 
1. The parameter"name" defines the model name.
 
2. The parameter "location" defines the location of the model name parameter.
Valid values for the location parameter are SYSTEM, PRODUCT and MAINBOARD. NHC will then read the model name from the defined location. You will find the SYSTEM, PRODUCT and MAINBOARD section in the "Computer Hardware Info" window of NHC
 
3. The parameter "class" defines the class name in the source file.
 
4. The parameter "file" defines the filename of the source file.
 
Product class programming
 
 
It is recommended to use capitalized class names in the source files. Only static members and classes are allowed. To understand how a new product class will be programmed, please check the available source files and the file "example.cs" of the ACPI Control System. Most of the source code is described and so it is easy to understand how it works.
 
The ACPI Control System debugger will help you in the class development. It is also recommended to use a C# editor that supports syntax highlighting and the preprocessor directives #region and #endregion
 
If you have created a working class for your system please publish this new class in the .
 
Every user with the same system as yours can then use this new class and will be happy :-). I will also add the new source in the next NHC release.
 
G o o g l e   l i n k s
 
 
CPU Voltage information and examples
 
1. CPU stability problems -> CPU voltage variation / fluctuation
 
Possible problems:
 
 
- One day the CPU is stable, another day the CPU made calculation errors and causes the system to crash (blue screen).
- With a full battery level the CPU is stable, with a low battery level CPU made calculation errors and causes the system to crash.
- If I connect a external hardware the CPU makes calculation errors and causes the system to crash. (by connecting new hardware you will have short voltage fluctuation).
 
Why do I have these CPU stability problems with this Voltage, even if the NHC CPU Stability Check program, Prim95 or Hot CPU Tester does not report problems with this voltage? The answer is CPU voltage fluctuation (variation).
 
The CPU Voltage quality is not perfect; there are always little voltage fluctuations (voltage variations). It is possible, that the mainboard on tuned 0.700V doesn't exactly tune to 0.700V (with a deviation of +-10% you get 0.630V resp. 0.770V which are +-0.070V). 0.630V is to low and the CPU will make calculation errors. If you add a safety margin of 0.100V to your Voltage the new max. and min. voltages (with a deviation of +-10%) are 0.870V / 0.730V. The min. Voltage of 0.730V is greater as 0.700V. The CPU is stable also on voltage fluctuations of +-10%.
 
It is always recommended to add a safety margin of +10% to +20% on your CPU voltage.
 
On higher CPU frequency you may should calculate a greater margin as on lower frequency.
 
Voltage example with and without safety margin:
 
Therefore, I have the following voltages on a Dothan 1600 with safety margin It works without miscalculations with lower voltages too; lacking safety margin however
06 @ 0.956V
08 @ 1.116V
10 @ 1.228V
12 @ 1.356V
14 @ 1.452V
15 @ 1.484V
06 @ 0.812V
08 @ 0.924V
10 @ 1.036V
12 @ 1.164V
14 @ 1.260V
15 @ 1.292V
 
2. CPU Voltage examples for Notebook Hardware Control
 
Dothan 725 (1,6GHz, 100MHz FSB) Format: Multiplier @ Voltage (i.e. 06 @ 0.988V)
Intel's default voltages reducing voltage by ~0.2V more voltage reducing
06 @ 0.988V
08 @ 1.068V
10 @ 1.132V
12 @ 1.212V
14 @ 1.276V
16 @ 1.340V
06 @ 0.780V
08 @ 0.860V
10 @ 0.924V
12 @ 1.004V
14 @ 1.100V
16 @ 1.196V
06 @ 0.700V
08 @ 0.812V
10 @ 0.908V
12 @ 1.004V
14 @ 1.100V
16 @ 1.196V
 
Banias 1,5GHz (100MHz FSB) Format: Multiplier @ Voltage (i.e. 06 @ 0.956V)
Intel's default voltages reducing voltage by ~0.2V more voltage reducing
06 @ 0.956V
08 @ 1.116V
10 @ 1.228V
12 @ 1.356V
14 @ 1.452V
15 @ 1.484V
06 @ 0.812V
08 @ 0.924V
10 @ 1.036V
12 @ 1.164V
14 @ 1.260V
15 @ 1.292V
06 @ 0.796V
08 @ 0.908V
10 @ 1.004V
12 @ 1.100V
14 @ 1.148V
15 @ 1.260V
 
Sonoma 730 (1,6GHz, 133MHz FSB) Format: Multiplier @ Voltage (i.e. 06 @ 0.812V)
Intel's default voltages reducing voltage by ~0.2V more voltage reducing
06 @ 0.956V
08 @ 1.116V
10 @ 1.228V
12 @ 1.356V
14 @ 1.452V
15 @ 1.484V
06 @ 0.812V
08 @ 0.924V
10 @ 1.036V
12 @ 1.164V
14 @ 1.260V
15 @ 1.292V
06 @ 0.796V
08 @ 0.908V
10 @ 1.004V
12 @ 1.100V
14 @ 1.148V
15 @ 1.260V
 
Return to top