Code Monkey home page Code Monkey logo

Comments (9)

bluecmd avatar bluecmd commented on June 1, 2024

Thinking about this some more. Maybe this is just all done by the PCH?

I see that facebook/openbmc does sync from the ME, which I don't really like. Ideally there would be some source we can query when everything is shut off.

from u-bmc.

bluecmd avatar bluecmd commented on June 1, 2024

@shenki How does OpenBMC handle RTC clock? I tried looking at the code and see some past discussions but it didn't jump at me how it's done.

from u-bmc.

shenki avatar shenki commented on June 1, 2024

In terms of providing it to the host? I don't know much about openbmc's handling of this.

On OpenPower host firmware queries the current time from the BMC at host boot time. This happens over IPMI BT. The source of this is the current time according to Linux.

Linux on the BMC grabs the current time/date from the RTC over i2c at BMC boot. All of the systems I've seen have a i2c attached RTC that has battery backup. ASPEED does have a RTC in SoC, but it loses state when the BMC loses power, so it's not very useful.

from u-bmc.

bluecmd avatar bluecmd commented on June 1, 2024

Thanks! I was curious about how the BMC gets its time - but you answered that.

I'll dig through some board schematics for other boards and see if I can figure it out.

Fwiw, on Yosemite I recall the RTC battery to be on each of the 4 host blades and I don't think the aspeed part had any.

from u-bmc.

bluecmd avatar bluecmd commented on June 1, 2024

This is what the Tioga Pass requires:

8.17 BMC Time Sync

During BMC initialization:

  • If it’s the 1st time being powered on via an AC source (G3 exit), the BMC should receive
    its initial RTC time from PCH RTC. Otherwise, the BMC should keep its own RTC.

During BMC running time:

  • If the system is in S0 and the BIOS POST has completed, the BMC should sync with
    PCH RTC every hour
  • If the system is in S5, the BMC should retrieve the NTP UTC following the OEM
    command setting of NTP periodical sync interval (default =2x per hour)
  • Log NTP status time sync failed event if a mismatch of > Β±5 seconds is found, or if BMC
    cannot obtain NTP time after 3x retries. Retry interval is set to 30 seconds by default.

I have to research what the PCH can do when exiting G3 but my understanding is that it is very limited. I'm considering being very NTP centric instead, given that you need network connectivity to query the API anyway, having NTP should be fine. Reading the RTC from the PCH as a fallback, and potentially even power up the machine to do so should also work, but that's heading down a path of surprising behavior.

from u-bmc.

bluecmd avatar bluecmd commented on June 1, 2024

Pending discussion in u-root/u-root#961

from u-bmc.

bluecmd avatar bluecmd commented on June 1, 2024

I've requested a vendor pool for x.u-root.pool.ntp.org as is required to ship with NTP pool defaults in apps.

from u-bmc.

bluecmd avatar bluecmd commented on June 1, 2024

RTC is read up on boot but not set by us, will file an issue for that.

from u-bmc.

bluecmd avatar bluecmd commented on June 1, 2024

Pending u-root/u-root#982

from u-bmc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.