diff options
author | Mark Johnson <Mark.Johnson@Sun.COM> | 2008-09-15 15:09:45 -0700 |
---|---|---|
committer | Mark Johnson <Mark.Johnson@Sun.COM> | 2008-09-15 15:09:45 -0700 |
commit | adc586debf12d2592024c0b8b9e44ffa104f858c (patch) | |
tree | 189b4a865d30882c4001014b69447e6bdaaa46f7 /usr/src/uts/intel/io/ucode_drv.c | |
parent | 875a4abcc45eff5fe347622080ebe938010f5acb (diff) | |
download | illumos-joyent-adc586debf12d2592024c0b8b9e44ffa104f858c.tar.gz |
6747590 microcode update support for AMD
Contributed by Hans Rosenfeld <hans.rosenfeld@amd.com>
Diffstat (limited to 'usr/src/uts/intel/io/ucode_drv.c')
-rw-r--r-- | usr/src/uts/intel/io/ucode_drv.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr/src/uts/intel/io/ucode_drv.c b/usr/src/uts/intel/io/ucode_drv.c index d71b0bcbe5..6a63bba8a9 100644 --- a/usr/src/uts/intel/io/ucode_drv.c +++ b/usr/src/uts/intel/io/ucode_drv.c @@ -138,6 +138,12 @@ ucode_open(dev_t *dev, int flag, int otyp, cred_t *cr) static int ucode_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *cr, int *rval) { + /* + * Make sure that the ucode ops pointer has been set up. + */ + if (!ucode) + return (EIO); + switch (cmd) { case UCODE_GET_VERSION: { int size; @@ -218,7 +224,7 @@ ucode_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, cred_t *cr, int *rval) return (EFAULT); } - if ((rc = ucode_validate(ucodep, size)) != EM_OK) { + if ((rc = ucode->validate(ucodep, size)) != EM_OK) { kmem_free(ucodep, size); STRUCT_FSET(h, uw_errno, rc); if (ddi_copyout(STRUCT_BUF(h), (void *)arg, |