Annotation of kernel/bsd/dev/ppc/drvPMU/pmutables.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
                      3:  *
                      4:  * @APPLE_LICENSE_HEADER_START@
                      5:  * 
                      6:  * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
                      7:  * Reserved.  This file contains Original Code and/or Modifications of
                      8:  * Original Code as defined in and that are subject to the Apple Public
                      9:  * Source License Version 1.1 (the "License").  You may not use this file
                     10:  * except in compliance with the License.  Please obtain a copy of the
                     11:  * License at http://www.apple.com/publicsource and read it before using
                     12:  * this file.
                     13:  * 
                     14:  * The Original Code and all software distributed under the License are
                     15:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
                     16:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
                     17:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
                     18:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
                     19:  * License for the specific language governing rights and limitations
                     20:  * under the License.
                     21:  * 
                     22:  * @APPLE_LICENSE_HEADER_END@
                     23:  */
                     24: 
                     25: 
                     26: 
                     27: SInt8  cmdLengthTable[256] = {
                     28:        -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,                // 0x00 - 0x0F
                     29:                                                                        // 0x10 - 0x1F
                     30:        1,                                                      // 0x10 Subsystem Power/Clock Control
                     31:        1,                                                      // 0x11 Subsystem Power/Clock Control (yet more)
                     32:        -1,-1,-1,-1,-1,-1,                                      // 0x12 - 0x17
                     33:        0,                                                      // 0x18 Read Power/Clock Status
                     34:        0,                                                      // 0x19 Read Power/Clock Status (yet more)
                     35:        -1,-1,-1,-1,-1,                                         // 0x1A
                     36:        0,                                                      // 0x1F RESERVED FOR MSC/PG&E EMULATION
                     37:                                                                        // 0x20 - 0x2F
                     38:        -1,                                                     // 0x20 Set New Apple Desktop Bus Command
                     39:        0,                                                      // 0x21 ADB Autopoll Abort
                     40:        2,                                                      // 0x22 ADB Set Keyboard Addresses
                     41:        1,                                                      // 0x23 ADB Set Hang Threshold
                     42:        1,                                                      // 0x24 ADB Enable/Disable Programmers Key
                     43:        -1,-1,-1,                                               // 0x25
                     44:        0,                                                      // 0x28 ADB Transaction Read
                     45:        -1,-1,-1,-1,-1,-1,-1,                                   // 0x29
                     46:                                                                        // 0x30 - 0x3F
                     47:        4,                                                      // 0x30 Set Realtime Clock.
                     48:        20,                                                     // 0x31 Write Parameter RAM
                     49:        -1,                                                     // 0x32 Write Extended Parameter RAM.
                     50:        3,                                                      // 0x33 Write NVRAM
                     51:        -1,-1,-1,-1,                                            // 0x34
                     52:        0,                                                      // 0x38 Read Realtime Clock.
                     53:        0,                                                      // 0x39 Read Parameter RAM
                     54:        2,                                                      // 0x3A Read Extended Parameter RAM.
                     55:        2,                                                      // 0x3B Read NVRAM
                     56:        -1,-1,-1,-1,                                            // 0x3C
                     57:                                                                        // 0x40 - 0x4F
                     58:        1,                                                      // 0x40 Set Screen Contrast
                     59:        1,                                                      // 0x41 Set Screen Brightness
                     60:        -1,-1,-1,-1,-1,-1,                                      // 0x42
                     61:        0,                                                      // 0x48 Read Screen Contrast
                     62:        0,                                                      // 0x49 Read Screen Brightness
                     63:        -1,-1,                                                  // 0x4A
                     64:        1,                                                      // 0x4C PCMCIA card eject
                     65:        -1,-1,-1,                                               // 0x4D
                     66:                                                                        // 0x50 - 0x5F
                     67:        1,                                                      // 0x50 Set Internal Modem Control Bits
                     68:        0,                                                      // 0x51 Clear FIFOs
                     69:        2,                                                      // 0x52 Set FIFO Interrupt Marks
                     70:        2,                                                      // 0x53 Set FIFO Sizes
                     71:        -1,                                                     // 0x54 Write Data to Modem
                     72:        1,                                                      // 0x55 Set Data Mode
                     73:        3,                                                      // 0x56 Set Flow Control Mode
                     74:        1,                                                      // 0x57 Set DAA control lines
                     75:        0,                                                      // 0x58 Read Internal Modem Status
                     76:        1,                                                      // 0x59 Get DAA Identification
                     77:        0,                                                      // 0x5A Get FIFO Counts
                     78:        0,                                                      // 0x5B Get Maximum FIFO Sizes
                     79:        0,                                                      // 0x5C Read Data From Modem
                     80:        -1,                                                     // 0x5D General Purpose modem command (modem dependent)
                     81:        -1,-1,                                                  // 0x5E
                     82:                                                                        // 0x60 - 0x6F
                     83:        2,                                                      // 0x60 Set low power warning and cutoff levels
                     84:        -1,                                                     // 0x61
                     85:        2,                                                      // 0x62 Set low power first dialog and 10 second warning levels
                     86:        0,                                                      // 0x63 Get low power first dialog and 10 second warning levels
                     87:        -1,-1,-1,-1,                                            // 0x64
                     88:         0,                                                     // 0x68 Read Charger State, Battery Voltage, Temperature
                     89:        0,                                                      // 0x69 Read Instantaneous Charger, Battery, Temperature
                     90:        0,                                                      // 0x6A Read low power warning and cutoff levels
                     91:        0,                                                      // 0x6B Read Extended Battery Status
                     92:        0,                                                      // 0x6C Read Battery ID
                     93:        0,                                                      // 0x6D Battery Parameters
                     94:        -1,-1,                                                  // 0x6E
                     95:                                                                        // 0x70 - 0x7F
                     96:        1,                                                      // 0x70 Set One-Second Interrupt
                     97:        1,                                                      // 0x71 Modem Interrupt Control
                     98:        1,                                                      // 0x72 Set Modem Interrupt
                     99:        -1,-1,-1,-1,-1,                                         // 0x73
                    100:        0,                                                      // 0x78 Read Interrupt Flag Register.
                    101:        0,                                                      // 0x79 Read Modem Interrupt Data
                    102:        -1,-1,-1,-1,                                            // 0x7A
                    103:        4,                                                      // 0x7E Enter Shutdown Mode
                    104:        4,                                                      // 0x7F Enter Sleep Mode
                    105:                                                                        // 0x80 - 0x8F
                    106:        4,                                                      // 0x80 Set Wakeup Timer
                    107:        -1,                                                     // 0x81
                    108:        0,                                                      // 0x82 Disable Wakeup Timer
                    109:        -1,-1,-1,-1,-1,                                         // 0x83
                    110:        0,                                                      // 0x88 Read Wakeup Timer
                    111:        -1,-1,-1,-1,-1,-1,-1,// 0x89
                    112:                                                                        // 0x90 - 0x9F
                    113:        1,                                                      // 0x90 Set Sound Control Bits
                    114:        2,                                                      // 0x91 Set DFAC Control Register
                    115:        -1,-1,-1,-1,-1,-1,                                      // 0x92
                    116:        0,                                                      // 0x98 Read Sound Control Status
                    117:        0,                                                      // 0x99 Read DFAC Control Register
                    118:        -1,-1,-1,-1,-1,-1,                                      // 0x9A
                    119:                                                                        // 0xA0 - 0xAF
                    120:        2,                                                      // 0xA0 Write Modem Register
                    121:        2,                                                      // 0xA1 Clear Modem Register Bits
                    122:        2,                                                      // 0xA2 Set Modem Register Bits
                    123:        4,                                                      // 0xA3 Write DSP RAM
                    124:        -1,                                                     // 0xA4 Set Filter Coefficients
                    125:        0,                                                      // 0xA5 Reset Modem
                    126:        -1,-1,                                                  // 0xA6
                    127:        1,                                                      // 0xA8 Read Modem Register
                    128:        1,                                                      // 0xA9 Send Break
                    129:        3,                                                      // 0xAA Dial Digit
                    130:        2,                                                      // 0xAB Read DSP RAM
                    131:        -1,-1,-1,-1,                                            // 0xAC
                    132:        -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,                // 0xB0 - 0xBF
                    133:        -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,                // 0xC0 - 0xCF
                    134:                                                                        // 0xD0 - 0xDF
                    135:        0,                                                      // 0xD0 Reset CPU
                    136:        -1,-1,-1,-1,-1,-1,-1,                                   // 0xD1
                    137:        1,                                                      // 0xD8 Read A/D Status
                    138:        1,                                                      // 0xD9 Read User Input
                    139:        -1,-1,                                                  // 0xDA
                    140:        0,                                                      // 0xDC read external switches
                    141:        0,                                                      // 0xDD -
                    142:        -1,-1,                                                  // 0xDE
                    143:                                                                        // 0xE0 - 0xEF
                    144:        -1,                                                     // 0xE0 Write to internal PMGR memory
                    145:        4,                                                      // 0xE1 Download Flash EEPROM Code
                    146:        0,                                                      // 0xE2 Get Flash EEPROM Status
                    147:        -1,-1,-1,-1,-1,                                         // 0xE3
                    148:        3,                                                      // 0xE8 Read PMGR internal memory
                    149:        -1,                                                     // 0xE9 -
                    150:        0,                                                      // 0xEA Read PMGR firmware version number
                    151:        -1,                                                     // 0xEB -
                    152:        0,                                                      // 0xEC Execute self test
                    153:        -1,                                                     // 0xED PMGR diagnostics (selector-based)
                    154:        -1,                                                     // 0xEE -
                    155:        0,                                                      // 0xEF PMGR soft reset
                    156:                                                                        // 0xF0 - 0xFF
                    157:        -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
                    158: };
                    159: 
                    160: 
                    161: 
                    162: //  This table is used to determine how to handle the reply:
                    163: 
                    164: //=0:no reply should be expected.
                    165: //=1: only a reply byte will be sent (this is a special case for a couple of commands)
                    166: //<0:a reply is expected and the PMGR will send a count byte.
                    167: //>1:a reply is expected and the PMGR will not send a count byte,
                    168: //but the count will be (value-1).
                    169: //
                    170: //Unused commands in the range $x8 to $xF will be marked as expecting a reply (with count)
                    171: //so that commands may be added without having to change the ROM.
                    172: 
                    173: SInt8  rspLengthTable[256] = {
                    174:                                                                        // 0x00 - 0x0F
                    175:        0,0,0,0,0,0,0,0,                                        // 0x00 -
                    176:        -1,-1,-1,-1,-1,-1,-1,-1,                                // 0x08 -
                    177:                                                                        // 0x10 - 0x1F
                    178:        0,                                                      // 0x10 Subsystem Power/Clock Control
                    179:        0,                                                      // 0x11 Subsystem Power/Clock Control (yet more)
                    180:        0,0,0,0,0,0,                                            // 0x12 -
                    181:        1+1,                                                    // 0x18 Read Power/Clock Status
                    182:        1+1,                                                    // 0x19 Read Power/Clock Status (yet more)
                    183:        -1,-1,-1,-1,-1,                                         // 0x1A -
                    184:        0,                                                      // 0x1F RESERVED FOR MSC/PG&E EMULATION
                    185:                                                                        // 0x20 - 0x2F
                    186:        0,                                                      // 0x20 Set New Apple Desktop Bus Command
                    187:        0,                                                      // 0x21 ADB Autopoll Abort
                    188:        0,                                                      // 0x22 ADB Set Keyboard Addresses
                    189:        0,                                                      // 0x23 ADB Set Hang Threshold
                    190:        0,                                                      // 0x24 ADB Enable/Disable Programmers Key
                    191:        0,0,0,                                                  // 0x25 -
                    192:        -1,                                                     // 0x28 ADB Transaction Read
                    193:        -1,-1,-1,-1,-1,-1,-1,                                   // 0x29 -
                    194:                                                                        // 0x30 - 0x3F
                    195:        0,                                                      // 0x30 Set Realtime Clock.
                    196:        0,                                                      // 0x31 Write Parameter RAM
                    197:        0,                                                      // 0x32 Write Extended Parameter RAM.
                    198:        0,                                                      // 0x33 Write NVRAM
                    199:        0,0,0,0,                                                // 0x34 -
                    200:        4+1,                                                    // 0x38 Read Realtime Clock.
                    201:        20+1,                                                   // 0x39 Read Parameter RAM
                    202:        -1,                                                     // 0x3A Read Extended Parameter RAM.
                    203:        1+1,                                                    // 0x3B Read NVRAM
                    204:        -1,-1,-1,-1,                                            // 0x3C -
                    205:                                                                        // 0x40 - 0x4F
                    206:        0,                                                      // 0x40 Set Screen Contrast
                    207:        0,                                                      // 0x41 Set Screen Brightness
                    208:        0,0,0,0,0,0,                                            // 0x42 -
                    209:        1+1,                                                    // 0x48 Read Screen Contrast
                    210:        1+1,                                                    // 0x49 Read Screen Brightness
                    211:        -1,-1,                                                  // 0x4A -
                    212:        0,                                                      // 0x4C PCMCIA card eject
                    213:        -1,-1,-1,                                               // 0x4D -
                    214:                                                                        // 0x50 - 0x5F
                    215:        0,                                                      // 0x50 Set Internal Modem Control Bits
                    216:        0,                                                      // 0x51 Clear FIFOs
                    217:        0,                                                      // 0x52 Set FIFO Interrupt Marks
                    218:        0,                                                      // 0x53 Set FIFO Sizes
                    219:        0,                                                      // 0x54 Write Data to Modem
                    220:        0,                                                      // 0x55 Set Data Mode
                    221:        0,                                                      // 0x56 Set Flow Control Mode
                    222:        0,                                                      // 0x57 Set DAA control lines
                    223:        1+1,                                                    // 0x58 Read Internal Modem Status
                    224:        0,                                                      // 0x59 Get DAA Identification
                    225:        2+1,                                                    // 0x5A Get FIFO Counts
                    226:        2+1,                                                    // 0x5B Get Maximum FIFO Sizes
                    227:        -1,                                                     // 0x5C Read Data From Modem
                    228:        -1,                                                     // 0x5D General Purpose modem command (modem dependent)
                    229:        -1,-1,                                                  // 0x5E -
                    230:                                                                        // 0x60 - 0x6F
                    231:        0,                                                      // 0x60 Set low power warning and cutoff levels
                    232:        0,                                                      // 0x61 -
                    233:        0,                                                      // 0x62 Set low power first dialog and 10 second warning levels 
                    234:        2+1,                                                    // 0x63 Get low power first dialog and 10 second warning levels
                    235:        0,0,0,0,                                                // 0x64 -
                    236:        3+1,                                                    // 0x68 Read Charger State, Battery Voltage, Temperature
                    237:        3+1,                                                    // 0x69 Read Instantaneous Charger, Battery, Temperature
                    238:        2+1,                                                    // 0x6A Read low power warning and cutoff levels
                    239:        8+1,                                                    // 0x6B Read Extended Battery Status
                    240:        -1,                                                     // 0x6C Read Battery ID
                    241:        -1,                                                     // 0x6D Battery Parameters (10+1 for AJ, 22+1 for Malcolm)
                    242:        -1,-1,                                                  // 0x6E -
                    243:                                                                        // 0x70 - 0x7F
                    244:        0,                                                      // 0x70 Set One-Second Interrupt
                    245:        0,                                                      // 0x71 Modem Interrupt Control
                    246:        0,                                                      // 0x72 Set Modem Interrupt
                    247:        0,0,0,0,0,                                              // 0x73 -
                    248:        -1,                                                     // 0x78 Read Interrupt Flag Register.
                    249:        -1,                                                     // 0x79 Read Modem Interrupt Data
                    250:        -1,-1,-1,-1,                                            // 0x7A -
                    251:        0+1,                                                    // 0x7E Enter Shutdown Mode
                    252:        0+1,                                                    // 0x7F Enter Sleep Mode
                    253:                                                                        // 0x80 - 0x8F
                    254:        0,                                                      // 0x80 Set Wakeup Timer
                    255:        0,                                                      // 0x81 -
                    256:        0,                                                      // 0x82 Disable Wakeup Timer
                    257:        0,0,0,0,0,                                              // 0x83 -
                    258:        5+1,                                                    // 0x88 Read Wakeup Timer
                    259:        -1,-1,-1,-1,-1,-1,-1,                                   // 0x89 -
                    260:                                                                        // 0x90 - 0x9F
                    261:        0,                                                      // 0x90 Set Sound Control Bits
                    262:        0,                                                      // 0x91 Set DFAC Control Register
                    263:        0,0,0,0,0,0,                                            // 0x92 -
                    264:        1+1,                                                    // 0x98 Read Sound Control Status
                    265:        1+1,                                                    // 0x99 Read DFAC Control Register
                    266:        1,-1,-1,-1,-1,-1,                                       // 0x9A -
                    267:                                                                        // 0xA0 - 0xAF
                    268:        0,                                                      // 0xA0 Write Modem Register
                    269:        0,                                                      // 0xA1 Clear Modem Register Bits
                    270:        0,                                                      // 0xA2 Set Modem Register Bits
                    271:        0,                                                      // 0xA3 Write DSP RAM
                    272:        0,                                                      // 0xA4 Set Filter Coefficients
                    273:        0,                                                      // 0xA5 Reset Modem
                    274:        0,0,                                                    // 0xA6 -
                    275:        1+1,                                                    // 0xA8 Read Modem Register
                    276:        0,                                                      // 0xA9 Send Break
                    277:        0,                                                      // 0xAA Dial Digit
                    278:        0,                                                      // 0xAB Read DSP RAM
                    279:        -1,-1,-1,-1,                                            // 0xAC -
                    280:                                                                        // 0xB0 - 0xBF
                    281:        0,0,0,0,0,0,0,0,                                        // 0xB0 -
                    282:        -1,-1,-1,-1,-1,-1,-1,-1,                                // 0xB8 -
                    283:                                                                        // 0xC0 - 0xCF
                    284:        0,0,0,0,0,0,0,0,                                        // 0xC0 -
                    285:        -1,-1,-1,-1,-1,-1,-1,-1,                                // 0xC8 -
                    286:                                                                        // 0xD0 - 0xDF
                    287:        0,0,0,0,0,0,0,0,                                        // 0xD0 Reset CPU
                    288:        1+1,                                                    // 0xD8 Read A/D Status
                    289:        1+1,                                                    // 0xD9 Read User Input
                    290:        -1,-1,                                                  // 0xDA -
                    291:        1+1,                                                    // 0xDC read external switches
                    292:        -1,-1,-1,                                               // 0xDD -
                    293:                                                                        // 0xE0 - 0xEF
                    294:        0,                                                      // 0xE0 Write to internal PMGR memory
                    295:        0,                                                      // 0xE1 Download Flash EEPROM Code
                    296:        0+1,                                                    // 0xE2 Get Flash EEPROM Status
                    297:        0,0,0,0,0,                                              // 0xE3 -
                    298:        -1,                                                     // 0xE8 Read PMGR internal memory
                    299:        -1,                                                     // 0xE9 -
                    300:        1+1,                                                    // 0xEA Read PMGR firmware version number
                    301:        -1,                                                     // 0xEB -
                    302:        -1,                                                     // 0xEC Execute self test
                    303:        -1,                                                     // 0xED PMGR diagnostics (selector-based)
                    304:        -1,                                                     // 0xEE -
                    305:        0,                                                      // 0xEF PMGR soft reset
                    306:                                                                        // 0xF0 - 0xFF
                    307:        0,0,0,0,0,0,0,0,                                        // 0xF0 -
                    308:        -1,-1,-1,-1,-1,-1,-1,-1                                 // 0xF8 -
                    309: };
                    310: 
                    311: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.