MCPcopy Create free account
hub / github.com/coreboot/coreboot / get_diff

Function get_diff

util/inteltool/gpio.c:785–800  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

783}
784
785static uint32_t get_diff(const io_register_t *const reg, const uint32_t def)
786{
787 uint32_t gpio_diff = 0;
788 switch (reg->size) {
789 case 4:
790 gpio_diff = def ^ inl(gpiobase+reg->addr);
791 break;
792 case 2:
793 gpio_diff = (uint16_t)def ^ inw(gpiobase+reg->addr);
794 break;
795 case 1:
796 gpio_diff = (uint8_t)def ^ inb(gpiobase+reg->addr);
797 break;
798 }
799 return gpio_diff;
800}
801
802static void print_diff(const io_register_t *const reg,
803 const uint32_t def, const uint32_t diff)

Callers 1

print_gpiosFunction · 0.85

Calls 3

inlFunction · 0.70
inwFunction · 0.70
inbFunction · 0.70

Tested by

no test coverage detected