public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Kubacki, Michael A" <michael.a.kubacki@intel.com>
To: devel@edk2.groups.io
Cc: Chasel Chiu <chasel.chiu@intel.com>,
	Nate DeSimone <nathaniel.l.desimone@intel.com>,
	Ankit Sinha <ankit.sinha@intel.com>,
	Jeremy Soller <jeremy@system76.com>
Subject: [edk2-platforms][PATCH V2 12/15] KabylakeOpenBoardPkg: Add board ID to Global NVS
Date: Tue, 24 Sep 2019 11:12:45 -0700	[thread overview]
Message-ID: <20190924181248.12816-13-michael.a.kubacki@intel.com> (raw)
In-Reply-To: <20190924181248.12816-1-michael.a.kubacki@intel.com>

REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2207

Adds the board ID as a field in global NVS (BDID) to allow ACPI code
to take conditional actions based on the active board.

Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Ankit Sinha <ankit.sinha@intel.com>
Cc: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Michael Kubacki <michael.a.kubacki@intel.com>
---
 Platform/Intel/KabylakeOpenBoardPkg/Include/Acpi/GlobalNvsAreaDef.h                                 | 3 ++-
 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeGalagoPro3AcpiTableLib.c     | 2 ++
 Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardAcpiLib/DxeKabylakeRvp3AcpiTableLib.c | 2 ++
 Platform/Intel/KabylakeOpenBoardPkg/Include/Acpi/GlobalNvs.asl                                      | 3 ++-
 4 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Include/Acpi/GlobalNvsAreaDef.h b/Platform/Intel/KabylakeOpenBoardPkg/Include/Acpi/GlobalNvsAreaDef.h
