diff options
author | Mary Ruthven <mruthven@chromium.org> | 2023-03-22 14:58:09 -0500 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-04-20 18:39:47 +0000 |
commit | 675565aba167262ad80f2a096b37cc1846f74cbd (patch) | |
tree | 529f5b106c388e55b8a57a67b3e05cfc0f820be6 /chip/g/factory_config.h | |
parent | 478a2266dfcf892087bb3066650d00e5cba3c60b (diff) | |
download | chrome-ec-675565aba167262ad80f2a096b37cc1846f74cbd.tar.gz |
cr50: add a factory config space
Add a 64 bit write once factory config space to info1. If the factory
has something they want to configure, they can use part of the space to
store that configration.
Right now nothing in cr50 uses the factory config space. If we need to
modify cr50 behavior based on the space value, we can add functionality
later. The factory just needs to set the bit in the factory config.
BUG=b:214065944
TEST=manual
Clear the Board ID
set the config to 0. Verify it does nothing
gsctool -a --factory_config 0
gsctool -a --factory_config
0
Set the flags
gsctool -ai 0xffffffff:0x10
Set the config to something
gsctool -a --factory_config 0x12345678cafecafe
gsctool -a --factory_config
12345678CAFECAFE
# Set it to the same thing. Verify cr50 returns EC_SUCCESS.
gsctool -a --factory_config 0x12345678cafecafe
gsctool -a --factory_config
12345678CAFECAFE
[40.114944 write_factory_config: ok.]
Try to set it to something else. Verify it's rejected because
the space is set.
gsctool -a --factory_config 0xcafe
[43.331302 write_factory_config: factory cfg already programmed]
gsctool -a --factory_config
12345678CAFECAFE
Set the Board ID Type
gsctool -ai ZZCR:0x10
Try to set the config again. Verify it's rejected because the
board id type is set.
gsctool -a --factory_config 0x12345678cafecafe
Factory config failed. (7)
gsctool -a --factory_config
12345678CAFECAFE
Change-Id: Ie816ebffcf6c24ad94bbcd2dc2f0c3936caafb11
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4424873
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
(cherry picked from commit 37fa38296266e62adfe10226b7b1a22ac9335537)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4437053
Reviewed-by: Andrey Pronin <apronin@chromium.org>
Commit-Queue: Andrey Pronin <apronin@chromium.org>
(cherry picked from commit 3ef6f0f9e3f7ecb9e2b1421aebb3671548a43ebe)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4454630
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Diffstat (limited to 'chip/g/factory_config.h')
-rw-r--r-- | chip/g/factory_config.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/chip/g/factory_config.h b/chip/g/factory_config.h new file mode 100644 index 0000000000..26345c1eb9 --- /dev/null +++ b/chip/g/factory_config.h @@ -0,0 +1,16 @@ +/* + * Copyright 2023 The ChromiumOS Authors + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +#ifndef __EC_CHIP_G_FACTORY_CONFIG_H +#define __EC_CHIP_G_FACTORY_CONFIG_H + +#include "board_space.h" +/** + * Print the factory config value. + */ +void print_factory_config(void); + +#endif /* ! __EC_CHIP_G_FACTORY_CONFIG_H */ |