Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42062 )
Change subject: src/*: Update makefiles to exclude x86 code from non-x86 verstage ......................................................................
Patch Set 2:
Patch Set 2:
Patch Set 2:
This is going to become a maintenance burden longterm, cluttering Makefiles with preprocessor use. Please file a new bug if you decide to submit this in the shape of patchset #2. I think somwone really has to revisit the build-classes generator to properly support stages running on different arch.
You guarded selected verstage-y under cpu/x86 but you should guard them all. Like drivers/uart too that contains both PCI configuration and IO accesses.
Also picasso/tsc_freq.c is clearly x86-only and does not belong to verstage then.
I think rearchitecting the build-class generator for 9 makefiles (3 of which are in amd common) might be overkill.
Well you missed some makefiles already. At least drivers/uart and CONFIG(PCI) section under device/. Any new file added to verstage-y in common code has potential to break picasso build, unless those guards are added. Thus my wording, longterm maintenance burden.
Any verstage-y addition with <device/pci.h> or <arch/io.h> or <cpu/x86/xxx.h> in its includes is invalid for building into PSP. I think it's the right time for a proper fix to support build of stages on different arch.
I'll take a look at tsc_freq. I'm still working on the tsc code portion of the psp.
There was an initiative to re-define both udelay() and timestamp_get() running on top of monotonic timer.