OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 // |
| 5 // Defines the ActiveMainFirmware class which extracts the firmware volume used |
| 6 // for boot. |
| 7 #ifndef CROS_BOOT_MODE_ACTIVE_MAIN_FIRMWARE_H_ |
| 8 #define CROS_BOOT_MODE_ACTIVE_MAIN_FIRMWARE_H_ |
| 9 |
| 10 #include <sys/types.h> |
| 11 |
| 12 #include "platform_reader.h" |
| 13 |
| 14 namespace cros_boot_mode { |
| 15 |
| 16 class ActiveMainFirmware : public PlatformReader { |
| 17 public: |
| 18 ActiveMainFirmware(); |
| 19 virtual ~ActiveMainFirmware(); |
| 20 |
| 21 enum { |
| 22 kRecovery = 0, |
| 23 kReadWriteA, |
| 24 kReadWriteB, |
| 25 }; |
| 26 static const char *kActiveMainFirmwareText[]; |
| 27 static const size_t kActiveMainFirmwareCount; |
| 28 |
| 29 virtual const char *c_str() const; |
| 30 virtual int Process(const char *contents, size_t length); |
| 31 virtual const char *default_platform_file_path() const { |
| 32 return "/sys/devices/platform/chromeos_acpi/BINF.1"; |
| 33 } |
| 34 virtual const char *name() const { |
| 35 return "active_main_firmware"; |
| 36 } |
| 37 virtual size_t max_size() const { |
| 38 return sizeof("-1"); |
| 39 } |
| 40 }; |
| 41 |
| 42 } // namespace cros_boot_mode |
| 43 #endif // CROS_BOOT_MODE_ACTIVE_MAIN_FIRMWARE_H_ |
OLD | NEW |