From patchwork Tue Sep 22 18:45:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1369192 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Y8zBBUPh; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bwr4S0rNfz9sTS for ; Wed, 23 Sep 2020 04:51:19 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 49B2C82639; Tue, 22 Sep 2020 20:48:05 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Y8zBBUPh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6CD89825D1; Tue, 22 Sep 2020 20:46:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1F049825B7 for ; Tue, 22 Sep 2020 20:46:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-oi1-x241.google.com with SMTP id t76so22162036oif.7 for ; Tue, 22 Sep 2020 11:46:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7F6yZ4sCd1unKuBSlsbxVlzNt0EXrVvqwoT2RwbSlGY=; b=Y8zBBUPhhuQp2Y46eoKwgrTyLI77NYeTjccuGLGXNH9/19WCpqu/ZFoVYrKsPWmDd5 ymr+LxM7BeJ0jxC32rIt62c3pUX5NjE1qewV3lVqzRr+db7Q8SfkaF01Hjbf3Y/gwDDH INyh/fsdiRTvs3xlrMnuXMu9LDhKZbf6D9fJ8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7F6yZ4sCd1unKuBSlsbxVlzNt0EXrVvqwoT2RwbSlGY=; b=qqqUoKxNo3SArtmh0T7inLvoCrywELeP2Oo3zEEsXj3IALoGAuUN10bJzY1fdHgWrj j6pwBnm9f3gbLdd+4w+vPEIp7h7RoC5HsIjjBS4u4cXpwcZEJVILM/jT6HGtpO9pdsER 595S5JZGzh88IyGMwI03y0HIhjroys9Uh0XthmxgSuFRm20HyAFfSu/SiBsupS5u6WnA Cf/cqxV5Pf/Rl8fEJSUGreOjUmpiLhsSVpR255f08al6MWttnOVwhgz3pHLNJ2CzEIi5 Ciq0BDroJru3lbgcm2gQYl9hJN8w7aqNmtDNj5yR+I3bBpKFYVgYgTlGhh4FDw6DiQzE qnug== X-Gm-Message-State: AOAM533j3B5zV4eP7GNYipWkodiSl/c2X64oOVdDGjz05+IiscY/3gps HaLBVHMZQNgdyBSo8S7DWiR9jXpmHbgX2yZe X-Google-Smtp-Source: ABdhPJxjruxT3n7KfwKkwP2go16vcu8L6lf7NvwSRln4LZRl4sxA6GkdTbV5fNc98XmfNoWHEUlhFg== X-Received: by 2002:a05:6808:2c5:: with SMTP id a5mr3300561oid.123.1600800404527; Tue, 22 Sep 2020 11:46:44 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id q24sm7622663oij.19.2020.09.22.11.46.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Sep 2020 11:46:44 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Andy Shevchenko , Wolfgang Wallner , Bin Meng , Bernhard Messerklinger , Simon Glass Subject: [PATCH v4 20/59] x86: Add some definitions for SMM Date: Tue, 22 Sep 2020 12:45:05 -0600 Message-Id: <20200922124521.v4.20.Ie0798fbf2b61afd6f2011e8b5f58cba679834675@changeid> X-Mailer: git-send-email 2.28.0.681.g6f77f65b4e-goog In-Reply-To: <20200922184544.2920969-1-sjg@chromium.org> References: <20200922184544.2920969-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean U-Boot does not support SMM (System Management Mode) at present, but needs a few definitions to correctly set up the ACPI table. Add these. Signed-off-by: Simon Glass --- (no changes since v1) arch/x86/include/asm/smm.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 arch/x86/include/asm/smm.h diff --git a/arch/x86/include/asm/smm.h b/arch/x86/include/asm/smm.h new file mode 100644 index 00000000000..1e539fda067 --- /dev/null +++ b/arch/x86/include/asm/smm.h @@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * SMM definitions (U-Boot does not support SMM itself) + * + * Copyright (C) 2008-2009 coresystems GmbH + * Copyright 2019 Google LLC + * + * Modified from coreboot smm.h + */ + +#ifndef _ASM_SMM_H +#define _ASM_SMM_H + +#define APM_CNT 0xb2 +#define APM_CNT_CST_CONTROL 0x85 +#define APM_CNT_PST_CONTROL 0x80 +#define APM_CNT_ACPI_DISABLE 0x1e +#define APM_CNT_ACPI_ENABLE 0xe1 +#define APM_CNT_MBI_UPDATE 0xeb +#define APM_CNT_GNVS_UPDATE 0xea +#define APM_CNT_FINALIZE 0xcb +#define APM_CNT_LEGACY 0xcc +#define APM_CNT_SMMSTORE 0xed +#define APM_CNT_ELOG_GSMI 0xef +#define APM_STS 0xb3 + +#endif /* _ASM_SMM_H */