Class

FwupdPluginCfiDevice

Description [src]

class FwupdPlugin.CfiDevice : FwupdPlugin.Device {
  parent_instance: FuDevice
}

A chip conforming to the Common Flash Memory Interface, typically a SPI flash chip.

Where required, the quirks instance IDs will be added in ->setup().

The defaults are set as follows, and can be overridden in quirk files:

  • PageSize: 0x100
  • SectorSize: 0x1000
  • BlockSize: 0x10000

See also: FuDevice

Ancestors

Constructors

fu_cfi_device_new

Creates a new FuCfiDevice.

Available since: 1.7.1

Instance methods

fu_cfi_device_chip_select

Sets the chip select value.

Available since: 1.8.0

fu_cfi_device_chip_select_locker_new

Creates a custom device locker that asserts and deasserts the chip select signal.

Available since: 1.8.0

fu_cfi_device_get_block_size

Gets the chip block size. This is typically the largest erasable block size.

Available since: 1.7.4

fu_cfi_device_get_cmd

Gets the self vendor code.

Available since: 1.7.1

fu_cfi_device_get_flash_id

Gets the chip ID used to identify the device.

Available since: 1.7.1

fu_cfi_device_get_page_size

Gets the chip page size. This is typically the largest writable block size.

Available since: 1.7.3

fu_cfi_device_get_sector_size

Gets the chip sector size. This is typically the smallest erasable page size.

Available since: 1.7.3

fu_cfi_device_get_size

Gets the chip maximum size.

Available since: 1.7.1

fu_cfi_device_send_command

Sends an unspecified command stream to the CFI device.

Available since: 1.9.1

fu_cfi_device_set_block_size

Sets the chip block size. This is typically the largest erasable chunk size.

Available since: 1.7.4

fu_cfi_device_set_flash_id

Sets the chip ID used to identify the device.

Available since: 1.7.1

fu_cfi_device_set_page_size

Sets the chip page size. This is typically the largest writable block size.

Available since: 1.7.3

fu_cfi_device_set_sector_size

Sets the chip sector size. This is typically the smallest erasable page size.

Available since: 1.7.3

fu_cfi_device_set_size

Sets the chip maximum size.

Available since: 1.7.1

Methods inherited from FuDevice (161)
fu_device_activate

Activates up a device, which normally means the device switches to a new firmware version. This should only be called when data loss cannot occur.

Available since: 1.2.6

fu_device_add_child

Sets any child device. An child device is logically linked to the primary device in some way.

Available since: 1.0.8

fu_device_add_counterpart_guid

Adds a GUID to the device. If the guid argument is not a valid GUID then it is converted to a GUID using fwupd_guid_hash_string().

Available since: 1.1.2

fu_device_add_flag

Adds a device flag to the device.

Available since: 0.1.0

fu_device_add_guid

Adds a GUID to the device. If the guid argument is not a valid GUID then it is converted to a GUID using fwupd_guid_hash_string().

Available since: 0.7.2

fu_device_add_guid_full

Adds a GUID to the device. If the guid argument is not a valid GUID then it is converted to a GUID using fwupd_guid_hash_string().

Available since: 1.6.2

fu_device_add_instance_id

Adds an instance ID to the device. If the instance_id argument is already a valid GUID then fu_device_add_guid() should be used instead.

Available since: 1.2.5

fu_device_add_instance_id_full

Adds an instance ID with all parameters set.

Available since: 1.2.9

fu_device_add_instance_str

Assign a value for the key.

Available since: 1.7.7

fu_device_add_instance_strsafe

Assign a sanitized value for the key.

Available since: 1.7.7

fu_device_add_instance_strup

Assign a uppercase value for the key.

Available since: 1.7.7

fu_device_add_instance_u16

Assign a value to the key, which is padded as 4X.

Available since: 1.7.7

fu_device_add_instance_u32

Assign a value to the key, which is padded as 8X.

Available since: 1.7.7

fu_device_add_instance_u4

Assign a value to the key, which is padded as 1X.

Available since: 1.7.7

fu_device_add_instance_u8

Assign a value to the key, which is padded as 2X.

Available since: 1.7.7

fu_device_add_internal_flag

Adds a private flag that stays internal to the engine and is not leaked to the client.

Available since: 1.5.5

fu_device_add_parent_backend_id

Sets any parent device using the physical ID. An parent device is logically linked to the primary device in some way and can be added before or after self.

Available since: 1.9.7

fu_device_add_parent_guid

Sets any parent device using a GUID. An parent device is logically linked to the primary device in some way and can be added before or after self.

Available since: 1.0.8

fu_device_add_parent_physical_id

Sets any parent device using the physical ID. An parent device is logically linked to the primary device in some way and can be added before or after self.

Available since: 1.6.2

fu_device_add_possible_plugin

Adds a plugin name to the list of plugins that might be able to handle this device. This is typically called from a quirk handler.

Available since: 1.5.1

fu_device_add_private_flag

Adds a private flag that can be used by the plugin for any purpose.

Available since: 1.6.2

fu_device_add_problem

Prevent the device from being updated, changing it from FWUPD_DEVICE_FLAG_UPDATABLE to FWUPD_DEVICE_FLAG_UPDATABLE_HIDDEN if not already inhibited.

Available since: 1.8.1

fu_device_add_security_attrs

Adds HSI security attributes.

Available since: 1.6.0

Properties

FwupdPlugin.CfiDevice:flash-id

The CCI JEDEC flash ID.

Available since: 1.7.1

Properties inherited from FuDevice (8)
FwupdPlugin.Device:backend-id

The device backend ID.

Available since: 1.5.8

FwupdPlugin.Device:context

The FuContext to use.

Available since: 1.6.0

FwupdPlugin.Device:internal-flags

The device internal flags.

Available since: 1.9.1

FwupdPlugin.Device:logical-id

The device logical ID.

Available since: 1.1.2

FwupdPlugin.Device:parent

The device parent.

Available since: 1.0.8

FwupdPlugin.Device:physical-id

The device physical ID.

Available since: 1.1.2

FwupdPlugin.Device:private-flags

The device private flags.

Available since: 1.9.1

FwupdPlugin.Device:proxy

The device proxy to use.

Available since: 1.4.1

Class structure

struct FwupdPluginCfiDeviceClass {
  FuDeviceClass parent_class;
  gboolean (* chip_select) (
    FuCfiDevice* self,
    gboolean value,
    GError** error
  );
  gboolean (* send_command) (
    FuCfiDevice* self,
    const guint8* wbuf,
    gsize wbufsz,
    guint8* rbuf,
    gsize rbufsz,
    FuProgress* progress,
    GError** error
  );
  
}
Class members
parent_class
FuDeviceClass
  No description available.
chip_select
gboolean (* chip_select) (
    FuCfiDevice* self,
    gboolean value,
    GError** error
  )
  No description available.
send_command
gboolean (* send_command) (
    FuCfiDevice* self,
    const guint8* wbuf,
    gsize wbufsz,
    guint8* rbuf,
    gsize rbufsz,
    FuProgress* progress,
    GError** error
  )
  No description available.

Virtual methods

FwupdPlugin.CfiDeviceClass.chip_select

Sets the chip select value.

Available since: 1.8.0

FwupdPlugin.CfiDeviceClass.send_command

Sends an unspecified command stream to the CFI device.

Available since: 1.9.1