| [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: [chrony-dev] [RFC] Support for raw memory mapped clock sources
- From: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 21 Oct 2025 15:39:58 +0200
- Dkim-filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com F34B03D84F8E
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1761054000; bh=CgpRZSIVFGmd4ojNgXxJvJq9O5R+zBg2SgRCE8nT7i4=; h=Message-ID:Date:MIME-Version:To:From; b=hCXZquY4/xjqlAfeshapaSjwh5y66F/X7ei5qNTv4TiXyTLSHpRNBYXFDWGq0g2EI s+WtCTNx7sccaoiBsyaqC5tfoDMj5Bu6d8FzGj8IHLr6m7q2RqL7Cisa1J5hU59spa HorkebtK2GVFs+QEeAJGlwCXa/i/xcJx9OOIB60SvBh66ze1dWBNBLMx6B7umawFKX 3YS+qdnrO0vus68ApiOsnhSdYZ1FuGh2tI3gJCPzRT4khuO3F8wCwSxjs1Xt9ovclW wemrQSeB7vyApqVFzaPL5YsBtU0L8gVz55p6fGecDJIBCLOGumVRg4i3hVHXcVOP3A C26g2djUFxOFg==
Hello,
I have two embedded products which will have a GPS clock source
connected to a Xilinx FPGA MPSoC. However, the GPS PPS and NMEA traffic
will be routed to the programmable logic, not the Linux side.
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.
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
Which approach would you recommend? If adding support to chrony makes
sense for the general public, my company would likely be willing to
contribute this upstream. We have multiple devices in different activity
sectors with this hardware configuration. The options would look like:
1. GPS -> FPGA -> AXI -> CPU -> /dev/uio -> middleware (custom) ->
/dev/shm -> chrony
2. GPS -> FPGA -> AXI -> CPU -> /dev/uio -> chrony (patched)
Also, I don't think using DMA should be necessary given the small size
of the struct shmTime. For the PPS signal, the FPGA can connect share a
GPIO, so I will use the pps-gpio driver.
Thank you for your time,
Enguerrand de Ribaucourt,
Savoir-faire Linux (FR)
--
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.