2 comments:
File src/mainboard/pcengines/apu2/gpio_ftns.c:
Patch Set #1, Line 13: if (gpio >= 0x300)
What is w/ this 0x300 check and how does it correspond 0x300? Seems we shouldn't be open coding any […]
There are 3 GPIO banks, each occupies the 0x100 bytes in the APCI MMIO space. This bounds check was intended to not read higher memory than the GPIO2 bank.
Patch Set #1, Line 16: return gpio0_read32(gpio & 0x3ff);
if a single namespace for gpios is intended to be used then gpioX_read() should be dropped entirely […]
It is all about assuming that the GPIO reading functions will be used sanely by the developer.
To view, visit change 42521. To unsubscribe, or for help writing mail filters, visit settings.