The Pedigree Project  0.1
Versatile.cc
1 /*
2  * Copyright (c) 2008-2014, Pedigree Developers
3  *
4  * Please see the CONTRIB file in the root of the source tree for a full
5  * list of contributors.
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #include "Versatile.h"
21 
22 ArmVersatile ArmVersatile::m_Instance;
23 
24 Machine &Machine::instance()
25 {
26  return ArmVersatile::instance();
27 }
28 
30 {
31  // the versatile board QEMU emulates has two UARTs (PL011)
32  // starting at 0x101f1000
33  m_Serial[0].setBase(0x101f1000);
34  // m_Serial[1].setBase(0x101f2000);
37  m_bInitialised = true;
38 }
40 {
41  return &m_Serial[n];
42 }
44 {
45  return 1;
46 }
48 {
49  return &m_Vga;
50 }
52 {
53  return 1;
54 }
55 IrqManager *ArmVersatile::getIrqManager()
56 {
57  // TODO
58  return 0;
59 }
61 {
62  // TODO
63  return 0;
64 }
66 {
67  // TODO
68  return 0;
69 }
71 {
72  return &m_Keyboard;
73 }
74 
76 {
77 }
79 {
80 }
virtual Keyboard * getKeyboard()
Definition: Versatile.cc:70
virtual Vga * getVga(size_t n)
Definition: Versatile.cc:47
virtual Timer * getTimer()
Definition: Versatile.cc:65
virtual size_t getNumSerial()
Definition: Versatile.cc:43
virtual Serial * getSerial(size_t n)
Definition: Versatile.cc:39
virtual SchedulerTimer * getSchedulerTimer()
Definition: Versatile.cc:60
virtual ~ArmVersatile()
Definition: Versatile.cc:78
virtual void initialise()
Definition: Versatile.cc:29
virtual size_t getNumVga()
Definition: Versatile.cc:51