2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Build checksum for Kickstart.
8 #include <aros/debug.h>
9 #include "exec_intern.h"
10 #include <proto/exec.h>
12 /*****************************************************************************
16 AROS_LH0(ULONG
, SumKickData
,
22 struct ExecBase
*, SysBase
, 102, Exec
)
40 *****************************************************************************/
46 if (SysBase
->KickTagPtr
) {
47 IPTR
*list
= SysBase
->KickTagPtr
;
50 chksum
+= (ULONG
)*list
;
51 /* on amiga, if bit 31 is set then this points to another list of
52 * modules rather than pointing to a single module. bit 31 is
53 * inconvenient on architectures where code may be loaded above
54 * 2GB. on these platforms we assume aligned pointers and use bit
57 if(*list
& 0x80000000) { list
= (IPTR
*)(*list
& 0x7fffffff); continue; }
59 if(*list
& 0x1) { list
= (IPTR
*)(*list
& ~(IPTR
)0x1); continue; }
65 if (SysBase
->KickMemPtr
) {
66 struct MemList
*ml
= (struct MemList
*)SysBase
->KickMemPtr
;
67 while (ml
->ml_Node
.ln_Succ
) {
69 ULONG
*p
= (ULONG
*)ml
;
70 for (i
= 0; i
< sizeof(struct MemList
) / sizeof(ULONG
); i
++)
72 ml
= (struct MemList
*)ml
->ml_Node
.ln_Succ
;