On 18.08.21 18:16, Jan Kiszka wrote: > On 18.08.21 18:08, Christian Storm wrote: >> Hi Jan, >> >>>> Carve out EFI Boot Guard's watchdog arming part in preparation to >>>> enable aarch64 support -- which is then naturally restricted to >>>> the switching logics only -- as the watchdog drivers are specific >>>> to x86. For x86, there's no change in behavior. >>>> >>> >>> This is pragmatic but not future-proof. Eventually, we will be >>> confronted with non-U-Boot UEFI firmware that probably will not have >>> proper watchdog support. >>> >>> Just build an empty driver list for now but excluding the x86-targeting >>> drivers from the build. Should also be simpler. >> >> Well, the probing part in scan_devices() may as well be specific to >> the platform then. So you may probably end up with multiple/different >> implementations of scan_devices() depending on the platform ― besides >> the platform-specific hard-wired list of watchdog drivers. >> As we don't have this now, I opted for this to not introduce boilerplate. >> >> Either way, your suggestion is then to have an empty watchdog driver list for >> aarch64 and still call scan_devices() which in turn calls probe_watchdog() >> for each successfully enumerated PCI device, knowing that this is void? >> > > Exactly, as that is much simpler and will not require moving back all > the code when adding the first driver to aarch64, which will likely not > be PCI based for a while, but that does not matter. > > I suspect the PCI part of the probing will run rather quickly on most > devices as PCI is not supported, at least not by the firmware. THAT may > actually require some additional change in order to handle a potentially > missing PCI protocol gracefully. >
Oh, and another reason to not go your path: watchdog timeout != 0 must keep the semantic "I expect a watchdog to be there" and must error-out if that is not the case. Jan >> >> Aside, scan_devices() is and has been a misnomer as it (mediately) does >> more than just scanning devices... >> > > Feel free to rename it to probe_devices. > > Jan > -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux -- You received this message because you are subscribed to the Google Groups "EFI Boot Guard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/efibootguard-dev/6687f636-de85-168f-33c9-c65e65d58594%40siemens.com.
