48a6c018bc
IASL version 20180927 and greater, detects Unnecessary/redundant uses of the Offset() operator within a Field Unit list. It then sends a remark "^ Unnecessary/redundant use of Offset" example: OperationRegion (OPR1, SystemMemory, 0x100, 0x100) Field (OPR1) { Offset (0), // Never needed FLD1, 32, Offset (4), // Redundant, offset is already 4 (bytes) FLD2, 8, Offset (64), // OK use of Offset. FLD3, 16, } We will have those remarks: dsdt.asl 14: Offset (0), Remark 2158 - ^ Unnecessary/redundant use of Offset operator dsdt.asl 16: Offset (4), Remark 2158 - ^ Unnecessary/redundant use of Offset operator Change-Id: I260a79ef77025b4befbccc21f5999f89d90c1154 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/43283 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com> Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
30 lines
890 B
Text
30 lines
890 B
Text
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/* Global variables */
|
|
Name (PMOD, Zero) /* Interrupt Mode used by OS. Assume PIC. */
|
|
|
|
/*
|
|
* NOTE: The layout of the GNVS structure below must match the layout in
|
|
* soc/amd/picasso/include/soc/nvs.h !!!
|
|
*
|
|
*/
|
|
|
|
External (NVSA)
|
|
|
|
OperationRegion (GNVS, SystemMemory, NVSA, 0x1000)
|
|
Field (GNVS, ByteAcc, NoLock, Preserve)
|
|
{
|
|
/* Miscellaneous */
|
|
PCNT, 8, // 0x00 - Processor Count
|
|
LIDS, 8, // 0x01 - LID State
|
|
PWRS, 8, // 0x02 - AC Power State
|
|
CBMC, 32, // 0x03 - 0x06 - coreboot Memory Console
|
|
PM1I, 64, // 0x07 - 0x0e - System Wake Source - PM1 Index
|
|
GPEI, 64, // 0x0f - 0x16 - GPE Wake Source
|
|
TMPS, 8, // 0x17 - Temperature Sensor ID
|
|
TCRT, 8, // 0x18 - Critical Threshold
|
|
TPSV, 8, // 0x19 - Passive Threshold
|
|
/* ChromeOS stuff (0x100 -> 0xfff, size 0xeff) */
|
|
Offset (0x100),
|
|
#include <vendorcode/google/chromeos/acpi/gnvs.asl>
|
|
}
|