Stefan Reinauer | debb11f | 2008-10-29 04:46:52 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 4 | * Copyright (C) 2008-2009 coresystems GmbH |
Stefan Reinauer | debb11f | 2008-10-29 04:46:52 +0000 | [diff] [blame] | 5 | * |
Uwe Hermann | c70e9fc | 2010-02-15 23:10:19 +0000 | [diff] [blame] | 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; version 2 of the License. |
Stefan Reinauer | debb11f | 2008-10-29 04:46:52 +0000 | [diff] [blame] | 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
Stefan Reinauer | debb11f | 2008-10-29 04:46:52 +0000 | [diff] [blame] | 14 | */ |
| 15 | |
| 16 | typedef struct { |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 17 | /* Miscellaneous */ |
| 18 | u16 osys; /* 0x00 - Operating System */ |
| 19 | u8 smif; /* 0x02 - SMI function call ("TRAP") */ |
| 20 | u8 prm0; /* 0x03 - SMI function call parameter */ |
| 21 | u8 prm1; /* 0x04 - SMI function call parameter */ |
| 22 | u8 scif; /* 0x05 - SCI function call (via _L00) */ |
| 23 | u8 prm2; /* 0x06 - SCI function call parameter */ |
| 24 | u8 prm3; /* 0x07 - SCI function call parameter */ |
| 25 | u8 lckf; /* 0x08 - Global Lock function for EC */ |
| 26 | u8 prm4; /* 0x09 - Lock function parameter */ |
| 27 | u8 prm5; /* 0x0a - Lock function parameter */ |
| 28 | u32 p80d; /* 0x0b - Debug port (IO 0x80) value */ |
| 29 | u8 lids; /* 0x0f - LID state (open = 1) */ |
| 30 | u8 pwrs; /* 0x10 - Power state (AC = 1) */ |
| 31 | u8 dbgs; /* 0x11 - Debug state */ |
| 32 | u8 linx; /* 0x12 - Linux OS */ |
| 33 | u8 dckn; /* 0x13 - PCIe docking state */ |
| 34 | /* Thermal policy */ |
| 35 | u8 actt; /* 0x14 - active trip point */ |
| 36 | u8 psvt; /* 0x15 - passive trip point */ |
| 37 | u8 tc1v; /* 0x16 - passive trip point TC1 */ |
| 38 | u8 tc2v; /* 0x17 - passive trip point TC2 */ |
| 39 | u8 tspv; /* 0x18 - passive trip point TSP */ |
| 40 | u8 crtt; /* 0x19 - critical trip point */ |
| 41 | u8 dtse; /* 0x1a - Digital Thermal Sensor enable */ |
| 42 | u8 dts1; /* 0x1b - DT sensor 1 */ |
| 43 | u8 dts2; /* 0x1c - DT sensor 2 */ |
Stefan Reinauer | debb11f | 2008-10-29 04:46:52 +0000 | [diff] [blame] | 44 | u8 rsvd2; |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 45 | /* Battery Support */ |
| 46 | u8 bnum; /* 0x1e - number of batteries */ |
| 47 | u8 b0sc, b1sc, b2sc; /* 0x1f-0x21 - stored capacity */ |
| 48 | u8 b0ss, b1ss, b2ss; /* 0x22-0x24 - stored status */ |
Stefan Reinauer | debb11f | 2008-10-29 04:46:52 +0000 | [diff] [blame] | 49 | u8 rsvd3[3]; |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 50 | /* Processor Identification */ |
| 51 | u8 apic; /* 0x28 - APIC enabled */ |
| 52 | u8 mpen; /* 0x29 - MP capable/enabled */ |
| 53 | u8 pcp0; /* 0x2a - PDC CPU/CORE 0 */ |
| 54 | u8 pcp1; /* 0x2b - PDC CPU/CORE 1 */ |
| 55 | u8 ppcm; /* 0x2c - Max. PPC state */ |
| 56 | u8 rsvd4[5]; |
| 57 | /* Super I/O & CMOS config */ |
| 58 | u8 natp; /* 0x32 - SIO type */ |
Stefan Reinauer | aca6ec6 | 2009-10-26 17:12:21 +0000 | [diff] [blame] | 59 | u8 cmap; /* 0x33 - */ |
| 60 | u8 cmbp; /* 0x34 - */ |
| 61 | u8 lptp; /* 0x35 - LPT port */ |
| 62 | u8 fdcp; /* 0x36 - Floppy Disk Controller */ |
| 63 | u8 rfdv; /* 0x37 - */ |
| 64 | u8 hotk; /* 0x38 - Hot Key */ |
Stefan Reinauer | debb11f | 2008-10-29 04:46:52 +0000 | [diff] [blame] | 65 | u8 rtcf; |
| 66 | u8 util; |
| 67 | u8 acin; |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 68 | /* Integrated Graphics Device */ |
| 69 | u8 igds; /* 0x3c - IGD state */ |
| 70 | u8 tlst; /* 0x3d - Display Toggle List Pointer */ |
| 71 | u8 cadl; /* 0x3e - currently attached devices */ |
| 72 | u8 padl; /* 0x3f - previously attached devices */ |
| 73 | u16 cste; /* 0x40 - current display state */ |
| 74 | u16 nste; /* 0x42 - next display state */ |
| 75 | u16 sste; /* 0x44 - set display state */ |
| 76 | u8 ndid; /* 0x46 - number of device ids */ |
| 77 | u32 did[5]; /* 0x47 - 5b device id 1..5 */ |
| 78 | u8 rsvd5[0x9]; |
| 79 | /* Backlight Control */ |
| 80 | u8 blcs; /* 0x64 - Backlight Control possible */ |
Stefan Reinauer | debb11f | 2008-10-29 04:46:52 +0000 | [diff] [blame] | 81 | u8 brtl; |
| 82 | u8 odds; |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 83 | u8 rsvd6[0x7]; |
| 84 | /* Ambient Light Sensors*/ |
| 85 | u8 alse; /* 0x6e - ALS enable */ |
Stefan Reinauer | debb11f | 2008-10-29 04:46:52 +0000 | [diff] [blame] | 86 | u8 alaf; |
| 87 | u8 llow; |
| 88 | u8 lhih; |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 89 | u8 rsvd7[0x6]; |
| 90 | /* EMA */ |
| 91 | u8 emae; /* 0x78 - EMA enable */ |
Stefan Reinauer | debb11f | 2008-10-29 04:46:52 +0000 | [diff] [blame] | 92 | u16 emap; |
| 93 | u16 emal; |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 94 | u8 rsvd8[0x5]; |
| 95 | /* MEF */ |
| 96 | u8 mefe; /* 0x82 - MEF enable */ |
| 97 | u8 rsvd9[0x9]; |
| 98 | /* TPM support */ |
| 99 | u8 tpmp; /* 0x8c - TPM */ |
Stefan Reinauer | debb11f | 2008-10-29 04:46:52 +0000 | [diff] [blame] | 100 | u8 tpme; |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 101 | u8 rsvd10[8]; |
| 102 | /* SATA */ |
| 103 | u8 gtf0[7]; /* 0x96 - GTF task file buffer for port 0 */ |
| 104 | u8 gtf1[7]; |
Stefan Reinauer | debb11f | 2008-10-29 04:46:52 +0000 | [diff] [blame] | 105 | u8 gtf2[7]; |
| 106 | u8 idem; |
| 107 | u8 idet; |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 108 | u8 rsvd11[7]; |
| 109 | /* IGD OpRegion (not implemented yet) */ |
| 110 | u32 aslb; /* 0xb4 - IGD OpRegion Base Address */ |
| 111 | u8 ibtt; |
| 112 | u8 ipat; |
| 113 | u8 itvf; |
| 114 | u8 itvm; |
| 115 | u8 ipsc; |
| 116 | u8 iblc; |
| 117 | u8 ibia; |
| 118 | u8 issc; |
| 119 | u8 i409; |
| 120 | u8 i509; |
| 121 | u8 i609; |
| 122 | u8 i709; |
| 123 | u8 idmm; |
| 124 | u8 idms; |
| 125 | u8 if1e; |
| 126 | u8 hvco; |
| 127 | u32 nxd[8]; |
| 128 | u8 rsvd12[8]; |
| 129 | /* Mainboard specific */ |
| 130 | u8 dock; /* 0xf0 - Docking Status */ |
Stefan Reinauer | aca6ec6 | 2009-10-26 17:12:21 +0000 | [diff] [blame] | 131 | u8 bten; |
| 132 | u8 rsvd13[14]; |
Stefan Reinauer | 573f7d4 | 2009-07-21 21:50:34 +0000 | [diff] [blame] | 133 | } __attribute__((packed)) global_nvs_t; |
Vladimir Serbinenko | 0e64617 | 2014-08-31 00:27:05 +0200 | [diff] [blame] | 134 | |
| 135 | void acpi_create_gnvs(global_nvs_t *gnvs); |