Skip to content

Add AmpereOne error decoding - #202

Open
danielf-ampere wants to merge 4 commits into
mchehab:masterfrom
danielf-ampere:dferguson/0.8.3/ampereone-support
Open

Add AmpereOne error decoding#202
danielf-ampere wants to merge 4 commits into
mchehab:masterfrom
danielf-ampere:dferguson/0.8.3/ampereone-support

Conversation

@danielf-ampere

Copy link
Copy Markdown

Decode AmpereOne vendor specific RAS errors.

  • Add support for AmpereOne family of processors. (i.e. - ac03, ac04, and ac04_1)
  • Does not contain support SQLite
  • To compile RASDaemon with AmpereOne support, include the following flags:
    --enable-arm --enable-non-standard --enable-amp-ns-decode

@danielf-ampere

Copy link
Copy Markdown
Author

Hi Mauro, I'm pretty new to contributing to open source projects.
Feel free to provide any and all feedback, and you can be tough on me.

Also, this change to RASDaemon benefits from this kernel changeset:
https://lore.kernel.org/all/cover.1725429659.git.mchehab+huawei@kernel.org/
Is there anything I can do to help move kernel changeset forward ?

Regards,
~Daniel Ferguson

@mchehab

mchehab commented Nov 14, 2025

Copy link
Copy Markdown
Owner

Hi Daniel,

Please add sqlite support to it. Btw, on my long term todo plan, I'd like to change the logic to be more generic with regards to SQL, allowing it to use other databases on remote machines.

@danielf-ampere

Copy link
Copy Markdown
Author

Hi Mauro,

Ok, I can add SQLite support.

We have an internal patch set that adds support for MySQL, which is why I didn't add SQLite support.
So, it is a good idea to make a more generic SQL interface. I'll keep that in mind.

* Add support for AmpereOne family of processors.
  (i.e. - ac03, ac04, and ac04_1)
* Does not contain support SQLite (enabled in a subsequent
  patch).
* To compile RASDaemon with AmpereOne support, include the
  following flags:
  --enable-arm --enable-non-standard --enable-amp-ns-decode

Signed-off-by: Daniel Ferguson <danielf@os.amperecomputing.com>
Add linker flag, and include uuid/uuid.h

Signed-off-by: Daniel Ferguson <danielf@os.amperecomputing.com>
The ras_arm_event_handler function needs to use find_ns_ev_decoder to
find the correct handler vendor specific sections inside of the standard
ARM processor error.

Signed-off-by: Daniel Ferguson <danielf@os.amperecomputing.com>
This adds SQLite support for AmpereOne error decoding.

Signed-off-by: Daniel Ferguson <danielf@os.amperecomputing.com>
@danielf-ampere
danielf-ampere force-pushed the dferguson/0.8.3/ampereone-support branch from 842addb to 31eabf3 Compare January 27, 2026 21:54
@danielf-ampere

Copy link
Copy Markdown
Author

Hi Mauro,

I've updated the patches to include support for SQLite3, as requested.

Regards,
~Daniel

@mchehab

mchehab commented Aug 6, 2026

Copy link
Copy Markdown
Owner

I've updated the patches to include support for SQLite3, as requested.

I'm not seeing it at the latest version.

We have an internal patch set that adds support for MySQL, which is why I didn't add SQLite support.
So, it is a good idea to make a more generic SQL interface. I'll keep that in mind.

Ideally, the best would be to replace HAVE_SQLITE3 to HAVE_SQL (or to just remove it) on all places and, instead of calling sqlite3_*, call a wrapper that would then use either SQLite3 or MySQL (or PostgreSQL), depending on what SQL backend was chosen.

@mchehab

mchehab commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Hi Mauro,

I've updated the patches to include support for SQLite3, as requested.

Btw, I'm working right now on #258 to make SQLite3 support more generic, aiming to add support for both MySQL/MariaDB and PostgreSQL. changeset is still a work in progress, so better to wait for it to be done and merged before rebasing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants