diff options
author | Li-Ta Lo <ollie@lanl.gov> | 2004-04-14 22:24:50 +0000 |
---|---|---|
committer | Li-Ta Lo <ollie@lanl.gov> | 2004-04-14 22:24:50 +0000 |
commit | 6463ae7f1bd1f7ab60725529cf79af30a0e7297d (patch) | |
tree | e8ddaba7c8da40c8f125149b0c3457c48550f619 /util/getpir/checkpir.c | |
parent | 815a80316448f72ec9501da5c545595c30880e70 (diff) | |
download | coreboot-6463ae7f1bd1f7ab60725529cf79af30a0e7297d.tar.xz |
seperate checksum and code generating code.
use mmap instead of file io
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1504 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/getpir/checkpir.c')
-rw-r--r-- | util/getpir/checkpir.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/util/getpir/checkpir.c b/util/getpir/checkpir.c index efcc9182cc..2a738e78a4 100644 --- a/util/getpir/checkpir.c +++ b/util/getpir/checkpir.c @@ -4,23 +4,11 @@ */ #include <stdio.h> - -#include <device/pci.h> #include <arch/pirq_routing.h> -struct irq_info se_arr[50]; -struct irq_routing_table *rt; - -int calc_checksum(struct irq_routing_table *rt) -{ - long sum = 0, i; - uint8_t *addr, sum2 = 0; +#include "checksum.h" - addr = (uint8_t *) rt; - for (i = 0; i < rt->size; i++) - sum2 += addr[i]; - return (sum2); -} +struct irq_routing_table *rt; main() { |