Peter Maydell | 0d75590 | 2016-01-26 18:16:58 +0000 | [diff] [blame] | 1 | #include "qemu/osdep.h" |
Thomas Huth | 7bacfd7 | 2016-11-10 21:16:01 +0100 | [diff] [blame] | 2 | #include "qemu/error-report.h" |
Markus Armbruster | 0b8fa32 | 2019-05-23 16:35:07 +0200 | [diff] [blame] | 3 | #include "qemu/module.h" |
Markus Armbruster | da34e65 | 2016-03-14 09:01:28 +0100 | [diff] [blame] | 4 | #include "qapi/error.h" |
Paolo Bonzini | 4771d75 | 2016-01-19 21:51:44 +0100 | [diff] [blame] | 5 | #include "cpu.h" |
Markus Armbruster | d645427 | 2019-08-12 07:23:45 +0200 | [diff] [blame] | 6 | #include "migration/vmstate.h" |
Marc-André Lureau | 4d43a60 | 2017-01-26 18:26:44 +0400 | [diff] [blame] | 7 | #include "chardev/char-fe.h" |
Paolo Bonzini | 0d09e41 | 2013-02-05 17:06:20 +0100 | [diff] [blame] | 8 | #include "hw/ppc/spapr.h" |
| 9 | #include "hw/ppc/spapr_vio.h" |
Markus Armbruster | a27bd6c | 2019-08-12 07:23:51 +0200 | [diff] [blame] | 10 | #include "hw/qdev-properties.h" |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 11 | |
| 12 | #define VTERM_BUFSIZE 16 |
| 13 | |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 14 | typedef struct SpaprVioVty { |
| 15 | SpaprVioDevice sdev; |
Marc-André Lureau | becdfa0 | 2016-10-22 12:52:51 +0300 | [diff] [blame] | 16 | CharBackend chardev; |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 17 | uint32_t in, out; |
| 18 | uint8_t buf[VTERM_BUFSIZE]; |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 19 | } SpaprVioVty; |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 20 | |
David Gibson | fd506b4f | 2013-04-07 19:08:16 +0000 | [diff] [blame] | 21 | #define TYPE_VIO_SPAPR_VTY_DEVICE "spapr-vty" |
| 22 | #define VIO_SPAPR_VTY_DEVICE(obj) \ |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 23 | OBJECT_CHECK(SpaprVioVty, (obj), TYPE_VIO_SPAPR_VTY_DEVICE) |
David Gibson | fd506b4f | 2013-04-07 19:08:16 +0000 | [diff] [blame] | 24 | |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 25 | static int vty_can_receive(void *opaque) |
| 26 | { |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 27 | SpaprVioVty *dev = VIO_SPAPR_VTY_DEVICE(opaque); |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 28 | |
Thomas Huth | 8a273cb | 2016-11-18 10:09:37 +0100 | [diff] [blame] | 29 | return VTERM_BUFSIZE - (dev->in - dev->out); |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | static void vty_receive(void *opaque, const uint8_t *buf, int size) |
| 33 | { |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 34 | SpaprVioVty *dev = VIO_SPAPR_VTY_DEVICE(opaque); |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 35 | int i; |
| 36 | |
David Gibson | 0201e2d | 2011-04-01 15:15:27 +1100 | [diff] [blame] | 37 | if ((dev->in == dev->out) && size) { |
| 38 | /* toggle line to simulate edge interrupt */ |
David Gibson | 7678b74 | 2019-09-23 15:50:09 +1000 | [diff] [blame] | 39 | spapr_vio_irq_pulse(&dev->sdev); |
David Gibson | 0201e2d | 2011-04-01 15:15:27 +1100 | [diff] [blame] | 40 | } |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 41 | for (i = 0; i < size; i++) { |
Thomas Huth | 7bacfd7 | 2016-11-10 21:16:01 +0100 | [diff] [blame] | 42 | if (dev->in - dev->out >= VTERM_BUFSIZE) { |
| 43 | static bool reported; |
| 44 | if (!reported) { |
| 45 | error_report("VTY input buffer exhausted - characters dropped." |
| 46 | " (input size = %i)", size); |
| 47 | reported = true; |
| 48 | } |
| 49 | break; |
| 50 | } |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 51 | dev->buf[dev->in++ % VTERM_BUFSIZE] = buf[i]; |
| 52 | } |
| 53 | } |
| 54 | |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 55 | static int vty_getchars(SpaprVioDevice *sdev, uint8_t *buf, int max) |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 56 | { |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 57 | SpaprVioVty *dev = VIO_SPAPR_VTY_DEVICE(sdev); |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 58 | int n = 0; |
| 59 | |
| 60 | while ((n < max) && (dev->out != dev->in)) { |
Paul Mackerras | fd38b16 | 2019-07-31 14:36:54 +1000 | [diff] [blame] | 61 | /* |
| 62 | * Long ago, PowerVM's vty implementation had a bug where it |
| 63 | * inserted a \0 after every \r going to the guest. Existing |
| 64 | * guests have a workaround for this which removes every \0 |
| 65 | * immediately following a \r. To avoid triggering this |
| 66 | * workaround, we stop before inserting a \0 if the preceding |
| 67 | * character in the output buffer is a \r. |
| 68 | */ |
| 69 | if (n > 0 && (buf[n - 1] == '\r') && |
| 70 | (dev->buf[dev->out % VTERM_BUFSIZE] == '\0')) { |
| 71 | break; |
David Gibson | 6c3bc24 | 2017-11-20 17:49:25 +1100 | [diff] [blame] | 72 | } |
Paul Mackerras | fd38b16 | 2019-07-31 14:36:54 +1000 | [diff] [blame] | 73 | buf[n++] = dev->buf[dev->out++ % VTERM_BUFSIZE]; |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 74 | } |
| 75 | |
Marc-André Lureau | 5345fdb | 2016-10-22 12:52:55 +0300 | [diff] [blame] | 76 | qemu_chr_fe_accept_input(&dev->chardev); |
Anton Blanchard | 7770b6f | 2013-08-13 14:10:04 +1000 | [diff] [blame] | 77 | |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 78 | return n; |
| 79 | } |
| 80 | |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 81 | void vty_putchars(SpaprVioDevice *sdev, uint8_t *buf, int len) |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 82 | { |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 83 | SpaprVioVty *dev = VIO_SPAPR_VTY_DEVICE(sdev); |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 84 | |
Daniel P. Berrange | 6ab3fc3 | 2016-09-06 14:56:04 +0100 | [diff] [blame] | 85 | /* XXX this blocks entire thread. Rewrite to use |
| 86 | * qemu_chr_fe_write and background I/O callbacks */ |
Marc-André Lureau | 5345fdb | 2016-10-22 12:52:55 +0300 | [diff] [blame] | 87 | qemu_chr_fe_write_all(&dev->chardev, buf, len); |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 88 | } |
| 89 | |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 90 | static void spapr_vty_realize(SpaprVioDevice *sdev, Error **errp) |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 91 | { |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 92 | SpaprVioVty *dev = VIO_SPAPR_VTY_DEVICE(sdev); |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 93 | |
Anton Nefedov | 3065070 | 2017-07-06 15:08:52 +0300 | [diff] [blame] | 94 | if (!qemu_chr_fe_backend_connected(&dev->chardev)) { |
Markus Armbruster | 28b07e7 | 2015-02-27 11:52:17 +0100 | [diff] [blame] | 95 | error_setg(errp, "chardev property not set"); |
| 96 | return; |
Michael Ellerman | 5728530 | 2011-11-13 17:18:59 +0000 | [diff] [blame] | 97 | } |
| 98 | |
Marc-André Lureau | 5345fdb | 2016-10-22 12:52:55 +0300 | [diff] [blame] | 99 | qemu_chr_fe_set_handlers(&dev->chardev, vty_can_receive, |
Anton Nefedov | 81517ba | 2017-07-06 15:08:49 +0300 | [diff] [blame] | 100 | vty_receive, NULL, NULL, dev, NULL, true); |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 101 | } |
| 102 | |
David Gibson | 3feef8a | 2011-11-13 17:19:01 +0000 | [diff] [blame] | 103 | /* Forward declaration */ |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 104 | static target_ulong h_put_term_char(PowerPCCPU *cpu, SpaprMachineState *spapr, |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 105 | target_ulong opcode, target_ulong *args) |
| 106 | { |
| 107 | target_ulong reg = args[0]; |
| 108 | target_ulong len = args[1]; |
| 109 | target_ulong char0_7 = args[2]; |
| 110 | target_ulong char8_15 = args[3]; |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 111 | SpaprVioDevice *sdev; |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 112 | uint8_t buf[16]; |
| 113 | |
David Gibson | 3feef8a | 2011-11-13 17:19:01 +0000 | [diff] [blame] | 114 | sdev = vty_lookup(spapr, reg); |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 115 | if (!sdev) { |
| 116 | return H_PARAMETER; |
| 117 | } |
| 118 | |
| 119 | if (len > 16) { |
| 120 | return H_PARAMETER; |
| 121 | } |
| 122 | |
| 123 | *((uint64_t *)buf) = cpu_to_be64(char0_7); |
| 124 | *((uint64_t *)buf + 1) = cpu_to_be64(char8_15); |
| 125 | |
| 126 | vty_putchars(sdev, buf, len); |
| 127 | |
| 128 | return H_SUCCESS; |
| 129 | } |
| 130 | |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 131 | static target_ulong h_get_term_char(PowerPCCPU *cpu, SpaprMachineState *spapr, |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 132 | target_ulong opcode, target_ulong *args) |
| 133 | { |
| 134 | target_ulong reg = args[0]; |
| 135 | target_ulong *len = args + 0; |
| 136 | target_ulong *char0_7 = args + 1; |
| 137 | target_ulong *char8_15 = args + 2; |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 138 | SpaprVioDevice *sdev; |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 139 | uint8_t buf[16]; |
| 140 | |
David Gibson | 3feef8a | 2011-11-13 17:19:01 +0000 | [diff] [blame] | 141 | sdev = vty_lookup(spapr, reg); |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 142 | if (!sdev) { |
| 143 | return H_PARAMETER; |
| 144 | } |
| 145 | |
| 146 | *len = vty_getchars(sdev, buf, sizeof(buf)); |
| 147 | if (*len < 16) { |
| 148 | memset(buf + *len, 0, 16 - *len); |
| 149 | } |
| 150 | |
| 151 | *char0_7 = be64_to_cpu(*((uint64_t *)buf)); |
| 152 | *char8_15 = be64_to_cpu(*((uint64_t *)buf + 1)); |
| 153 | |
| 154 | return H_SUCCESS; |
| 155 | } |
| 156 | |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 157 | void spapr_vty_create(SpaprVioBus *bus, Chardev *chardev) |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 158 | { |
| 159 | DeviceState *dev; |
| 160 | |
| 161 | dev = qdev_create(&bus->bus, "spapr-vty"); |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 162 | qdev_prop_set_chr(dev, "chardev", chardev); |
| 163 | qdev_init_nofail(dev); |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 164 | } |
| 165 | |
Anthony Liguori | 3954d33 | 2011-12-15 16:31:06 -0600 | [diff] [blame] | 166 | static Property spapr_vty_properties[] = { |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 167 | DEFINE_SPAPR_PROPERTIES(SpaprVioVty, sdev), |
| 168 | DEFINE_PROP_CHR("chardev", SpaprVioVty, chardev), |
Anthony Liguori | 3954d33 | 2011-12-15 16:31:06 -0600 | [diff] [blame] | 169 | DEFINE_PROP_END_OF_LIST(), |
| 170 | }; |
| 171 | |
David Gibson | db1b58e | 2013-07-18 14:32:57 -0500 | [diff] [blame] | 172 | static const VMStateDescription vmstate_spapr_vty = { |
| 173 | .name = "spapr_vty", |
| 174 | .version_id = 1, |
| 175 | .minimum_version_id = 1, |
Juan Quintela | 3aff6c2 | 2014-04-16 15:24:04 +0200 | [diff] [blame] | 176 | .fields = (VMStateField[]) { |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 177 | VMSTATE_SPAPR_VIO(sdev, SpaprVioVty), |
David Gibson | db1b58e | 2013-07-18 14:32:57 -0500 | [diff] [blame] | 178 | |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 179 | VMSTATE_UINT32(in, SpaprVioVty), |
| 180 | VMSTATE_UINT32(out, SpaprVioVty), |
| 181 | VMSTATE_BUFFER(buf, SpaprVioVty), |
David Gibson | db1b58e | 2013-07-18 14:32:57 -0500 | [diff] [blame] | 182 | VMSTATE_END_OF_LIST() |
| 183 | }, |
| 184 | }; |
| 185 | |
Anthony Liguori | 3954d33 | 2011-12-15 16:31:06 -0600 | [diff] [blame] | 186 | static void spapr_vty_class_init(ObjectClass *klass, void *data) |
| 187 | { |
Anthony Liguori | 39bffca | 2011-12-07 21:34:16 -0600 | [diff] [blame] | 188 | DeviceClass *dc = DEVICE_CLASS(klass); |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 189 | SpaprVioDeviceClass *k = VIO_SPAPR_DEVICE_CLASS(klass); |
Anthony Liguori | 3954d33 | 2011-12-15 16:31:06 -0600 | [diff] [blame] | 190 | |
Markus Armbruster | 28b07e7 | 2015-02-27 11:52:17 +0100 | [diff] [blame] | 191 | k->realize = spapr_vty_realize; |
Anthony Liguori | 3954d33 | 2011-12-15 16:31:06 -0600 | [diff] [blame] | 192 | k->dt_name = "vty"; |
| 193 | k->dt_type = "serial"; |
| 194 | k->dt_compatible = "hvterm1"; |
Alexey Kardashevskiy | 29fdedf | 2013-10-11 14:08:20 +1100 | [diff] [blame] | 195 | set_bit(DEVICE_CATEGORY_INPUT, dc->categories); |
Anthony Liguori | 39bffca | 2011-12-07 21:34:16 -0600 | [diff] [blame] | 196 | dc->props = spapr_vty_properties; |
David Gibson | db1b58e | 2013-07-18 14:32:57 -0500 | [diff] [blame] | 197 | dc->vmsd = &vmstate_spapr_vty; |
Anthony Liguori | 3954d33 | 2011-12-15 16:31:06 -0600 | [diff] [blame] | 198 | } |
| 199 | |
Andreas Färber | 8c43a6f | 2013-01-10 16:19:07 +0100 | [diff] [blame] | 200 | static const TypeInfo spapr_vty_info = { |
David Gibson | fd506b4f | 2013-04-07 19:08:16 +0000 | [diff] [blame] | 201 | .name = TYPE_VIO_SPAPR_VTY_DEVICE, |
Anthony Liguori | 39bffca | 2011-12-07 21:34:16 -0600 | [diff] [blame] | 202 | .parent = TYPE_VIO_SPAPR_DEVICE, |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 203 | .instance_size = sizeof(SpaprVioVty), |
Anthony Liguori | 39bffca | 2011-12-07 21:34:16 -0600 | [diff] [blame] | 204 | .class_init = spapr_vty_class_init, |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 205 | }; |
| 206 | |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 207 | SpaprVioDevice *spapr_vty_get_default(SpaprVioBus *bus) |
David Gibson | 98331f8 | 2011-12-12 18:24:33 +0000 | [diff] [blame] | 208 | { |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 209 | SpaprVioDevice *sdev, *selected; |
Anthony Liguori | 0866aca | 2011-12-23 15:34:39 -0600 | [diff] [blame] | 210 | BusChild *kid; |
David Gibson | 98331f8 | 2011-12-12 18:24:33 +0000 | [diff] [blame] | 211 | |
| 212 | /* |
| 213 | * To avoid the console bouncing around we want one VTY to be |
| 214 | * the "default". We haven't really got anything to go on, so |
| 215 | * arbitrarily choose the one with the lowest reg value. |
| 216 | */ |
| 217 | |
| 218 | selected = NULL; |
Anthony Liguori | 0866aca | 2011-12-23 15:34:39 -0600 | [diff] [blame] | 219 | QTAILQ_FOREACH(kid, &bus->bus.children, sibling) { |
| 220 | DeviceState *iter = kid->child; |
| 221 | |
David Gibson | 98331f8 | 2011-12-12 18:24:33 +0000 | [diff] [blame] | 222 | /* Only look at VTY devices */ |
David Gibson | e275934 | 2015-07-02 16:23:25 +1000 | [diff] [blame] | 223 | if (!object_dynamic_cast(OBJECT(iter), TYPE_VIO_SPAPR_VTY_DEVICE)) { |
David Gibson | 98331f8 | 2011-12-12 18:24:33 +0000 | [diff] [blame] | 224 | continue; |
| 225 | } |
| 226 | |
David Gibson | fd506b4f | 2013-04-07 19:08:16 +0000 | [diff] [blame] | 227 | sdev = VIO_SPAPR_DEVICE(iter); |
David Gibson | 98331f8 | 2011-12-12 18:24:33 +0000 | [diff] [blame] | 228 | |
| 229 | /* First VTY we've found, so it is selected for now */ |
| 230 | if (!selected) { |
| 231 | selected = sdev; |
| 232 | continue; |
| 233 | } |
| 234 | |
| 235 | /* Choose VTY with lowest reg value */ |
| 236 | if (sdev->reg < selected->reg) { |
| 237 | selected = sdev; |
| 238 | } |
| 239 | } |
| 240 | |
| 241 | return selected; |
| 242 | } |
| 243 | |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 244 | SpaprVioDevice *vty_lookup(SpaprMachineState *spapr, target_ulong reg) |
David Gibson | 3feef8a | 2011-11-13 17:19:01 +0000 | [diff] [blame] | 245 | { |
David Gibson | ce2918c | 2019-03-06 15:35:37 +1100 | [diff] [blame] | 246 | SpaprVioDevice *sdev; |
David Gibson | 3feef8a | 2011-11-13 17:19:01 +0000 | [diff] [blame] | 247 | |
| 248 | sdev = spapr_vio_find_by_reg(spapr->vio_bus, reg); |
| 249 | if (!sdev && reg == 0) { |
David Gibson | 3feef8a | 2011-11-13 17:19:01 +0000 | [diff] [blame] | 250 | /* Hack for kernel early debug, which always specifies reg==0. |
David Gibson | 98331f8 | 2011-12-12 18:24:33 +0000 | [diff] [blame] | 251 | * We search all VIO devices, and grab the vty with the lowest |
| 252 | * reg. This attempts to mimic existing PowerVM behaviour |
David Gibson | 3feef8a | 2011-11-13 17:19:01 +0000 | [diff] [blame] | 253 | * (early debug does work there, despite having no vty with |
| 254 | * reg==0. */ |
David Gibson | 98331f8 | 2011-12-12 18:24:33 +0000 | [diff] [blame] | 255 | return spapr_vty_get_default(spapr->vio_bus); |
David Gibson | 3feef8a | 2011-11-13 17:19:01 +0000 | [diff] [blame] | 256 | } |
| 257 | |
David Gibson | 0f888bf | 2015-07-02 16:23:24 +1000 | [diff] [blame] | 258 | if (!object_dynamic_cast(OBJECT(sdev), TYPE_VIO_SPAPR_VTY_DEVICE)) { |
| 259 | return NULL; |
| 260 | } |
| 261 | |
David Gibson | 3feef8a | 2011-11-13 17:19:01 +0000 | [diff] [blame] | 262 | return sdev; |
| 263 | } |
| 264 | |
Andreas Färber | 83f7d43 | 2012-02-09 15:20:55 +0100 | [diff] [blame] | 265 | static void spapr_vty_register_types(void) |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 266 | { |
David Gibson | 1fc0253 | 2011-12-12 18:24:28 +0000 | [diff] [blame] | 267 | spapr_register_hypercall(H_PUT_TERM_CHAR, h_put_term_char); |
| 268 | spapr_register_hypercall(H_GET_TERM_CHAR, h_get_term_char); |
Anthony Liguori | 39bffca | 2011-12-07 21:34:16 -0600 | [diff] [blame] | 269 | type_register_static(&spapr_vty_info); |
David Gibson | 4040ab7 | 2011-04-01 15:15:21 +1100 | [diff] [blame] | 270 | } |
Andreas Färber | 83f7d43 | 2012-02-09 15:20:55 +0100 | [diff] [blame] | 271 | |
| 272 | type_init(spapr_vty_register_types) |