SMC: Difference between revisions
No edit summary |
imported>Tuxuser m (Text replace - "Category:Hardware" to "Category:Xbox360_Hardware") |
||
(9 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
{{Cleanup}} | |||
The '''System Management Controller (SMC)''' is an [[8051/8052]] core inside the [[Southbridge]]. It manages the power sequencing, and is always active when the Xbox 360 has (standby or full) power applied. It controls the frontpanel, has a Realtime clock, decodes IR, manages temperatures, fans, DVDROM tray and a bunch of other things. It talks with the frontpanel board to set the LEDs. When the system is running, the kernel can communicate with the SMC, for example to query the realtime clock, open the dvd-tray etc. | |||
The System Management Controller (SMC) is an [[8051/8052]] core inside the [[Southbridge]]. It manages the power sequencing, and is always active when the Xbox 360 has (standby or full) power applied. It controls the frontpanel, has a Realtime clock, decodes IR, manages temperatures, fans, DVDROM tray and a bunch of other things. It talks with the frontpanel board to set the LEDs. When the system is running, the kernel can communicate with the SMC, for example to query the realtime clock, open the dvd-tray etc. | |||
== The FIFO == | == The FIFO == | ||
Line 51: | Line 50: | ||
| "\x82\0x04\0x31\0\0\0\0\0\0\0\0\0\0\0\0\0" | | "\x82\0x04\0x31\0\0\0\0\0\0\0\0\0\0\0\0\0" | ||
| set standby/power | | set standby/power | ||
|- | |||
| [[SMC Command 0x8c|0x8c]] | |||
| 3 | |||
| "\x8c\0x01\0x00\0\0\0\0\0\0\0\0\0\0\0\0\0" | |||
| set power led | |||
|} | |} | ||
Line 74: | Line 78: | ||
| <tt> 04 602f 212223 01 00000000</tt> | | <tt> 04 602f 212223 01 00000000</tt> | ||
| real time clock | | real time clock | ||
|- | |||
| [[SMC Command 0x07|0x07]] | |||
| 1:10 | |||
| "\x07\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | |||
| <tt> 07ff 241b 2fa4 2cfa 262c </tt> | |||
| read temperature | |||
|- | |||
| [[SMC Command 0x0a|0x0a]] | |||
| 1:2 | |||
| "\x0a\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | |||
| <tt> 0a 60 </tt> | |||
| request tray state | |||
|- | |||
| [[SMC Command 0x0f|0x0f]] | |||
| 1:2 | |||
| "\x0f\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | |||
| <tt> 0f 54 </tt> | |||
| request AV-Pack type | |||
|- | |- | ||
| [[SMC Command 0x11|0x11]] | | [[SMC Command 0x11|0x11]] | ||
Line 80: | Line 102: | ||
| <tt> 11 02</tt> | | <tt> 11 02</tt> | ||
| read ana | | read ana | ||
|- | |||
| [[SMC Command 0x12|0x12]] | |||
| 1:6 | |||
| "\x12\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | |||
| <tt> 1241 0203 0000 </tt> | |||
| request SMC version | |||
|- | |||
| [[SMC Command 0x16|0x16]] | |||
| 1:2 | |||
| "\x16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | |||
| <tt> 16 0f </tt> | |||
| query IR access | |||
|- | |||
| [[SMC Command 0x17|0x17]] | |||
| 1:2 | |||
| "\x17\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | |||
| <tt> 17 00 </tt> | |||
| request tilt state | |||
|- | |||
|} | |||
== Event Messages == | |||
{| class="wikitable" border="0" cellspacing="2" cellpadding="2" | |||
|- | |||
! style="border-bottom:2px solid gray;" | ID | |||
! style="border-bottom:2px solid gray;" | Len | |||
! style="border-bottom:2px solid gray;" | Example Message | |||
! style="border-bottom:2px solid gray;" | Purpose | |||
|- | |||
| [[SMC Command 0x83|0x83]] | |||
| 2 | |||
| <tt> 83 64 </tt> | |||
| SMC Event | |||
|- | |- | ||
|} | |} | ||
[[Category:Xbox360_Hardware]] |
Latest revision as of 00:24, 7 January 2014
This page needs to be cleaned up, because its either hard to read or contains very little information. You can help Free60 by editing this page and cleaning it up. |
The System Management Controller (SMC) is an 8051/8052 core inside the Southbridge. It manages the power sequencing, and is always active when the Xbox 360 has (standby or full) power applied. It controls the frontpanel, has a Realtime clock, decodes IR, manages temperatures, fans, DVDROM tray and a bunch of other things. It talks with the frontpanel board to set the LEDs. When the system is running, the kernel can communicate with the SMC, for example to query the realtime clock, open the dvd-tray etc.
The FIFO
Sending a Message
Communication between kernel and SMC happens over a bidirectional FIFO (at ea001080 / ea001090).
All messages and replies are 16 byte long and have the command id in the first byte.
void smc_send(void *msg)
{
while (!(readl(0xea001084) & 4)) // wait for FIFO ready
cpu_relax();
writel(4, 0xea001084); // start message
writesl(0xea001080, msg, 4); // send 16 bytes
writel(0, 0xea001084); // end message
}
Receiving a Reply
Some messages have replies, which will be returned as 16 byte sequence similar to the message (they also have the command id in the first byte).
int smc_read_reply(void *msg)
{
if (!(readl(0xea001094) & 4)) // do we have a reply?
return 0;
writel(4, 0xea001094); // start reply
readsl(0xea001090, msg, 4); // read 16 bytes
writel(0, 0xea001094); // end reply
return 1;
}
Command Messages
ID | Len | Example | Purpose |
---|---|---|---|
0x82 | 2-3 | "\x82\0x04\0x31\0\0\0\0\0\0\0\0\0\0\0\0\0" | set standby/power |
0x8c | 3 | "\x8c\0x01\0x00\0\0\0\0\0\0\0\0\0\0\0\0\0" | set power led |
Query Messages
ID | Len | Example Query | Example Reply | Purpose |
---|---|---|---|---|
0x01 | 1:6 | "\x01\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | 01 12 00 00 00 00 | power on type |
0x04 | 1:11 | "\x04\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | 04 602f 212223 01 00000000 | real time clock |
0x07 | 1:10 | "\x07\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | 07ff 241b 2fa4 2cfa 262c | read temperature |
0x0a | 1:2 | "\x0a\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | 0a 60 | request tray state |
0x0f | 1:2 | "\x0f\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | 0f 54 | request AV-Pack type |
0x11 | 6:2 | "\x11\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | 11 02 | read ana |
0x12 | 1:6 | "\x12\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | 1241 0203 0000 | request SMC version |
0x16 | 1:2 | "\x16\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | 16 0f | query IR access |
0x17 | 1:2 | "\x17\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" | 17 00 | request tilt state |
Event Messages
ID | Len | Example Message | Purpose |
---|---|---|---|
0x83 | 2 | 83 64 | SMC Event |