index 93c5a0b55a..3d0a3f4ed8 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/Include/Acpi/GlobalNvsAreaDef.h
+++ b/Platform/Intel/KabylakeOpenBoardPkg/Include/Acpi/GlobalNvsAreaDef.h
@@ -1,7 +1,7 @@
 /** @file
   ACPI DSDT table
 
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -111,6 +111,7 @@ typedef struct {
   UINT8    TbtNativeOsHotPlug;                      ///< Offset 81      TbtNativeOsHotPlug
   UINT8    TbtSelector;                             ///< Offset 82      Thunderbolt(TM) Root port selector
   UINT8    TbtSelector1;                            ///< Offset 83      Thunderbolt(TM) Root port selector
+  UINT8    BoardId;                                 ///< Offset 84      Board ID
 } EFI_GLOBAL_NVS_AREA;
 
 #pragma pack(pop)
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeGalagoPro3AcpiTableLib.c b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeGalagoPro3AcpiTableLib.c
index b9386d59b8..5b36f6dfb3 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeGalagoPro3AcpiTableLib.c
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeGalagoPro3AcpiTableLib.c
@@ -56,6 +56,8 @@ GalagoPro3UpdateGlobalNvs (
 
   mGlobalNvsArea.Area->Ps2MouseEnable     = PcdGet8 (PcdPs2KbMsEnable);
   mGlobalNvsArea.Area->Ps2KbMsEnable      = PcdGet8 (PcdPs2KbMsEnable);
+
+  mGlobalNvsArea.Area->BoardId = (UINT8) LibPcdGetSku ();
 }
 
 EFI_STATUS
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardAcpiLib/DxeKabylakeRvp3AcpiTableLib.c b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardAcpiLib/DxeKabylakeRvp3AcpiTableLib.c
index 154d859090..eceac3d037 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardAcpiLib/DxeKabylakeRvp3AcpiTableLib.c
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardAcpiLib/DxeKabylakeRvp3AcpiTableLib.c
@@ -56,6 +56,8 @@ KabylakeRvp3UpdateGlobalNvs (
 
   mGlobalNvsArea.Area->Ps2MouseEnable     = FALSE;
   mGlobalNvsArea.Area->Ps2KbMsEnable      = PcdGet8 (PcdPs2KbMsEnable);
+
+  mGlobalNvsArea.Area->BoardId = (UINT8) LibPcdGetSku ();
 }
 
 EFI_STATUS
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/Include/Acpi/GlobalNvs.asl b/Platform/Intel/KabylakeOpenBoardPkg/Include/Acpi/GlobalNvs.asl
index e0ff9d9bf5..92b4bc1e53 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/Include/Acpi/GlobalNvs.asl
+++ b/Platform/Intel/KabylakeOpenBoardPkg/Include/Acpi/GlobalNvs.asl
@@ -1,7 +1,7 @@
 /** @file
   ACPI DSDT table
 
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.<BR>
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -111,4 +111,5 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
   Offset(81),     TNAT, 8,  // Offset(81),    TbtNativeOsHotPlug
   Offset(82),     TBSE, 8,  // Offset(82),    Thunderbolt(TM) Root port selector
   Offset(83),     TBS1, 8,  // Offset(83),    Thunderbolt(TM) Root port selector
+  Offset(84),     BDID, 8,  // Offset(84),    Board ID
   }
-- 
2.16.2.windows.1


  parent reply	other threads:[~2019-09-24 18:13 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24 18:12 [edk2-platforms][PATCH V2 00/15] Move ClevoOpenBoardPkg/N1xxWU Contents to KabylakeOpenBoardPkg Kubacki, Michael A
2019-09-24 18:12 ` [edk2-platforms][PATCH V2 01/15] Platform/Intel: Remove N1xxWU board build option Kubacki, Michael A
2019-09-25  9:49   ` [edk2-devel] " Chiu, Chasel
2019-09-24 18:12 ` [edk2-platforms][PATCH V2 02/15] ClevoOpenBoardPkg: Remove package contents Kubacki, Michael A
2019-09-25  9:48   ` [edk2-devel] " Chiu, Chasel
2019-09-24 18:12 ` [edk2-platforms][PATCH V2 03/15] ClevoOpenBoardPkg: Remove global files and references Kubacki, Michael A
2019-09-25  9:49   ` [edk2-devel] " Chiu, Chasel
2019-09-24 18:12 ` [edk2-platforms][PATCH V2 04/15] KabylakeOpenBoardPkg: Move policy update libs to KabylakeRvp3 board Kubacki, Michael A
2019-09-25  9:50   ` Chiu, Chasel
2019-09-24 18:12 ` [edk2-platforms][PATCH V2 05/15] KabylakeOpenBoardPkg: Move EcCommands.h " Kubacki, Michael A
2019-09-25  9:51   ` Chiu, Chasel
2019-09-24 18:12 ` [edk2-platforms][PATCH V2 06/15] KabylakeOpenBoardPkg: Move flash map to board Kubacki, Michael A
2019-09-25  9:52   ` Chiu, Chasel
2019-09-24 18:12 ` [edk2-platforms][PATCH V2 07/15] KabylakeOpenBoardPkg: Add PeiSerialPortLibSpiFlash Kubacki, Michael A
2019-09-25  9:53   ` Chiu, Chasel
2019-09-24 18:12 ` [edk2-platforms][PATCH V2 08/15] KabylakeOpenBoardPkg/GalagoPro3: Add headers Kubacki, Michael A
2019-09-25  9:53   ` Chiu, Chasel
2019-09-24 18:12 ` [edk2-platforms][PATCH V2 09/15] KabylakeOpenBoardPkg/GalagoPro3: Add library instances Kubacki, Michael A
2019-09-25  9:54   ` Chiu, Chasel
2019-09-24 18:12 ` [edk2-platforms][PATCH V2 10/15] KabylakeOpenBoardPkg/GalagoPro3: Add modules Kubacki, Michael A
2019-09-25  9:54   ` Chiu, Chasel
2019-09-24 18:12 ` [edk2-platforms][PATCH V2 11/15] KabylakeOpenBoardPkg: Consolidate board IDs in a single file Kubacki, Michael A
2019-09-25  9:58   ` Chiu, Chasel
2019-09-24 18:12 ` Kubacki, Michael A [this message]
2019-09-25  9:59   ` [edk2-platforms][PATCH V2 12/15] KabylakeOpenBoardPkg: Add board ID to Global NVS Chiu, Chasel
2019-09-24 18:12 ` [edk2-platforms][PATCH V2 13/15] KabylakeOpenBoardPkg/BoardAcpiDxe: Add Synaptics PS/2 mouse Kubacki, Michael A
2019-09-25 10:01   ` Chiu, Chasel
2019-09-25 22:36   ` Nate DeSimone
2019-09-24 18:12 ` [edk2-platforms][PATCH V2 14/15] KabylakeOpenBoardPkg/GalagoPro3: Add build files Kubacki, Michael A
2019-09-25 10:04   ` Chiu, Chasel
2019-09-25 22:38   ` Nate DeSimone
2019-09-24 18:12 ` [edk2-platforms][PATCH V2 15/15] Add GalagoPro3 board details to global build and documentation Kubacki, Michael A
2019-09-25 10:05   ` Chiu, Chasel
2019-09-25 22:39   ` Nate DeSimone
2019-09-24 23:54 ` [edk2-devel] [edk2-platforms][PATCH V2 00/15] Move ClevoOpenBoardPkg/N1xxWU Contents to KabylakeOpenBoardPkg Sinha, Ankit
2019-09-25 21:01 ` Nate DeSimone

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190924181248.12816-13-michael.a.kubacki@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox