| Re: [chrony-dev] [RFC] Support for raw memory mapped clock sources |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-dev] [RFC] Support for raw memory mapped clock sources
- From: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Date: Tue, 21 Oct 2025 15:58:33 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1761055107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6meD3RVy23pfhCe3g878ku8CJbqtBcBdTN6cSagqNZQ=; b=NSvhpW/elJK7gEg3510a8VgckuZ3q7WVTF5wNk1JzmFLSCb63lyjaJuEV6jRfV8rABlpn0 DLVunOEozdARy4+SJtq/Ks6VnJ2A/uqAPkI4tYlFT6xN5k6USLIeY7agIj+p3E96ipAaOu GnxQBGoMzYp7qT/LM/gMkY51NGDgEQ4=
On Tue, Oct 21, 2025 at 03:39:58PM +0200, Enguerrand de Ribaucourt wrote:
> The FPGA will be able to communicate the timestamps through some reserved
> memory connected with the Linux CPU cores. My idea is to reuse the existing
> SHM support of chrony. It does pretty much what I want: read a timestamp
> binary structure from a memory mapping.
That sounds like a very specific use case.
>
> However, the current SHM refclok implementation is specific to SHM devices,
> wherehas my FPGA's registers will appear within raw memory devices like
> /dev/mem, or /dev/uio.
>
> I see two options for passing the raw memory structure to chrony:
>
> 1. Write an additional middleware that maps the raw memory device and
> copies it regularly into an SHM device
> 2. Add support for raw memory mappings to chrony, with lots of resemblance
> to the current refclock_shm.c implementation
My suggestion would be 1, but use the SOCK refclock instead of SHM as
that is considered deprecated due to some security issues. I don't
like the idea of adding another driver like that.
--
Miroslav Lichvar
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.