Project

General

Profile

Bug #1128

WARNING: kb8042: inconsistent getinfo(9E) implementation

Added by Alexey Zaytsev about 8 years ago. Updated about 8 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
kernel
Start date:
2011-06-19
Due date:
% Done:

20%

Estimated time:
Difficulty:
Medium
Tags:

Description

Getting this warning first thing when running in qemu/kvm:

SunOS Release 5.11 Version illumos-gate-xl0 64-bit
Copyright (c) 1983, 2010, Oracle and/or its affiliates. All rights reserved.
DEBUG enabled
WARNING: kb8042: inconsistent getinfo(9E) implementation

Seems to be harmless, but anyway.

History

#1

Updated by Garrett D'Amore about 8 years ago

Its harmless as long as you don't try to do Dynamic Reconfiguration on this device. It should be fixed.

That said, I have never seen this error before, and I have just checked the getinfo() implementation of kb8042. It is correct. This strongly smells of something else in your system that is bad... perhaps you have heap corruption? Is this 100% reproducible? If so I'd like to get remote access to your system so I can debug it.

#2

Updated by Alexey Zaytsev about 8 years ago

Garrett D'Amore wrote:

Its harmless as long as you don't try to do Dynamic Reconfiguration on this device. It should be fixed.

That said, I have never seen this error before, and I have just checked the getinfo() implementation of kb8042. It is correct. This strongly smells of something else in your system that is bad... perhaps you have heap corruption? Is this 100% reproducible?

Yes, it seems to happen on every boot, including cold. I'm only getting the warning when running qemu with the default pc platform, and not with the q35 (pci-e).

If so I'd like to get remote access to your system so I can debug it.

Access info sent.

#3

Updated by Garrett D'Amore about 8 years ago

  • % Done changed from 0 to 20

So the problem is this:

Jun 23 01:46:06 oi genunix: [ID 936769 kern.info] kb80421 is /pci@0,0/isa@1/i8042@1,60/keyboard@0
Jun 23 01:46:06 oi kb8042: [ID 464191 kern.info] kb8042 instance #1 READY
Jun 23 01:46:06 oi genunix: [ID 913973 kern.warning] WARNING: kb8042: inconsistent getinfo(9E) implementation
xl0@oi:~# grep kb8042 /etc/path_to_inst
"/pci@0,0/isa@1f/i8042@1,60/keyboard@0" 0 "kb8042" 
"/pci@0,0/isa@1/i8042@1,60/keyboard@0" 1 "kb8042" 

Normally kb8042 doesn't move around. The fact that it did here is the problem. The getinfo(9e) implementation for kb8042 doesn't like this, as it assumes that it will always be instance 0:

    case DDI_INFO_DEVT2INSTANCE:
        *result = (void *)0;
        error = DDI_SUCCESS;
        break;

I recommend changing this to use the following:

        if (kb8042_dip == NULL) {
            error = DDI_FAILURE;
        } else {
            *result = (void *)ddi_get_instance(kb8042_dip);
            error = DDI_SUCCESS;
        }
        break;

Note that this complaint is probably benign, since nothing is ever going to try to DDI detach kb8042.

Also available in: Atom PDF