PlatformSysmemConfig

Platform configuration options for sysmem.

This config exists in both board and platform configs, to allow board config to override static defaults, and to allow platform config to override board config.

FieldTypeDescriptionDefault
protected_memory_size MemorySize Overrides the board-driver-specified size for sysmem's default protected memory pool. The default value is 0 if not set by board or platform config.
format_costs Vec Optional ordered list of files, each of which contains a persistent fidl \['fuchsia.sysmem2.FormatCosts']. Normally json\[5] would be preferable for config, but we generate this config in rust using FIDL types (to avoid repetition and to take advantage of FIDL rust codegen), and there's no json schema for FIDL types. In board_config::PlatformConfig.sysmem_defaults, this field must be None (see BoardProvidedConfig.sysmem_format_costs instead). In platform_config::PlatformConfig.sysmem, this field can be Some. A later entry with equal FormatCostKey will override an earlier entry (both within a single file and across files). Entries in platform_config::PlatformConfig.sysmem field are logically after entries in BoardProvidedConfig.sysmem_format_costs field.
contiguous_memory_size MemorySize Overrides the board-driver-specified size for sysmem's contiguous memory pool. The default value is 5% if not set by board or platform config.
contiguous_guard_pages_unused \[bool] If true, sysmem will treat a fraction of currently-unused pages as guard pages and attempt to loan the rest back to zircon. If false, sysmem will attempt to loan all currently-unused pages back to zircon. Enabling this will enable periodic timers in sysmem which check unused pages for stray DMA writes. The default is false to avoid the periodic timers by default. When true, on detection of an improperly written page, sysmem will attempt to log debug info re. allocations that previously used the page.