summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChe-Liang Chiou <clchiou@chromium.org>2011-06-15 13:03:55 -0700
committerSimon Glass <sjg@chromium.org>2011-08-29 10:39:27 -0700
commit0592b076e57b59fe94c494d871ad53dae4d78d82 (patch)
treefd7c132a4087c109c6f76798ffc4140e4872d9e1 /include
parent6208616088e8863a2f098b184cae245f4c78efcb (diff)
CHROMIUM: [1/6] refactor for onestop; remove obsolete files
Compared to the old four firmware variants design, the onestop design is simpler, and as a result, many parts of the old codebase are overly complex or obsolete. This series of commits refactor the codebase and will give us a simpler and cleaner codebase, as our foundation of onestop firmware. Changes in this commits: * remove fmap.{h,c} - it was only for debugging purpose and very rarely useful; we should no longer maintain this feature * remove get_firmware_body.{h,c} - since in onestop design we never have to load a second-stage firmware * remove load_firmware_helper.{h,c} - same reason above BUG=chromium-os:16508 TEST=manual As all commits in series do not break build, you can run: make ARCH=arm \ CROSS_COMPILE=armv7a-cros-linux-gnueabi- \ USE_PRIVATE_LIBGCC=yes \ VBOOT=/build/tegra2_seaboard/usr \ chromeos_seaboard_onestop_config make ARCH=arm \ CROSS_COMPILE=armv7a-cros-linux-gnueabi- \ USE_PRIVATE_LIBGCC=yes \ VBOOT=/build/tegra2_seaboard/usr \ all Change-Id: I1fcec8a2056ac8fcc63e95e35e20e20071b3d93c Reviewed-on: http://gerrit.chromium.org/gerrit/2720 Tested-by: Che-Liang Chiou <clchiou@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/chromeos/fmap.h57
-rw-r--r--include/chromeos/get_firmware_body.h44
-rw-r--r--include/chromeos/load_firmware_helper.h55
3 files changed, 0 insertions, 156 deletions
diff --git a/include/chromeos/fmap.h b/include/chromeos/fmap.h
deleted file mode 100644
index 7917c5a6665..00000000000
--- a/include/chromeos/fmap.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2011 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.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- */
-
-#ifndef FLASHMAP_LIB_FMAP_H__
-#define FLASHMAP_LIB_FMAP_H__
-
-#define FMAP_SIGNATURE "__FMAP__"
-#define FMAP_VER_MAJOR 1 /* this header's FMAP minor version */
-#define FMAP_VER_MINOR 0 /* this header's FMAP minor version */
-#define FMAP_STRLEN 32 /* maximum length for strings, */
- /* including null-terminator */
-
-enum fmap_flags {
- FMAP_AREA_STATIC = 1 << 0,
- FMAP_AREA_COMPRESSED = 1 << 1,
-};
-
-/* Mapping of volatile and static regions in firmware binary */
-struct fmap {
- uint64_t signature; /* "__FMAP__" (0x5F5F50414D465F5F) */
- uint8_t ver_major; /* major version */
- uint8_t ver_minor; /* minor version */
- uint64_t base; /* address of the firmware binary */
- uint32_t size; /* size of firmware binary in bytes */
- uint8_t name[FMAP_STRLEN]; /* name of this firmware binary */
- uint16_t nareas; /* number of areas described by
- fmap_areas[] below */
- struct fmap_area {
- uint32_t offset; /* offset relative to base */
- uint32_t size; /* size in bytes */
- uint8_t name[FMAP_STRLEN]; /* descriptive name */
- uint16_t flags; /* flags for this area */
- } __attribute__((packed)) areas[];
-} __attribute__((packed));
-
-/*
- * fmap_find - find FMAP signature in a binary image
- *
- * @image: binary image
- * @len: length of binary image
- *
- * This function does no error checking. The caller is responsible for
- * verifying that the contents are sane.
- *
- * returns offset of FMAP signature to indicate success
- * returns <0 to indicate failure
- */
-extern off_t fmap_find(const uint8_t *image, size_t len);
-
-#endif /* FLASHMAP_LIB_FMAP_H__ */
diff --git a/include/chromeos/get_firmware_body.h b/include/chromeos/get_firmware_body.h
deleted file mode 100644
index ed069a0082f..00000000000
--- a/include/chromeos/get_firmware_body.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2011 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.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- */
-
-/* Implementation details of GetFirmwareBody */
-
-#ifndef CHROMEOS_GET_FIRMWARE_BODY_H_
-#define CHROMEOS_GET_FIRMWARE_BODY_H_
-
-#include <linux/types.h>
-#include <chromeos/firmware_storage.h>
-
-typedef struct {
- firmware_storage_t *file;
-
- /*
- * This field is offset of firmware data sections, from the beginning
- * of firmware storage device.
- */
- off_t firmware_data_offset[2];
-
- /*
- * These pointers will point to firmware data loaded by
- * GetFirmwareBody().
- */
- uint8_t *firmware_body[2];
-} get_firmware_body_internal_t;
-
-/* Initialize fields for talking to GetFirmwareBody(). */
-int get_firmware_body_internal_setup(get_firmware_body_internal_t *gfbi,
- firmware_storage_t *file,
- const off_t firmware_data_offset_0,
- const off_t firmware_data_offset_1);
-
-/* Dispose fields that are used for communicating with GetFirmwareBody(). */
-int get_firmware_body_internal_dispose(get_firmware_body_internal_t *gfbi);
-
-#endif /* CHROMEOS_GET_FIRMWARE_BODY_H_ */
diff --git a/include/chromeos/load_firmware_helper.h b/include/chromeos/load_firmware_helper.h
deleted file mode 100644
index 927057b0169..00000000000
--- a/include/chromeos/load_firmware_helper.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2011 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.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- */
-
-/* Helper functions for LoadFirmware */
-
-#ifndef CHROMEOS_LOAD_FIRMWARE_HELPER_H_
-#define CHROMEOS_LOAD_FIRMWARE_HELPER_H_
-
-#include <linux/types.h>
-#include <chromeos/firmware_storage.h>
-
-#include <vboot_nvstorage.h>
-
-#define FIRMWARE_A 0
-#define FIRMWARE_B 1
-#define FIRMWARE_RECOVERY 2
-
-/*
- * Helper function for loading GBB
- *
- * On success, it malloc an area for storing GBB, and returns 0.
- * On error, it returns non-zero value, and gbb_size_ptr and gbb_size_ptr are
- * untouched.
- */
-int load_gbb(firmware_storage_t *file,
- void **gbb_data_ptr, uint64_t *gbb_size_ptr);
-
-/*
- * Load and verify rewritable firmware. A wrapper of LoadFirmware() function.
- *
- * Returns what is returned by LoadFirmware().
- *
- * For documentation of return values of LoadFirmware() and <boot_flags>, please
- * refer to vboot_reference/firmware/include/load_firmware_fw.h
- *
- * The shared data blob for the firmware image is stored in
- * <shared_data_blob>. When pass NULL, use system default location.
- *
- * Pointer to loaded firmware is malloc()'ed and stored in <firmware_data_ptr>
- * when success. Otherwise, <firmware_data_ptr> is untouched.
- */
-int load_firmware_wrapper(firmware_storage_t *file,
- const uint64_t boot_flags,
- VbNvContext *nvcxt,
- void *shared_data_blob,
- uint8_t **firmware_data_ptr);
-
-#endif /* CHROMEOS_LOAD_FIRMWARE_HELPER_H_ */