Subversion Repositories HelenOS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * Copyright (c) 2007 Michal Kebrt
  3.  * Copyright (c) 2009 Vineeth Pillai
  4.  * All rights reserved.
  5.  *
  6.  * Redistribution and use in source and binary forms, with or without
  7.  * modification, are permitted provided that the following conditions
  8.  * are met:
  9.  *
  10.  * - Redistributions of source code must retain the above copyright
  11.  *   notice, this list of conditions and the following disclaimer.
  12.  * - Redistributions in binary form must reproduce the above copyright
  13.  *   notice, this list of conditions and the following disclaimer in the
  14.  *   documentation and/or other materials provided with the distribution.
  15.  * - The name of the author may not be used to endorse or promote products
  16.  *   derived from this software without specific prior written permission.
  17.  *
  18.  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  19.  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  20.  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  21.  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  22.  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  23.  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  24.  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  25.  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  26.  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  27.  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28.  */
  29.  
  30. /** @addtogroup arm32gxemul GXemul
  31.  *  @brief GXemul machine specific parts.
  32.  *  @ingroup arm32
  33.  * @{
  34.  */
  35. /** @file
  36.  *  @brief GXemul peripheries drivers declarations.
  37.  */
  38.  
  39. #ifndef KERN_arm32_GXEMUL_H_
  40. #define KERN_arm32_GXEMUL_H_
  41.  
  42. #include <arch/machine_func.h>
  43.  
  44. /** Last interrupt number (beginning from 0) whose status is probed
  45.  * from interrupt controller
  46.  */
  47. #define GXEMUL_IRQC_MAX_IRQ  8
  48. #define GXEMUL_KBD_IRQ       2
  49. #define GXEMUL_TIMER_IRQ     4
  50.  
  51. /** Timer frequency */
  52. #define GXEMUL_TIMER_FREQ  100
  53.  
  54. #define GXEMUL_KBD_ADDRESS   0x10000000
  55. #define GXEMUL_MP_ADDRESS    0x11000000
  56. #define GXEMUL_FB_ADDRESS    0x12000000
  57. #define GXEMUL_RTC_ADDRESS   0x15000000
  58. #define GXEMUL_IRQC_ADDRESS  0x16000000
  59.  
  60. extern void *gxemul_kbd;
  61. extern void *gxemul_rtc;
  62. extern void *gxemul_irqc;
  63.  
  64. #define GXEMUL_HALT_OFFSET        0x010
  65. #define GXEMUL_RTC_FREQ_OFFSET    0x100
  66. #define GXEMUL_MP_MEMSIZE_OFFSET  0x090
  67. #define GXEMUL_RTC_ACK_OFFSET     0x110
  68.  
  69. extern void gxemul_init(void);
  70. extern void gxemul_fb_init(void);
  71. extern void gxemul_output_init(void);
  72. extern void gxemul_input_init(void);
  73. extern void gxemul_release_console(void);
  74. extern void gxemul_grab_console(void);
  75. extern void gxemul_timer_irq_start(void);
  76. extern void gxemul_cpu_halt(void);
  77. extern void gxemul_irq_exception(int exc_no, istate_t *istate);
  78. extern uintptr_t gxemul_get_memory_size(void);
  79. extern uintptr_t gxemul_get_fb_address(void);
  80. extern void gxemul_fb_init(void);
  81. extern void gxemul_frame_init(void);
  82.  
  83.  
  84. #endif
  85.  
  86. /** @}
  87.  */
  88.