Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Unified Diff: active_main_firmware.h

Issue 3530001: first cut: establishes base helper classes and main (Closed) Base URL: http://git.chromium.org/git/cros_boot_mode.git
Patch Set: truncation is bad, m'kay. . . Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « README ('k') | active_main_firmware.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: active_main_firmware.h
diff --git a/active_main_firmware.h b/active_main_firmware.h
new file mode 100644
index 0000000000000000000000000000000000000000..a028c40c488d250402cfb5a76c74f05fa66b707c
--- /dev/null
+++ b/active_main_firmware.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2010 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.
+//
+// Defines the ActiveMainFirmware class which extracts the firmware volume used
+// for boot.
+#ifndef CROS_BOOT_MODE_ACTIVE_MAIN_FIRMWARE_H_
+#define CROS_BOOT_MODE_ACTIVE_MAIN_FIRMWARE_H_
+
+#include <sys/types.h>
+
+#include "platform_reader.h"
+
+namespace cros_boot_mode {
+
+class ActiveMainFirmware : public PlatformReader {
+ public:
+ ActiveMainFirmware();
+ virtual ~ActiveMainFirmware();
+
+ enum {
+ kRecovery = 0,
+ kReadWriteA,
+ kReadWriteB,
+ };
+ static const char *kActiveMainFirmwareText[];
+ static const size_t kActiveMainFirmwareCount;
+
+ virtual const char *c_str() const;
+ virtual int Process(const char *contents, size_t length);
+ virtual const char *default_platform_file_path() const {
+ return "/sys/devices/platform/chromeos_acpi/BINF.1";
+ }
+ virtual const char *name() const {
+ return "active_main_firmware";
+ }
+ virtual size_t max_size() const {
+ return sizeof("-1");
+ }
+};
+
+} // namespace cros_boot_mode
+#endif // CROS_BOOT_MODE_ACTIVE_MAIN_FIRMWARE_H_
« no previous file with comments | « README ('k') | active_main_firmware.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698