Get the flash geometry


#include <sys/dcmd_f3s.h>

#define DCMD_F3S_GEOINFO    __DIOTF(_DCMD_F3S, F3S_GEOINFO, f3s_geoinfo_t)

Arguments to devctl():

Argument Value
filedes A file descriptor that you obtained by opening the device.
dev_data_ptr A pointer to a f3s_geoinfo_t structure (see below)
n_bytes sizeof(f3s_geoinfo_t)
dev_info_ptr NULL


This command gets the flash geometry.

Note: This command returns a maximum of 16 geometries. In the future when flash parts have more than 16, there will be an extended form of this command.


A f3s_geoinfo_t structure:

struct geo_list
  uint16_t unit_num;       /* Number of sectors in run */
  uint16_t unit_pow2;      /* Sector size for this run */

typedef struct f3s_geoinfo_s
  uint32_t status;
  _Paddr64t base;            /* Phys base address */
  uint32_t size;             /* Size of flash */
  uint16_t chipwidth;        /* Width of a single chip, in bytes */
  uint16_t interleave;       /* Number of chips in parallel on data bus */
  uint16_t num_geo;          /* Number of entries in the geo array */
  struct geo_list geo[16];   /* Maximum of 16 distinct geos */


A filled-in f3s_geoinfo_t structure.

See also:

devctl() in the QNX Neutrino C Library Reference