Dear, coreboot community!
I'm found some parts of code in gpio init for Intel Minnowmax, that looks strange for me. This is gpio_to_pad struct from soc/intel/fsp_baytrail/gpio.c: static const u8 gpscore_gpio_to_pad[GPSCORE_COUNT] = { 85, 89, 93, 96, 99, 102, 98, 101, /* [ 0: 7] */ 34, 37, 36, 38, 39, 35, 40, 84, /* [ 8: 15] */ 62, 61, 64, 59, 54, 56, 60, 55, /* [16: 23] */ 63, 57, 51, 50, 53, 47, 52, 49, /* [24: 31] */ 48, 43, 46, 41, 45, 42, 58, 44, /* [32: 39] */ 95, 105, 70, 68, 67, 66, 69, 71, /* [40: 47] */ 65, 72, 86, 90, 88, 92, 103, 77, /* [48: 55] */ 79, 83, 78, 81, 80, 82, 13, 12, /* [56: 63] */ 15, 14, 17, 18, 19, 16, 2, 1, /* [64: 71] */ 0, 4, 6, 7, 9, 8, 33, 32, /* [72: 79] */ 31, 30, 29, 27, 25, 28, 26, 23, /* [80: 87] */ 21, 20, 24, 22, 5, 3, 10, 11, /* [88: 95] */ 106, 87, 91, 104, 97, 100 }; /* [96:101] */
I see many elements in 0..106 range. We're need this struct when calculating regmmio-value in this line: regmmio = (u32 *)(bank->pad_base + 16 * bank->gpio_to_pad[gpio]);
When gpio_to_pad[41] equals 105, we're trying to get element #105 from soc_gpio_map gpscore_gpio_map struct (it's defined in mainboard/minnowmax/gpio.c), we're getting error, because size of this array equals 102.
So, is it bug or I just don't get the details?
Thanks for all your attention! Novikov Konstantin.