Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36527 )
Change subject: timestamps: COLLECT_TIMESTAMPS is always optional
......................................................................
Patch Set 2:
Aaron, Julius; Anything in chromeos that breaks in case someone leaves timestamps out from CBMEM?
--
To view, visit https://review.coreboot.org/c/coreboot/+/36527
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I6ee4195d266440143344781d39db9578cd8bdcb3
Gerrit-Change-Number: 36527
Gerrit-PatchSet: 2
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: HAOUAS Elyes <ehaouas(a)noos.fr>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Fri, 01 Nov 2019 11:44:48 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33928 )
Change subject: cpu/x86/tsc: Replace TSC_CONSTANT_RATE with UNKNOWN_TSC_RATE
......................................................................
Patch Set 13:
Patrick R: Any ideas how to implement tsc_freq_mhz() for qemu-x86 ?
--
To view, visit https://review.coreboot.org/c/coreboot/+/33928
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I1690cb80295d6b006b75ed69edea28899b674b68
Gerrit-Change-Number: 33928
Gerrit-PatchSet: 13
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: David Guckian <david.guckian(a)intel.com>
Gerrit-Reviewer: HAOUAS Elyes <ehaouas(a)noos.fr>
Gerrit-Reviewer: Huang Jin <huang.jin(a)intel.com>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
Gerrit-Reviewer: Vanny E <vanessa.f.eusebio(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Comment-Date: Fri, 01 Nov 2019 11:40:47 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36297 )
Change subject: lib/uuid: Add UUID parsing function
......................................................................
lib/uuid: Add UUID parsing function
Implement a simple function that parses a canonical UUID string into the
common byte representation. Inspired by acpigen_write_uuid().
Change-Id: Ia1bd883c740873699814fde6c6ddc1937a40093e
Signed-off-by: Nico Huber <nico.huber(a)secunet.com>
---
M src/include/uuid.h
M src/lib/Makefile.inc
A src/lib/uuid.c
3 files changed, 53 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/97/36297/1
diff --git a/src/include/uuid.h b/src/include/uuid.h
index 0209055..b8827b0 100644
--- a/src/include/uuid.h
+++ b/src/include/uuid.h
@@ -18,6 +18,22 @@
#include <string.h>
+#define UUID_LEN 16
+#define UUID_STRLEN 36
+
+/*
+ * Parses a canonical UUID string into the common byte representation
+ * where the first three words are interpreted as little endian:
+ *
+ * The UUID
+ * "00112233-4455-6677-8899-aabbccddeeff"
+ * is stored as
+ * 33 22 11 00 55 44 77 66 88 99 aa bb cc dd ee ff
+ *
+ * Returns negative value on error, 0 on success.
+ */
+int parse_uuid(uint8_t *uuid, const char *uuid_str);
+
typedef struct {
uint8_t b[16];
} __packed guid_t;
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index e5678ff..da7b4bb 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -346,3 +346,5 @@
spd.bin-file := $(LIB_SPD_BIN)
spd.bin-type := spd
endif
+
+ramstage-y += uuid.c
diff --git a/src/lib/uuid.c b/src/lib/uuid.c
new file mode 100644
index 0000000..b5c00d7
--- /dev/null
+++ b/src/lib/uuid.c
@@ -0,0 +1,35 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * 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.
+ */
+
+#include <stdint.h>
+#include <lib.h>
+#include <uuid.h>
+
+int parse_uuid(uint8_t *const uuid, const char *const uuid_str)
+{
+ const uint8_t order[] = { 3, 2, 1, 0, 5, 4, 7, 6, 8, 9, 10, 11, 12, 13, 14, 15 };
+ uint8_t uuid_binstr[UUID_LEN];
+ unsigned int i;
+
+ if (strlen(uuid_str) != UUID_STRLEN)
+ return -1;
+ if (uuid_str[8] != '-' || uuid_str[13] != '-' ||
+ uuid_str[18] != '-' || uuid_str[23] != '-')
+ return -1;
+ if (hexstrtobin(uuid_str, uuid_binstr, UUID_LEN) != UUID_LEN)
+ return -1;
+ for (i = 0; i < UUID_LEN; ++i)
+ uuid[i] = uuid_binstr[order[i]];
+
+ return 0;
+}
--
To view, visit https://review.coreboot.org/c/coreboot/+/36297
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia1bd883c740873699814fde6c6ddc1937a40093e
Gerrit-Change-Number: 36297
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-MessageType: newchange