]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/Include/IndustryStandard/Xen/io/console.h
Ovmf/Xen: add Xen PV console SerialPortLib driver
[mirror_edk2.git] / OvmfPkg / Include / IndustryStandard / Xen / io / console.h
diff --git a/OvmfPkg/Include/IndustryStandard/Xen/io/console.h b/OvmfPkg/Include/IndustryStandard/Xen/io/console.h
new file mode 100644 (file)
index 0000000..f1caa97
--- /dev/null
@@ -0,0 +1,51 @@
+/******************************************************************************\r
+ * console.h\r
+ *\r
+ * Console I/O interface for Xen guest OSes.\r
+ *\r
+ * Permission is hereby granted, free of charge, to any person obtaining a copy\r
+ * of this software and associated documentation files (the "Software"), to\r
+ * deal in the Software without restriction, including without limitation the\r
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\r
+ * sell copies of the Software, and to permit persons to whom the Software is\r
+ * furnished to do so, subject to the following conditions:\r
+ *\r
+ * The above copyright notice and this permission notice shall be included in\r
+ * all copies or substantial portions of the Software.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\r
+ * DEALINGS IN THE SOFTWARE.\r
+ *\r
+ * Copyright (c) 2005, Keir Fraser\r
+ */\r
+\r
+#ifndef __XEN_PUBLIC_IO_CONSOLE_H__\r
+#define __XEN_PUBLIC_IO_CONSOLE_H__\r
+\r
+typedef UINT32 XENCONS_RING_IDX;\r
+\r
+#define MASK_XENCONS_IDX(idx, ring) ((idx) & (sizeof(ring)-1))\r
+\r
+struct xencons_interface {\r
+    char in[1024];\r
+    char out[2048];\r
+    XENCONS_RING_IDX in_cons, in_prod;\r
+    XENCONS_RING_IDX out_cons, out_prod;\r
+};\r
+\r
+#endif /* __XEN_PUBLIC_IO_CONSOLE_H__ */\r
+\r
+/*\r
+ * Local variables:\r
+ * mode: C\r
+ * c-file-style: "BSD"\r
+ * c-basic-offset: 4\r
+ * tab-width: 4\r
+ * indent-tabs-mode: nil\r
+ * End:\r
+ */\r