/*++

Copyright (c) 1991  Microsoft Corporation

Module Name:

    jazzprom.h

Abstract:

    This module is the header file that describes physical and virtual
    address used by the PROM monitor and boot code.

Author:

    David N. Cutler (davec) 27-Apr-1991

Revision History:

--*/

#ifndef _JAZZPROM_
#define _JAZZPROM_

//
// Define virtual/physical base address pairs for boot mapping.
//

#define DEVICE_VIRTUAL_BASE 0xe0000000  // virtual base of device space
#define DEVICE_PHYSICAL_BASE 0x80000000 // physical base of device space

#undef INTERRUPT_VIRTUAL_BASE
#define INTERRUPT_VIRTUAL_BASE 0xe0100000 // virtual base of interrupt source
#define INTERRUPT_PHYSICAL_BASE 0xf0000000 // physical base of interrupt source

#define VIDEO_CONTROL_VIRTUAL_BASE 0xe0200000 // virtual base of video control
#define VIDEO_CONTROL_PHYSICAL_BASE 0x60000000 // physical base of video control

#define EXTENDED_VIDEO_CONTROL_VIRTUAL_BASE 0xe0400000 // virtual base of extended video control
#define EXTENDED_VIDEO_CONTROL_PHYSICAL_BASE 0x60200000 // physical base of extended video control

#define VIDEO_MEMORY_VIRTUAL_BASE 0xe0800000 // virtual base of video memory
#define VIDEO_MEMORY_PHYSICAL_BASE 0x40000000 // physical base of video memory

#define PROM_VIRTUAL_BASE 0xe1000000    // virtual base of boot PROM
#define PROM_PHYSICAL_BASE 0xfff00000   // physical base of boot PROM

#define EISA_IO_VIRTUAL_BASE 0xe2000000 // virtual base of EISA I/O
#define EISA_IO_PHYSICAL_BASE 0x90000000 // physical base of EISA I/O
#define EISA_EXTERNAL_IO_VIRTUAL_BASE 0xe4000000 // external virtual base of EISA I/O

#define EISA_MEMORY_VIRTUAL_BASE 0xe3000000 // virtual base of EISA memory
#define EISA_MEMORY_PHYSICAL_BASE 0x91000000 // physical base of EISA memory

#define PCR_VIRTUAL_BASE KiPcr          // virtual address of PCR
#define PCR_PHYSICAL_BASE 0x7ff000      // physical address of PCR

#undef SP_PHYSICAL_BASE
#define SP_VIRTUAL_BASE 0xffffa000      // virtual base of serial port
#define SP_PHYSICAL_BASE 0x80006000     // physical base of serial port

//
// Define boot code device virtual addresses.
//

#undef DMA_VIRTUAL_BASE
#define DMA_VIRTUAL_BASE 0xe0000000     // virtual base of DMA control

#define NET_VIRTUAL_BASE 0xe0001000     // virtual base of ethernet control

#define SCSI_VIRTUAL_BASE 0xe0002000    // virtual base os SCSI control

#define FLOPPY_VIRTUAL_BASE 0xe0003000  // virtual base of floppy control

#define RTC_VIRTUAL_BASE 0xe0004000     // virtual base of realtime clock

#define KEYBOARD_VIRTUAL_BASE 0xe0005000 // virtual base of keyboard control

#define COMPORT1_VIRTUAL_BASE 0xe0006000 // virtual base of comport 1 control

#define COMPORT2_VIRTUAL_BASE 0xe0007000 // virtual base of comport 2 control

#define PARALLEL_VIRTUAL_BASE 0xe0008000 // virtual base of parallel control

#define NVRAM_VIRTUAL_BASE 0xe0009000    // virtual base of NVRAM

#define SOUND_VIRTUAL_BASE 0xe000c000    // virtual base of sound control

#define DIAGNOSTIC_VIRTUAL_BASE 0xe000f000 // virtual base of diagnostic control

#define VIDEO_CURSOR_VIRTUAL_BASE 0xe0208000 // virtual base of cursor control

#define VIDEO_ID_VIRTUAL_BASE 0xe0210000 // virtual base of video id register

#define VIDEO_RESET_VIRTUAL_BASE 0xe0220000 // virtual base of reset register

//
// Define base address and limit of DMA translation table.
//

#define DMA_TRANSLATION_BASE 0xa0001000 // translation table base address
#undef DMA_TRANSLATION_LIMIT
#define DMA_TRANSLATION_LIMIT 0x1000    // translation table limit

//
// Define pointer to DMA control registers.
//

#define DMA_CONTROL ((volatile PDMA_REGISTERS)(DMA_VIRTUAL_BASE))

//
// Define DMA channels.
//

#define SCSI_CHANNEL 0x0                // SCSI DMA channel number
#define FLOPPY_CHANNEL 0x1              // Floppy DMA channel

//
// Define pointer to interrupt source register.
//

#undef INTERRUPT_SOURCE
#define INTERRUPT_SOURCE ((volatile PUCHAR)INTERRUPT_VIRTUAL_BASE)

//
// Define device interrupt identification values.
//

#define PARALLEL_DEVICE 0x4         // Parallel port device interrupt id
#define FLOPPY_DEVICE 0x8           // Floppy device interrupt id
#define SOUND_DEVICE 0xC            // Sound device interrupt id
#define VIDEO_DEVICE 0x10           // Video device interrupt id
#define ETHERNET_DEVICE 0x14        // Ethernet device interrupt id
#define SCSI_DEVICE 0x18            // SCSI device interrupt id
#define KEYBOARD_DEVICE 0x1C        // Keyboard device interrupt id
#define MOUSE_DEVICE 0x20           // Mouse device interrupt id
#define SERIAL0_DEVICE 0x24         // Serial port 0 device interrupt id
#define SERIAL1_DEVICE 0x28         // Serial port 1 device interrupt id

//
// Define low memory transfer vector address and TB index address.
//

#define TRANSFER_VECTOR (KSEG1_BASE + 0x400) // exception handler address

#endif // _JAZZPROM_
