Rename generated hudson_romsig.bin for make clean
[coreboot.git] / util / getpir / checkpir.c
blobc9703c6f3c2ac851262fcd07699e4d88ff2d2afd
1 /* checkpir.c : This software is released under GPL
2 * For coreboot use only
3 * Aug 26 2001 , Nikolai Vladychevski, <niko@isl.net.mx>
4 */
6 #include <stdio.h>
7 #include "pirq_routing.h"
8 #include "checksum.h"
10 struct irq_routing_table *rt;
12 int main(void)
14 uint8_t sum, newsum;
16 rt = (struct irq_routing_table *) &intel_irq_routing_table;
17 sum = calc_checksum(rt);
19 printf("Validating checksum, file: irq_tables.c that was in ./ at compile time...\n");
20 printf("(no other tests are done)\n");
22 if (!sum) {
23 printf("Checksum for IRQ Routing table is ok. You can use irq_tables.c in coreboot now.\n");
24 } else {
25 newsum = rt->checksum - sum;
26 printf("BAD CHECKSUM for IRQ Routing table !!!!\n");
27 printf("If you want to make it valid, change the checksum to: %#x\n",
28 newsum);
30 return 0;