/*
 *
 *      68K part of the WarpUp hardware driver
 *      Be sure to read the instructions in the documentation before
 *      writing the code!
 *
 */

#include <exec/libraries.h>

struct WarpHWBase
{
        struct Library base;
};

#pragma libbase WarpHWBase

extern void sync(void);         /* ASM source which performs one NOP */

/*
 *
 *      GetDriverID
 *      returns an identification string for this hardware driver
 *
 */

char* __saveds GetDriverID(void)
{
        return("WarpUp hardware driver for <insert your identification here>");
}

/*
 *
 *      SupportedProtocol
 *      returns the version of the supported WarpUp HWDriver protocol
 *      Currently the only version is 1
 *
 *      This function exists for backward compatibility reasons, so
 *      that the WarpUp HAL won't call new functions which don't
 *      exist in old HW drivers.
 *
 */

int __saveds SupportedProtocol(void)
{
        return(1);
}

/*
 *
 *      InitBootArea
 *      Determines the address of the PowerPC's exception area
 *      space. The exception area can be allocated inside this
 *      function using exec memory allocation mechanisms.
 *
 */

void* __saveds InitBootArea(void)
{

/* allocate at least 64KB of memory and modify all necessary registers of
   the hardware, so that the hardware can map the exception area
   space to the allocated memory
   Return the address of the exception area or NULL for failure */

        return(NULL);
}

/*
 *
 *      BootPowerPC
 *      Resets the PowerPC and initializes all hardware registers
 *
 */

void __saveds BootPowerPC(void)
{
/* reset the PowerPC processor and initialize hardware registers */

}

/*
 *
 *      CauseInterrupt
 *      Invokes the PPC Interrupt. INT signal should be kept active
 *      until confirmed by the PPC side.
 *
 */

void __saveds CauseInterrupt(void)
{

/* trigger PowerPC external interrupt */
}
