diff options
author | Patrick Rudolph <patrick.rudolph@9elements.com> | 2018-03-08 15:43:12 +0100 |
---|---|---|
committer | Philipp Deppenwiese <zaolin.daisuki@gmail.com> | 2018-09-09 17:51:37 +0000 |
commit | 28cee59ca294422056d983fc06d5d8d5800a4390 (patch) | |
tree | 2dab3f2423f474a9075dc9c9d56ad997d6c4ed77 /src/vendorcode/google/chromeos/cros_vpd.h | |
parent | c4b0fd0a86db280ad1a8d8572218dc42fd5bb7e4 (diff) |
drivers/vpd: Add VPD support
VPD reference: https://chromium.googlesource.com/chromiumos/platform/vpd/+/master/README.md
Copy ChromeOS VPD driver to add support for VPD without CROMEOS.
Possible use case:
* Storing calibration data
* Storing MAC address
* Storing serial
* Storing boot options
+ Now it's possible to define the VPD space by choosing
one of the following enums: VPD_ANY, VPD_RW, VPD_RO.
+ CHROMEOS selects now VPD as part of it.
+ VPD is implemented as driver.
Change-Id: Id9263bd39bf25d024e93daa57053fefcb1adc53a
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/25046
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/vendorcode/google/chromeos/cros_vpd.h')
-rw-r--r-- | src/vendorcode/google/chromeos/cros_vpd.h | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/src/vendorcode/google/chromeos/cros_vpd.h b/src/vendorcode/google/chromeos/cros_vpd.h deleted file mode 100644 index 1fa56a4725..0000000000 --- a/src/vendorcode/google/chromeos/cros_vpd.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2014 The Chromium OS Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef __CROS_VPD_H__ -#define __CROS_VPD_H__ - -#define CROS_VPD_REGION_NAME "region" -#define CROS_VPD_WIFI_SAR_NAME "wifi_sar" - -/* - * Reads VPD string value by key. - * - * Reads in at most one less than size characters from VPD and stores them - * into buffer. A terminating null byte ('\0') is stored after the last - * character in the buffer. - * - * Returns NULL if key is not found, otherwise buffer. - */ -char *cros_vpd_gets(const char *key, char *buffer, int size); - -/* - * Find VPD value by key. - * - * Searches for a VPD entry in the VPD cache. If found, places the size of the - * entry into '*size' and returns the pointer to the entry data. - * - * This function presumes that VPD is cached in DRAM (which is the case in the - * current implementation) and as such returns the pointer into the cache. The - * user is not supposed to modify the data, and does not have to free the - * memory. - * - * Returns NULL if key is not found. - */ - -const void *cros_vpd_find(const char *key, int *size); - -#endif /* __CROS_VPD_H__ */ |