2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
5 Desc: Build checksum for Kickstart.
9 #include <aros/debug.h>
10 #include "exec_intern.h"
11 #include <proto/exec.h>
13 /*****************************************************************************
17 AROS_LH0(ULONG
, SumKickData
,
23 struct ExecBase
*, SysBase
, 102, Exec
)
41 *****************************************************************************/
48 D(bug("[SumKickData] KickTagPtr 0x%p KickMemPtr 0x%p\n", SysBase
->KickTagPtr
, SysBase
->KickMemPtr
));
50 if (SysBase
->KickTagPtr
)
52 IPTR
*list
= SysBase
->KickTagPtr
;
56 chksum
+= (ULONG
)*list
;
57 D(bug("KickTag: %p: %08x\n", list
, *list
));
60 * on amiga, if bit 31 is set then this points to another list of
61 * modules rather than pointing to a single module. bit 31 is
62 * inconvenient on architectures where code may be loaded above
63 * 2GB. on these platforms we assume aligned pointers and use bit
66 if (*list
& RESLIST_NEXT
)
68 list
= (IPTR
*)(*list
& ~RESLIST_NEXT
);
76 if (SysBase
->KickMemPtr
)
78 struct MemList
*ml
= (struct MemList
*)SysBase
->KickMemPtr
;
83 ULONG
*p
= (ULONG
*)ml
;
85 for (i
= 0; i
< sizeof(struct MemList
) / sizeof(ULONG
); i
++)
87 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
,
88 ml
->ml_ME
[0].me_Un
.meu_Addr
, ml
->ml_ME
[0].me_Length
,
89 p
[sizeof(struct MemList
) / sizeof(ULONG
)],
90 p
[sizeof(struct MemList
) / sizeof(ULONG
) + 1],
91 p
[sizeof(struct MemList
) / sizeof(ULONG
) + 2],
92 p
[sizeof(struct MemList
) / sizeof(ULONG
) + 3]));
93 ml
= (struct MemList
*)ml
->ml_Node
.ln_Succ
;
97 if (isdata
&& !chksum
)