Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43133 )
Change subject: baytrail RFC: native replacement for refcode.elf ......................................................................
Patch Set 5:
(3 comments)
Nice work!
https://review.coreboot.org/c/coreboot/+/43133/5/src/soc/intel/baytrail/refc... File src/soc/intel/baytrail/refcode_native.c:
https://review.coreboot.org/c/coreboot/+/43133/5/src/soc/intel/baytrail/refc... PS5, Line 13: static u32 mmio_read32(u32 addr) : { : return *(u32 *) addr; : } : : static void mmio_write32(u32 addr, u32 val) : { : *(u32 *) addr = val; : } : : static void mmio_or32(u32 addr, u32 val) : { : u32 tmp; : : tmp = mmio_read32(addr); : mmio_write32(addr, tmp | val); : } : : static void mmio_and32(u32 addr, u32 val) : { : u32 tmp; : : tmp = mmio_read32(addr); : mmio_write32(addr, tmp & val); : } : : static void mmio_andor32(u32 addr, u32 val1, u32 val2) : { : u32 tmp; : : tmp = mmio_read32(addr); : mmio_write32(addr, (tmp & val1) | val2); : } please use arch/mmio.h
https://review.coreboot.org/c/coreboot/+/43133/5/src/soc/intel/baytrail/refc... PS5, Line 64: static inline u64 rdtsc64(void) : { : struct tsc_struct tscval; : : tscval = rdtsc(); : return (u64) tscval.hi << 32 | (u64) tscval.lo; : } : : static void udelay(u64 usecs) : { : u64 needed_ticks, start_ticks; : : needed_ticks = usecs * tsc_freq_mhz(); : start_ticks = rdtsc64(); : while (start_ticks - rdtsc64() < needed_ticks) : ; : } Please use delay.h
https://review.coreboot.org/c/coreboot/+/43133/5/src/soc/intel/baytrail/refc... PS5, Line 144: printk(BIOS_DEBUG, "refcode entry\n"); Given that this is coreboot and not the refcode, you might want a different message?