
/*--------------------------------------------------------------------*/
/*                                                                    */
/*                                                                    */
/*                                                                    */
/*                                                                    */
/*                                                                    */
/*                                                                    */
/*                                                                    */
/*                                                                    */
/*--------------------------------------------------------------------*/

#define PPC_IO_BASE            0x80000000
#define PPC_EXECPTION_VEC_SIZE (16 * 1024)

#define BOOT_FILE "os2ldr"
#define BOOT_FILE_LOAD_ADDRESS (576 * 1024)   /* Boot file loaded at 576K */

#define OS2LDR_PADDR  BOOT_FILE_LOAD_ADDRESS

#ifndef _PPC
#define HEAP_PADDR    (448 * 1024)
#else
#define HEAP_PADDR    (512 * 1024)
#endif

#define MAX_HEAP_SIZE (64 * 1024)             /* Max size of malloc heap */

#define BOOTSVC_PADDR (384 * 1024)

#define MAX_FILE_NAME           256

#define ERR_FILE_NOT_FOUND      2
#define ERR_MALLOC_FAILED       3
#define ERR_INVALID_FID         4
#define ERR_EXTENT_NOT_FOUND    5
#define ERR_IO_FAILED           6
#define ERR_TOO_MANY_EXTENTS    7
#define ERR_INTERNAL_ERROR      128

#define FS_TYPE_FAT             6
#define FS_TYPE_HPFS            7

#define PARA_SHIFT              4
#define PARA_SIZE               (1 << PARA_SHIFT)
#define PARA_MASK               (PARA_SIZE - 1)
/* XLATOFF */
#define PARA_ROUND(x)           (((x) + PARA_MASK) & ~PARA_MASK)
/* XLATON */

#define PAGE_SHIFT              12
#define PAGESHIFT               PAGE_SHIFT
#define PAGE_SIZE               (1 << PAGE_SHIFT)
#define PAGE_MASK               (PAGE_SIZE - 1)
/* XLATOFF */
#define PAGE_ROUND(x)           (((x) + PAGE_MASK) & ~PAGE_MASK)
/* XLATON */

#define SECTOR_SHIFT            9
#define SECTOR_SIZE             (1 << SECTOR_SHIFT)
#define SECTOR_MASK             (SECTOR_SIZE - 1)
/* XLATOFF */
#define SECTOR_ROUND(x)         (((x) + SECTOR_MASK) & ~SECTOR_MASK)
/* XLATON */

#define INT13_READ              0x02
#define INT13_GEOMETRY          0x0800
#define RC_ECC_CORRECTED        0x11
#define INT13_SEC_MASK          0x03F

#define INT10_WRITESTRING       0x1300
#define INT10_CHARCOLOR         0x0f
#define INT10_ROWCOL            0x0500

#define BOOT_BASE_ADDR          0x7C00

#define BOOT_DIR_SIZE           SECTOR_SIZE


