Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40929 )
Change subject: cpu: Add a helper function cpu_get_lapic_addr ......................................................................
Patch Set 4:
Patch Set 4:
Patch Set 4:
I guess lapic is very x86 specific, but rather than a lot of #ifdefs in arch-independent code you could define these in the arch-dependent cpu headers.
Yeah, I thought about that but I was wondering if things would look really confusing having a "#define LOCAL_APIC_ADDR 0" in every cpu.h. I am fine either ways. Not having #ifdefs in arch-independent code is definitely nice.
I also thought about this: #ifndef LOCAL_APIC_ADDR #define LOCAL_APIC_ADDR 0 #endif
But, there is always risk of silently breaking this on x86 platforms in some refactoring.