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 *****************************************************************************/
47 if (SysBase
->KickTagPtr
) {
48 IPTR
*list
= SysBase
->KickTagPtr
;
51 chksum
+= (ULONG
)*list
;
52 D(bug("KickTag: %p: %08x\n", list
, *list
));
54 /* on amiga, if bit 31 is set then this points to another list of
55 * modules rather than pointing to a single module. bit 31 is
56 * inconvenient on architectures where code may be loaded above
57 * 2GB. on these platforms we assume aligned pointers and use bit
60 if(*list
& 0x80000000) { list
= (IPTR
*)(*list
& 0x7fffffff); continue; }
62 if(*list
& 0x1) { list
= (IPTR
*)(*list
& ~(IPTR
)0x1); continue; }
69 if (SysBase
->KickMemPtr
) {
70 struct MemList
*ml
= (struct MemList
*)SysBase
->KickMemPtr
;
73 ULONG
*p
= (ULONG
*)ml
;
74 for (i
= 0; i
< sizeof(struct MemList
) / sizeof(ULONG
); i
++)
76 D(bug("MemList: %p: %08x %08x %d %08x %08x %08x%08x%08x%08x\n", ml
, ml
->ml_Node
.ln_Succ
, ml
->ml_Node
.ln_Pred
, ml
->ml_NumEntries
,
77 ml
->ml_ME
[0].me_Un
.meu_Addr
, ml
->ml_ME
[0].me_Length
,
78 p
[sizeof(struct MemList
) / sizeof(ULONG
)],
79 p
[sizeof(struct MemList
) / sizeof(ULONG
) + 1],
80 p
[sizeof(struct MemList
) / sizeof(ULONG
) + 2],
81 p
[sizeof(struct MemList
) / sizeof(ULONG
) + 3]));
82 ml
= (struct MemList
*)ml
->ml_Node
.ln_Succ
;
86 if (isdata
&& !chksum
)