# Windows/BIOS/ACPI interaction



## _nobody_ (Jan 1, 2016)

Hello WIN10 experts,

I’m looking for the info about interaction of Windows/BIOS/ACPI in general. Looking at Microsoft documents it still looks to me as a black box. :grin:

I'll figure out BIOS ACPI interaction, but I really need help with WIN ACPI interaction/documentation (preferable WIN10, but if no info available, other WIN OSes' documentation will be also of great help to me). :thumb:

Thank you in advance!
_nobody_


----------



## spunk.funk (May 13, 2010)

ACPI - Advanced Configuration and Power Interface
What exactly do you want to know? what are you trying to do?


----------



## _nobody_ (Jan 1, 2016)

Hello Spunk,

I obviously know about ACPI standard (the latest came out somewhere around November 2015, ACPI 6.0, if I am not mistaken).

Here is what I would like to understand: how to communicate to devices connected to System Management Bus (SMB). SMB itself is established as an ACPI device in BIOS and Windows by default.

In other words, I would like to figure out how to talk to ACPI system, to establish a communication to the devices connected to SMB, e.g. RTC, EEPROMs, via/using WIN10.

At this point Microsoft documentation is not really offering to me too much. :whistling:

(I am progressing with BIOS ACPI, trying to understand how BIOS configures HW and ACPI tables deep in HW, an this is... I should say, true rocket science! :banghead 

Thank you,
_nobody_


----------



## spunk.funk (May 13, 2010)

_Drivers _are how hardware communicates with the ACPI Bios, EEPROM etc in Windows
_SMB_ is used to network between Macintosh and Windows computers. 
Maybe this might help you?: Communicating with an SPI based EEPROM using Arduino® Hardware


----------



## _nobody_ (Jan 1, 2016)

Thank you, spunk,

But this is is something else... It is how to connect external SPI using SPI protocol, for the SPI programming. :grin:
_______

I continue to read BIOS ACPI, and I am learning how BIOS is setting HW. One of the interesting points I ever ask myself is the following: _"How to enable multiple processors in dual or multi-processor (multicore) platform to run at the same Max Non-Turbo Ratio and, more importantly, to have the Time Stamp Counter (TSC) on each processor aligned to count at the same speed?!"_

The main point is, how BIOS sets C states, C0, C1, C1E, C3, C6, C7, and beyond (C8, C9, C10). For C0, how BIOS sets P states.* I would like to understand how WIN10 uses these settings, how it accesses them, and how WIN10 modifies/manipulates (if?) these settings.* :angel:

I'll figure out several modes in BIOS, for the starters! :whistling:

_nobody_


----------



## _nobody_ (Jan 1, 2016)

Recently, I started investigating a bit more in-dept this topic. I downloaded APCI Spec 5.1, and found that WIN 10 closely follows this spec (chapter 5.1/5.2).


```
[U][I][B]Advanced Configuration and Power Interface Specification Revision 5.1[/B][/I][/U]

5.2 ACPI System Description Tables

This section specifies the structure of the system description tables:

• Root System Description Pointer (RSDP)
• System Description Table Header
• Root System Description Table (RSDT)
• Fixed ACPI Description Table (FADT)
• Firmware ACPI Control Structure (FACS)
• Differentiated System Description Table (DSDT)
• Secondary System Description Table (SSDT)
• Multiple APIC Description Table (MADT)
• Smart Battery Table (SBST)
• Extended System Description Table (XSDT)
• Embedded Controller Boot Resources Table (ECDT)
• System Locality Distance Information Table (SLIT)
• System Resource Affinity Table (SRAT)
• Corrected Platform Error Polling Table (CPEP)
• Maximum System Characteristics Table (MSCT)
• ACPI RAS FeatureTable (RASF)
• Memory Power StateTable (MPST)
• Platform Memory Topology Table (PMTT)
• Boot Graphics Resource Table (BGRT)
• Firmware Performance Data Table (FPDT)
• Generic Timer Description Table (GTDT)

All numeric values in ACPI-defined tables, blocks, and structures are always encoded in little endian format. Signature values are stored as fixed-length strings.
```
I also found how WIN 10 exposes and maintains ACPI tables. Here is one of the articles (there are quite few of them) from MicroSoft: https://msdn.microsoft.com/en-us/library/windows/hardware/dn495660(v=vs.85).aspx


```
Root System Description Table (RSDT)

The RSDT (or XSDT) includes pointers to any other system description tables provided on the platform. Specifically, this table contains pointers to the following:
The Fixed ACPI Hardware Table (FADT)
The multiple interrupt controller table (MADT)
Optionally, the Core System Resource Table (CSRT)
The Debug Port Table 2 (DBG2)
The Boot Graphics Resource Table (BGRT)
The Firmware Performance Data Table (FPDT)
The base system description table (DSDT)
Optionally, additional system description tables (SSDT)
```
I need to think more about the relationship between BIOS ACPI tables and these ones, what I have posted here, since it is not clear to me how all of this really functions in real life.

Excerpt from the ACPI spec 5.1:



> 5.1 Overview of the System Description Table Architecture
> *The Root System Description Pointer (RSDP) structure is located in the system’s memory address space and is setup by the platform firmware*. This structure contains the address of the Extended System Description Table (XSDT), which references other description tables that provide data to OSPM, supplying it with knowledge of the base system’s implementation and configuration.


I would appreciate any comment from the OSPM WIN10 ACPI knowledgeable person/expert... And to have some exploratory discussion, if possible! :angel:

Thank you,
_nobody_


----------

