/* ** bootstrap.h -- This file is a part of the Amiga bootloader. ** ** Copyright 1993, 1994 by Hamish Macdonald ** ** Some minor additions by Michael Rausch 1-11-94 ** Modified 11-May-94 by Geert Uytterhoeven ** (Geert.Uytterhoeven@cs.kuleuven.ac.be) ** - inline Supervisor() call ** ** This file is subject to the terms and conditions of the GNU General Public ** License. See the file COPYING in the main directory of this archive ** for more details. ** */ #ifndef BOOTSTRAP_H #define BOOTSTRAP_H #include #include struct List { struct Node *l_head; struct Node *l_tail; struct Node *l_tailpred; u_char l_type; u_char l_pad; }; struct MemChunk { struct MemChunk *mc_Next; /* pointer to next chunk */ u_long mc_Bytes; /* chunk byte size */ }; #define MEMF_CHIP (1<<1) #define MEMF_FAST (1<<2) #define MEMF_LOCAL (1<<8) #define MEMF_CLEAR (1<<16) struct MemHeader { struct Node mh_Node; u_short mh_Attributes; /* characteristics of this region */ struct MemChunk *mh_First; /* first free region */ void *mh_Lower; /* lower memory bound */ void *mh_Upper; /* upper memory bound+1 */ u_long mh_Free; /* total number of free bytes */ }; struct ExecBase { u_char fill1[296]; u_short AttnFlags; u_char fill2[24]; struct List MemList; u_char fill3[194]; u_char VBlankFrequency; u_char PowerSupplyFrequency; u_char fill4[36]; u_long EClockFrequency; }; #ifndef AFF_68020 #define AFB_68020 1 #define AFF_68020 (1<AttnFlags & AFF_68040) __asm__ volatile ("moveq #0,d0;" ".long 0x4e7b0003;" /* movec d0,tc */ ".long 0x4e7b0004;" /* movec d0,itt0 */ ".long 0x4e7b0005;" /* movec d0,itt1 */ ".long 0x4e7b0006;" /* movec d0,dtt0 */ ".long 0x4e7b0007" /* movec d0,dtt1 */ : /* no outputs */ : /* no inputs */ : "d0"); else { __asm__ volatile ("subl #4,sp;" "pmove tc,sp@;" "bclr #7,sp@;" "pmove sp@,tc;" "addl #4,sp"); if (SysBase->AttnFlags & AFF_68030) __asm__ volatile ("clrl sp@-;" ".long 0xf0170800;" /* pmove sp@,tt0 */ ".long 0xf0170c00;" /* pmove sp@,tt1 */ "addql #4,sp"); } } static __inline void jump_to (unsigned long addr) { __asm__ volatile ("jmp %0@" :: "a" (addr)); /* NOTREACHED */ } #endif /* BOOTSTRAP_H */ .