WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] linux/x86: Obtain EDID info from Xen

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] linux/x86: Obtain EDID info from Xen
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 21 Jun 2007 05:04:47 -0700
Delivery-date: Thu, 21 Jun 2007 05:03:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1182364134 -3600
# Node ID db1ad4e3caf50efd45726d4b6e483869e20a8e51
# Parent  9f2badfda534e764a5c14291909595bbb8af2ee5
linux/x86: Obtain EDID info from Xen
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 arch/i386/kernel/setup-xen.c     |    5 ++++-
 arch/x86_64/kernel/setup-xen.c   |    2 +-
 drivers/xen/core/firmware.c      |   19 +++++++++++++++++++
 include/xen/firmware.h           |    1 +
 include/xen/interface/platform.h |   12 ++++++++++--
 5 files changed, 35 insertions(+), 4 deletions(-)

diff -r 9f2badfda534 -r db1ad4e3caf5 arch/i386/kernel/setup-xen.c
--- a/arch/i386/kernel/setup-xen.c      Wed Jun 20 19:18:46 2007 +0100
+++ b/arch/i386/kernel/setup-xen.c      Wed Jun 20 19:28:54 2007 +0100
@@ -156,6 +156,9 @@ struct sys_desc_table_struct {
 };
 struct edid_info edid_info;
 EXPORT_SYMBOL_GPL(edid_info);
+#ifndef CONFIG_XEN
+#define copy_edid() (edid_info = EDID_INFO)
+#endif
 struct ist_info ist_info;
 #if defined(CONFIG_X86_SPEEDSTEP_SMI) || \
        defined(CONFIG_X86_SPEEDSTEP_SMI_MODULE)
@@ -1624,7 +1627,7 @@ void __init setup_arch(char **cmdline_p)
        ROOT_DEV = MKDEV(UNNAMED_MAJOR,0);
        drive_info = DRIVE_INFO;
        screen_info = SCREEN_INFO;
-       edid_info = EDID_INFO;
+       copy_edid();
        apm_info.bios = APM_BIOS_INFO;
        ist_info = IST_INFO;
        saved_videomode = VIDEO_MODE;
diff -r 9f2badfda534 -r db1ad4e3caf5 arch/x86_64/kernel/setup-xen.c
--- a/arch/x86_64/kernel/setup-xen.c    Wed Jun 20 19:18:46 2007 +0100
+++ b/arch/x86_64/kernel/setup-xen.c    Wed Jun 20 19:28:54 2007 +0100
@@ -616,7 +616,7 @@ void __init setup_arch(char **cmdline_p)
        } else
                screen_info.orig_video_isVGA = 0;
 
-       edid_info = EDID_INFO;
+       copy_edid();
        saved_video_mode = SAVED_VIDEO_MODE;
        bootloader_type = LOADER_TYPE;
 
diff -r 9f2badfda534 -r db1ad4e3caf5 drivers/xen/core/firmware.c
--- a/drivers/xen/core/firmware.c       Wed Jun 20 19:18:46 2007 +0100
+++ b/drivers/xen/core/firmware.c       Wed Jun 20 19:28:54 2007 +0100
@@ -2,6 +2,7 @@
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/edd.h>
+#include <video/edid.h>
 #include <xen/interface/platform.h>
 #include <asm/hypervisor.h>
 
@@ -54,3 +55,21 @@ void __init copy_edd(void)
        }
 }
 #endif
+
+void __init copy_edid(void)
+{
+#if defined(CONFIG_FIRMWARE_EDID) && defined(CONFIG_X86)
+       xen_platform_op_t op;
+
+       if (!is_initial_xendomain())
+               return;
+
+       op.cmd = XENPF_firmware_info;
+       op.u.firmware_info.index = 0;
+       op.u.firmware_info.type = XEN_FW_VBEDDC_INFO;
+       set_xen_guest_handle(op.u.firmware_info.u.vbeddc_info.edid,
+                            edid_info.dummy);
+       if (HYPERVISOR_platform_op(&op) != 0)
+               memset(edid_info.dummy, 0x13, sizeof(edid_info.dummy));
+#endif
+}
diff -r 9f2badfda534 -r db1ad4e3caf5 include/xen/firmware.h
--- a/include/xen/firmware.h    Wed Jun 20 19:18:46 2007 +0100
+++ b/include/xen/firmware.h    Wed Jun 20 19:28:54 2007 +0100
@@ -2,5 +2,6 @@
 #define __XEN_FIRMWARE_H__
 
 void copy_edd(void);
+void copy_edid(void);
 
 #endif /* __XEN_FIRMWARE_H__ */
diff -r 9f2badfda534 -r db1ad4e3caf5 include/xen/interface/platform.h
--- a/include/xen/interface/platform.h  Wed Jun 20 19:18:46 2007 +0100
+++ b/include/xen/interface/platform.h  Wed Jun 20 19:28:54 2007 +0100
@@ -115,8 +115,9 @@ DEFINE_XEN_GUEST_HANDLE(xenpf_platform_q
 DEFINE_XEN_GUEST_HANDLE(xenpf_platform_quirk_t);
 
 #define XENPF_firmware_info       50
-#define XEN_FW_DISK_INFO          1
-#define XEN_FW_DISK_MBR_SIGNATURE 2
+#define XEN_FW_DISK_INFO          1 /* from int 13 AH=08/41/48 */
+#define XEN_FW_DISK_MBR_SIGNATURE 2 /* from MBR offset 0x1b8 */
+#define XEN_FW_VBEDDC_INFO        3 /* from int 10 AX=4f15 */
 struct xenpf_firmware_info {
     /* IN variables. */
     uint32_t type;
@@ -140,6 +141,13 @@ struct xenpf_firmware_info {
             uint8_t device;                   /* bios device number  */
             uint32_t mbr_signature;           /* offset 0x1b8 in mbr */
         } disk_mbr_signature; /* XEN_FW_DISK_MBR_SIGNATURE */
+        struct {
+            /* Int10, AX=4F15: Get EDID info. */
+            uint8_t capabilities;
+            uint8_t edid_transfer_time;
+            /* must refer to 128-byte buffer */
+            XEN_GUEST_HANDLE(uint8_t) edid;
+        } vbeddc_info; /* XEN_FW_VBEDDC_INFO */
     } u;
 };
 typedef struct xenpf_firmware_info xenpf_firmware_info_t;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] linux/x86: Obtain EDID info from Xen, Xen patchbot-linux-2.6.18-xen <=