# SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2026 Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
#
# Database backend

# Keep options sorted, per group

option('disable-all', type : 'boolean', value: false,
        description: 'disable all features. Useful to check broken deps')

option('enable-arch', type : 'combo', choices : ['auto', 'all', 'x86', 'arm', 'riscv'],
       value : 'all',
       description : 'select the architecture-specific event family (or all for testing)')

#
# Main options
#

option('sqlite3-database', type: 'string',
       value: '/var/lib/rasdaemon/ras-mc_event.db',
       description: 'SQLite3 database path (default: /var/lib/rasdaemon/ras-mc_event.db)',
)

#
# Main features
#

option('abrt-report', type : 'feature',
        description: 'enable report event to ABRT')
option('aer', type : 'feature',
        description: 'enable PCIe AER events')
option('ampere-oem-sel', type : 'feature',
        description: 'enable Ampere OEM timestamped SEL (0xc0) reports')
option('cpu-fault-isolation', type : 'feature',
        description: 'enable cpu online fault isolation')
option('cxl', type : 'feature',
        description: 'enable CXL events')
option('debug-sql', type : 'feature', value : 'disabled',
        description: 'enable SQL statement debug logging')
option('devlink', type : 'feature',
        description: 'enable devlink health events')
option('diskerror', type : 'feature',
        description: 'enable disk I/O error events')
option('erst', type : 'feature',
        description: 'enable erst')
option('extlog', type : 'feature',
        description: 'enable EXTLOG events')
option('bmc-generic', type : 'feature', value : 'disabled',
        description: 'enable generic BMC PCIe AER SEL reports (see https://mchehab.github.io/rasdaemon/configuration.html)')
option('memory-failure', type : 'feature',
        description: 'enable memory failure events')
option('memory-ce-pfa', type : 'feature',
        description: 'enable memory Corrected Error predictive failure analysis')
option('memory-row-ce-pfa', type : 'feature',
        description: 'enable memory row Corrected Error predictive failure analysis')
option('openbmc-unified-sel', type : 'feature',
        description: 'enable Facebook Unified SEL (0xfb) BMC reports')
option('pcie-edpc', type : 'feature',
        description: 'enable PCIe eDPC fatal-error configuration action')
option('signal', type : 'feature',
        description: 'enable signal event(currently experimental)')

#
# Database backends
#
option('mysql', type : 'feature',
        description: 'enable storing data at MySQL/MariaDB database')

option('postgresql', type : 'feature',
        description: 'enable storing data at PostgreSQL database')

option('sqlite3', type : 'feature',
        description: 'enable storing data at SQL lite database')

#
# Architecture-specific options
#
option('arm', type : 'feature',
        description: 'enable ARM events')
option('mce', type : 'feature',
        description: 'enable MCE events')
option('reri', type : 'feature',
        description: 'enable RISC-V RERI events (RISC-V RAS Error Report Register Interface)')

#
# Non-standard CPER options
#
option('amp-ns-decode', type : 'feature',
        description: 'enable AMP_NS_DECODE events')
option('hisi-ns-decode', type : 'feature',
        description: 'enable HISI_NS_DECODE events')
option('jaguar-ns-decode', type : 'feature',
        description: 'enable JAGUAR_NS_DECODE events')
option('yitian-ns-decode', type : 'feature',
        description: 'enable YITIAN_NS_DECODE events')
option('nvidia-ns-decode', type : 'feature',
        description: 'enable NVIDIA_NS_DECODE events')
