diff options
author | Duncan Laurie <dlaurie@chromium.org> | 2016-02-25 08:44:06 -0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2016-03-08 18:42:32 +0100 |
commit | 8951ed8b90532d3016a677b5a9a2fb6d9f97ff6a (patch) | |
tree | aca389c0640d2ea03edc7fb4c71a257aebbd16f8 /src/drivers/intel | |
parent | 339886cff4f227d930c23e16db48f3cfc8eaccfc (diff) | |
download | coreboot-8951ed8b90532d3016a677b5a9a2fb6d9f97ff6a.tar.xz |
intel/wifi: Add WRDD ACPI method
Add an ACPI file containing a generic WRDD method that is used
by Intel wireless kernel drivers to determine the country code
to be used for regulatory domain configuration of the wireless
radios.
This requires an NVS variable called 'CID1' to provide an
ISO-3166-2 alpha-2 country code or it will just return 0 instead.
This is implemented as a bare method because this needs to be
included directly into the wifi device that is defined by the
mainboard as it may have board-specific settings like _PRW that
need to be provided as well.
BUG=chrome-os-partner:50516
BRANCH=glados
TEST=boot on chell with 'region'='us' in VPD and see that it is
properly read out by calling WRDD method on the WiFi device.
Change-Id: I27a5e27f65d05ff62a0e79a87a32c1ef0c5d0ef3
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 2da0cf76ca3cc5e3dfbc4a0859733523de780cf5
Original-Change-Id: I9d83c3938cceafc77ef8747a5c47f586ee84437e
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/329294
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/13838
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/drivers/intel')
-rw-r--r-- | src/drivers/intel/wifi/acpi/wrdd.asl | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/drivers/intel/wifi/acpi/wrdd.asl b/src/drivers/intel/wifi/acpi/wrdd.asl new file mode 100644 index 0000000000..6f071ad976 --- /dev/null +++ b/src/drivers/intel/wifi/acpi/wrdd.asl @@ -0,0 +1,37 @@ +/* + * This file is part of the coreboot project. + * + * Copyright (C) 2016 Google Inc. + * Copyright (C) 2016 Intel Corporation + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +/* + * This method is used by the Intel wireless kernel drivers to determine + * the proper country code for regulatory domain configuration. + * + * It requires an NVS field called CID1 to be present that provides the + * ISO-3166-2 alpha-2 country code. + */ +Method (WRDD, 0, Serialized) +{ + Name (WRDX, Package () { + 0, /* Revision */ + Package () { + 0x00000007, /* Domain Type, 0x7:WiFi */ + 0x00000000, /* No Default Country Identifier */ + } + }) + + /* Replace Country Identifier with value from NVS */ + Store (\CID1, Index (DeRefOf (Index (WRDX, 1)), 1)) + Return (WRDX) +} |