diff options
author | Henry Zhao <henry.zhao@oracle.com> | 2012-10-05 12:41:36 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-10-21 11:36:23 -0700 |
commit | 2edddd4c4eb4258f4347c40e76bf0d5f1bcf51a7 (patch) | |
tree | 410dc09deeb489250eab6e4e36c672cc3ac15a75 /src/solx_devfs.c | |
parent | 630b00a0847df9acf53391e6415bdfcd13fdae68 (diff) | |
download | libpciaccess-2edddd4c4eb4258f4347c40e76bf0d5f1bcf51a7.tar.gz libpciaccess-2edddd4c4eb4258f4347c40e76bf0d5f1bcf51a7.tar.bz2 libpciaccess-2edddd4c4eb4258f4347c40e76bf0d5f1bcf51a7.zip |
libpciaccess: implementation of boot_vga in Solaris
Signed-off-by: Henry Zhao <henry.zhao@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/solx_devfs.c')
-rw-r--r-- | src/solx_devfs.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/solx_devfs.c b/src/solx_devfs.c index bb97f56..b096d7e 100644 --- a/src/solx_devfs.c +++ b/src/solx_devfs.c @@ -796,10 +796,13 @@ pci_device_solx_devfs_probe( struct pci_device * dev ) } if (args.node != DI_NODE_NIL) { + int *prop; #ifdef __sparc di_minor_t minor; #endif + priv->is_primary = 0; + #ifdef __sparc if (minor = di_minor_next(args.node, DI_MINOR_NIL)) MAPPING_DEV_PATH(dev) = di_devfs_minor_path (minor); @@ -807,6 +810,12 @@ pci_device_solx_devfs_probe( struct pci_device * dev ) MAPPING_DEV_PATH(dev) = NULL; #endif + if (di_prop_lookup_ints(DDI_DEV_T_ANY, args.node, + "primary-controller", &prop) >= 1) { + if (prop[0]) + priv->is_primary = 1; + } + /* * It will succeed for sure, because it was * successfully called in find_target_node @@ -1131,6 +1140,15 @@ pci_device_solx_devfs_write( struct pci_device * dev, const void * data, return (err); } +static int pci_device_solx_devfs_boot_vga(struct pci_device *dev) +{ + struct pci_device_private *priv = + (struct pci_device_private *) dev; + + return (priv->is_primary); + +} + static struct pci_io_handle * pci_device_solx_devfs_open_legacy_io(struct pci_io_handle *ret, struct pci_device *dev, @@ -1263,6 +1281,7 @@ static const struct pci_system_methods solx_devfs_methods = { .write = pci_device_solx_devfs_write, .fill_capabilities = pci_fill_capabilities_generic, + .boot_vga = pci_device_solx_devfs_boot_vga, .open_legacy_io = pci_device_solx_devfs_open_legacy_io, .read32 = pci_device_solx_devfs_read32, |