[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Add hypercall function for retrieving EDID info
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Date 1182363848 -3600 # Node ID cf846f4d756f53a0cc8d4f33e6a2ef7de82db8cc # Parent 6310aebd34a6e9f2b7751edd22d6f8c6da44b244 Add hypercall function for retrieving EDID info Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx> Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> --- xen/arch/x86/platform_hypercall.c | 24 ++++++++++++++++++++++++ xen/include/public/platform.h | 12 ++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-) diff -r 6310aebd34a6 -r cf846f4d756f xen/arch/x86/platform_hypercall.c --- a/xen/arch/x86/platform_hypercall.c Wed Jun 20 19:08:45 2007 +0100 +++ b/xen/arch/x86/platform_hypercall.c Wed Jun 20 19:24:08 2007 +0100 @@ -24,6 +24,9 @@ #include <asm/mtrr.h> #include "cpu/mtrr/mtrr.h" +extern uint16_t boot_edid_caps; +extern uint8_t boot_edid_info[]; + #ifndef COMPAT typedef long ret_t; DEFINE_SPINLOCK(xenpf_lock); @@ -217,6 +220,27 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe ? -EFAULT : 0); break; } + case XEN_FW_VBEDDC_INFO: + ret = -ESRCH; + if ( op->u.firmware_info.index != 0 ) + break; + if ( *(u32 *)bootsym(boot_edid_info) == 0x13131313 ) + break; + + op->u.firmware_info.u.ddc_info.capabilities = + bootsym(boot_edid_caps); + op->u.firmware_info.u.ddc_info.edid_transfer_time = + bootsym(boot_edid_caps) >> 8; + + ret = 0; + if ( copy_field_to_guest(u_xenpf_op, op, u.firmware_info. + u.ddc_info.capabilities) || + copy_field_to_guest(u_xenpf_op, op, u.firmware_info. + u.ddc_info.edid_transfer_time) || + copy_to_compat(op->u.firmware_info.u.ddc_info.edid, + bootsym(boot_edid_info), 128) ) + ret = -EFAULT; + break; default: ret = -EINVAL; break; diff -r 6310aebd34a6 -r cf846f4d756f xen/include/public/platform.h --- a/xen/include/public/platform.h Wed Jun 20 19:08:45 2007 +0100 +++ b/xen/include/public/platform.h Wed Jun 20 19:24:08 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; + } ddc_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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |