blob: b911ea85c093add0d7a9c3a7968c79d1608e4ca6 [file] [log] [blame]
Ken Cox12e364b2014-03-04 07:58:07 -06001/* controlvm_direct.c
2 *
3 * Copyright © 2010 - 2013 UNISYS CORPORATION
4 * All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or (at
9 * your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
14 * NON INFRINGEMENT. See the GNU General Public License for more
15 * details.
16 */
17
18/* This is a controlvm-related code that is dependent upon firmware running
19 * on a virtual partition.
20 */
21
22#include "globals.h"
23#include "uisutils.h"
Ken Coxbd5b9b32014-03-13 15:39:22 -050024#include "controlvm.h"
Ken Cox12e364b2014-03-04 07:58:07 -060025#define CURRENT_FILE_PC VISOR_CHIPSET_PC_controlvm_direct_c
26
27
28/* We can fill in this code when we learn how to make vmcalls... */
29
30
31
32int controlvm_init(void)
33{
34 return 0;
35}
36
37
38
39void controlvm_deinit(void)
40{
41}
42
43
44
45HOSTADDRESS controlvm_get_channel_address(void)
46{
47 static BOOL warned = FALSE;
48 U64 addr = 0;
49
50 U32 size = 0;
51
52 if (!VMCALL_SUCCESSFUL(Issue_VMCALL_IO_CONTROLVM_ADDR(&addr, &size))) {
53 if (!warned) {
54 ERRDRV("%s - vmcall to determine controlvm channel addr failed",
55 __func__);
56 warned = TRUE;
57 }
58 return 0;
59 }
60 INFODRV("controlvm addr=%Lx", addr);
61 return addr;
62}