diff options
Diffstat (limited to 'firmware/lib/vboot_common.c')
-rw-r--r-- | firmware/lib/vboot_common.c | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/firmware/lib/vboot_common.c b/firmware/lib/vboot_common.c index 50a4cff8..3e3375f1 100644 --- a/firmware/lib/vboot_common.c +++ b/firmware/lib/vboot_common.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved. +/* Copyright (c) 2013 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. * @@ -430,38 +430,6 @@ int VerifyKernelPreamble(const VbKernelPreambleHeader *preamble, return VBOOT_SUCCESS; } -int VbSharedDataInit(VbSharedDataHeader *header, uint64_t size) -{ - VBDEBUG(("VbSharedDataInit, %d bytes, header %d bytes\n", (int)size, - sizeof(VbSharedDataHeader))); - - if (size < sizeof(VbSharedDataHeader)) { - VBDEBUG(("Not enough data for header.\n")); - return VBOOT_SHARED_DATA_INVALID; - } - if (size < VB_SHARED_DATA_MIN_SIZE) { - VBDEBUG(("Shared data buffer too small.\n")); - return VBOOT_SHARED_DATA_INVALID; - } - - if (!header) - return VBOOT_SHARED_DATA_INVALID; - - /* Zero the header */ - Memset(header, 0, sizeof(VbSharedDataHeader)); - - /* Initialize fields */ - header->magic = VB_SHARED_DATA_MAGIC; - header->struct_version = VB_SHARED_DATA_VERSION; - header->struct_size = sizeof(VbSharedDataHeader); - header->data_size = size; - header->data_used = sizeof(VbSharedDataHeader); - header->firmware_index = 0xFF; - - /* Success */ - return VBOOT_SUCCESS; -} - uint64_t VbSharedDataReserve(VbSharedDataHeader *header, uint64_t size) { uint64_t offs = header->data_used; |