On Sat, 2013-06-15 at 08:15 +0100, Ian Campbell wrote: 
> Why are you filing this as a new bug?
Sorry... I had meant the original bug to be just a "enable build for
i386/amd64"... and the other one was more "add new features"... and when
I wrote it, it was already quite late and I fell asleep before I could
forcemerge it. O:-)

> You can follow up to an existing
> bug by writing to nn...@bugs.debian.org.
Sure.

> I have merged the previous bug
> with this one.
Thanks.


> Is there any way (via /proc or /sys) to distinguish the different x86
> QNAP platforms?
You talk about the concrete model name? Uhm... well haven't found
anything... dmidecode gives just what's attached.


> Which qcontrol.conf did you use? You will need one for your platform.
Ah? Oh... used none and simply expected stuff would run out of the box..

> You may also need to author a supporting C module for your platform
> (which is the loaded by qcontrol.conf).
AFAIU,... the current platform modules all use a serial device for
sending LED/buzzer/fan commands, right?
I've looked a bit around what QNAP itself doesn and it seems to work
different.

They offer a GPL tarball bundle on their homepage, which also contains
their kernel (one can diff it against 3.4.6) to see what they
changed.... it's a lot... they patch around in all different places from
network drivers, over SATA drivers to the dm code.
To me that makes the QNAP code even less trustworthy... since usually
the kernel developers know what they do.

Anyway,... it also contains many patches for GPIO stuff (I didn't
include these) and also the qnap drivers I've included in
qnap-linux.tar.xz.
Seems this contains amongst others the LED/buzzer/fan stuff we want to
use.

But also much more... I'm not a kernel expert but it seems they also
signal RAID stuff and other more system deep things... (last power
state, etc.) via the PIC controller... I really think we should leave
the hands of all these... god alone know what it can break.


Then they have a /dev/pic... and pic_raw calls this via some ioctl...



> > There doesn't seem to be that gpio_keys module, or any such device in 
> > /dev/input.
> 
> This is a platform specific driver on ARM. I'm not sure it is so common
> to use gpio in this way on x86 platforms so it is possible that the
> buttons etc are exposed differently. If they were using GPIO for it then
> you would need to write a suitable platform specific driver.
No idea about that... at least they don't have gpio_keys loaded...

For what are you actually using the GPIOs? Just for the buttons? Or also for 
the LEDs/buzzer?


> LEDs on the ARM platforms are controlled by the PIC. Do you know if the
> x86 versions have the same one or even if they have one at all? You may
> need to look into the qnap kernel drivers to figure it out.
Ah... I see... well... yeah I think they also have a PIC then... but no idea 
which one.

But with qcontrol... do you write your own PIC driver? Or is some
generic one used... cause obviously you don't include all the kernel
modifications they make.


> Being an x86 platform I expect it uses the usual x86 mechanisms for
> fancontrol and not the custom PIC used on ARM.
That seems to be true... at least when I use pic_raw within the original
qnap firmware... the "well known" commands for the fan seem to have no
effect.


Cheers,
Chris.

Attachment: qnap-linux.tar.xz
Description: application/xz-compressed-tar

# dmidecode 2.12
SMBIOS 2.6 present.
37 structures occupying 1422 bytes.
Table at 0x000E0840.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
        Vendor: Phoenix Technologies Ltd.
        Version: QU95PR51
        Release Date: 11/15/2012
        Address: 0xE0000
        Runtime Size: 128 kB
        ROM Size: 2048 kB
        Characteristics:
                PCI is supported
                BIOS is upgradeable
                BIOS shadowing is allowed
                Boot from CD is supported
                Selectable boot is supported
                EDD is supported
                Print screen service is supported (int 5h)
                8042 keyboard services are supported (int 9h)
                Serial services are supported (int 14h)
                Printer services are supported (int 17h)
                CGA/mono video services are supported (int 10h)
                NEC PC-98
                ACPI is supported
                USB legacy is supported
                BIOS boot specification is supported
                Function key-initiated network boot is supported
                Targeted content distribution is supported
        BIOS Revision: 0.1

Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: Intel Corporation
        Product Name: Milstead Platform
        Version: 2.1
        Serial Number: System Serial Number
        UUID: 5C4606FA-192F-453A-B299-7B088C63BB9B
        Wake-up Type: Power Switch
        SKU Number: System SKUNumber
        Family: CedarTrail System

Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
        Manufacturer: Intel Corporation
        Product Name: Granite Well
        Version: FABA
        Serial Number: 1.0
        Asset Tag: Base Board Asset Tag
        Features:
                Board is a hosting board
                Board is replaceable
        Location In Chassis: Part Component
        Chassis Handle: 0x0000
        Type: Motherboard
        Contained Object Handles: 0

Handle 0x0003, DMI type 3, 21 bytes
Chassis Information
        Manufacturer: Intel Corporation
        Type: Laptop
        Lock: Not Present
        Version: 1.0
        Serial Number: serial#
        Asset Tag: Asset Tag
        Boot-up State: Safe
        Power Supply State: Safe
        Thermal State: Other
        Security Status: Other
        OEM Information: 0x00000000
        Height: Unspecified
        Number Of Power Cords: 1
        Contained Elements: 0

Handle 0x0004, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: None
        Internal Connector Type: None
        External Reference Designator: Keyboard
        External Connector Type: Access Bus (USB)
        Port Type: Keyboard Port

Handle 0x0005, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: None
        Internal Connector Type: None
        External Reference Designator: Mouse
        External Connector Type: Access Bus (USB)
        Port Type: Mouse Port

Handle 0x0006, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: None
        Internal Connector Type: Other
        External Reference Designator: COM 1
        External Connector Type: None
        Port Type: Serial Port 16550A Compatible

Handle 0x0007, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: None
        Internal Connector Type: None
        External Reference Designator: USB1.1 - 1#
        External Connector Type: Access Bus (USB)
        Port Type: USB

Handle 0x0008, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: None
        Internal Connector Type: None
        External Reference Designator: USB1.1 - 2#
        External Connector Type: Access Bus (USB)
        Port Type: USB

Handle 0x0009, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: None
        Internal Connector Type: None
        External Reference Designator: USB1.1 - 3#
        External Connector Type: Access Bus (USB)
        Port Type: USB

Handle 0x000A, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: None
        Internal Connector Type: None
        External Reference Designator: USB1.1 - 4#
        External Connector Type: Access Bus (USB)
        Port Type: USB

Handle 0x000B, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: None
        Internal Connector Type: None
        External Reference Designator: USB2.0 - 5#
        External Connector Type: Access Bus (USB)
        Port Type: USB

Handle 0x000C, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: None
        Internal Connector Type: None
        External Reference Designator: Ethernet
        External Connector Type: RJ-45
        Port Type: Network Port

Handle 0x000D, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: SATA Port 1
        Internal Connector Type: SAS/SATA Plug Receptacle
        External Reference Designator: None
        External Connector Type: None
        Port Type: SATA

Handle 0x000E, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: SATA Port 2
        Internal Connector Type: SAS/SATA Plug Receptacle
        External Reference Designator: None
        External Connector Type: None
        Port Type: SATA

Handle 0x000F, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: SATA Port 3
        Internal Connector Type: SAS/SATA Plug Receptacle
        External Reference Designator: None
        External Connector Type: None
        Port Type: SATA

Handle 0x0010, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: SATA Port 4
        Internal Connector Type: SAS/SATA Plug Receptacle
        External Reference Designator: None
        External Connector Type: None
        Port Type: SATA

Handle 0x0011, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: None
        Internal Connector Type: None
        External Reference Designator: eSATA Port 1
        External Connector Type: SAS/SATA Plug Receptacle
        Port Type: SATA

Handle 0x0012, DMI type 8, 9 bytes
Port Connector Information
        Internal Reference Designator: None
        Internal Connector Type: None
        External Reference Designator: eSATA Port 2
        External Connector Type: SAS/SATA Plug Receptacle
        Port Type: SATA

Handle 0x0013, DMI type 9, 17 bytes
System Slot Information
        Designation: PCI-Express 1 X1
        Type: x1 PCI Express
        Current Usage: Available
        Length: Short
        ID: 1
        Characteristics:
                3.3 V is provided
                Opening is shared
                PME signal is supported
        Bus Address: 0000:00:00.0

Handle 0x0014, DMI type 10, 6 bytes
On Board Device Information
        Type: Video
        Status: Enabled
        Description: Intel(R) Cedarview Graphics Controller

Handle 0x0015, DMI type 10, 6 bytes
On Board Device Information
        Type: Sound
        Status: Enabled
        Description: Intel(R) Azalia Audio Device

Handle 0x0016, DMI type 11, 5 bytes
OEM Strings
        String 1: This is the Intel CedarTrail CRB Platform

Handle 0x0017, DMI type 12, 5 bytes
System Configuration Options

Handle 0x0018, DMI type 13, 22 bytes
BIOS Language Information
        Language Description Format: Abbreviated
        Installable Languages: 4
                en-US
                fr-FR
                ja-JP
                ko-KR
        Currently Installed Language: en-US

Handle 0x0019, DMI type 32, 11 bytes
System Boot Information
        Status: No errors detected

Handle 0x001A, DMI type 4, 42 bytes
Processor Information
        Socket Designation: CPU
        Type: Central Processor
        Family: Atom
        Manufacturer: Intel(R) Corporation
        ID: 61 06 03 00 FF FB EB BF
        Signature: Type 0, Family 6, Model 54, Stepping 1
        Flags:
                FPU (Floating-point unit on-chip)
                VME (Virtual mode extension)
                DE (Debugging extension)
                PSE (Page size extension)
                TSC (Time stamp counter)
                MSR (Model specific registers)
                PAE (Physical address extension)
                MCE (Machine check exception)
                CX8 (CMPXCHG8 instruction supported)
                APIC (On-chip APIC hardware supported)
                SEP (Fast system call)
                MTRR (Memory type range registers)
                PGE (Page global enable)
                MCA (Machine check architecture)
                CMOV (Conditional move instruction supported)
                PAT (Page attribute table)
                PSE-36 (36-bit page size extension)
                CLFSH (CLFLUSH instruction supported)
                DS (Debug store)
                ACPI (ACPI supported)
                MMX (MMX technology supported)
                FXSR (FXSAVE and FXSTOR instructions supported)
                SSE (Streaming SIMD extensions)
                SSE2 (Streaming SIMD extensions 2)
                SS (Self-snoop)
                HTT (Multi-threading)
                TM (Thermal monitor supported)
                PBE (Pending break enabled)
        Version: Intel(R) Atom(TM) CPU D2701   @ 2.13GHz
        Voltage: 0.8 V
        External Clock: 133 MHz
        Max Speed: 2131 MHz
        Current Speed: 2128 MHz
        Status: Populated, Enabled
        Upgrade: Other
        L1 Cache Handle: 0x001B
        L2 Cache Handle: 0x001C
        L3 Cache Handle: Not Provided
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Part Number: TBD By OEM
        Core Count: 2
        Core Enabled: 2
        Thread Count: 4
        Characteristics:
                64-bit capable

Handle 0x001B, DMI type 7, 19 bytes
Cache Information
        Socket Designation: L1 Cache
        Configuration: Enabled, Not Socketed, Level 1
        Operational Mode: Write Back
        Location: Internal
        Installed Size: 32 kB
        Maximum Size: 32 kB
        Supported SRAM Types:
                Synchronous
        Installed SRAM Type: Synchronous
        Speed: Unknown
        Error Correction Type: Single-bit ECC
        System Type: Data
        Associativity: 8-way Set-associative

Handle 0x001C, DMI type 7, 19 bytes
Cache Information
        Socket Designation: L2 Cache
        Configuration: Enabled, Not Socketed, Level 2
        Operational Mode: Write Back
        Location: Internal
        Installed Size: 512 kB
        Maximum Size: 512 kB
        Supported SRAM Types:
                Synchronous
        Installed SRAM Type: Synchronous
        Speed: Unknown
        Error Correction Type: Single-bit ECC
        System Type: Data
        Associativity: 8-way Set-associative

Handle 0x001D, DMI type 16, 15 bytes
Physical Memory Array
        Location: System Board Or Motherboard
        Use: System Memory
        Error Correction Type: None
        Maximum Capacity: 4 GB
        Error Information Handle: Not Provided
        Number Of Devices: 2

Handle 0x001E, DMI type 17, 28 bytes
Memory Device
        Array Handle: 0x001D
        Error Information Handle: Not Provided
        Total Width: 64 bits
        Data Width: 64 bits
        Size: 2048 MB
        Form Factor: SODIMM
        Set: None
        Locator: DIMM0
        Bank Locator: BANK 0
        Type: DDR3
        Type Detail: Synchronous
        Speed: 1066 MHz
        Manufacturer: 20
        Serial Number: 00000000
        Asset Tag: Unknown
        Part Number:                   
        Rank: Unknown

Handle 0x001F, DMI type 20, 19 bytes
Memory Device Mapped Address
        Starting Address: 0x00000000000
        Ending Address: 0x0007FFFFFFF
        Range Size: 2 GB
        Physical Device Handle: 0x001E
        Memory Array Mapped Address Handle: 0x0022
        Partition Row Position: Unknown

Handle 0x0020, DMI type 17, 28 bytes
Memory Device
        Array Handle: 0x001D
        Error Information Handle: Not Provided
        Total Width: 64 bits
        Data Width: 64 bits
        Size: 1024 MB
        Form Factor: SODIMM
        Set: None
        Locator: DIMM1
        Bank Locator: BANK 1
        Type: DDR3
        Type Detail: Synchronous
        Speed: 1066 MHz
        Manufacturer: 20
        Serial Number: 00000000
        Asset Tag: Unknown
        Part Number:                   
        Rank: Unknown

Handle 0x0021, DMI type 20, 19 bytes
Memory Device Mapped Address
        Starting Address: 0x00080000000
        Ending Address: 0x000BFFFFFFF
        Range Size: 1 GB
        Physical Device Handle: 0x0020
        Memory Array Mapped Address Handle: 0x0022
        Partition Row Position: Unknown

Handle 0x0022, DMI type 19, 15 bytes
Memory Array Mapped Address
        Starting Address: 0x00000000000
        Ending Address: 0x000BFFFFFFF
        Range Size: 3 GB
        Physical Array Handle: 0x001D
        Partition Width: 2

Handle 0x0023, DMI type 15, 29 bytes
System Event Log
        Area Length: 130 bytes
        Header Start Offset: 0x0000
        Header Length: 16 bytes
        Data Start Offset: 0x0010
        Access Method: General-purpose non-volatile data functions
        Access Address: 0x00F0
        Status: Valid, Not Full
        Change Token: 0x00000007
        Header Format: Type 1
        Supported Log Type Descriptors: 3
        Descriptor 1: POST error
        Data Format 1: POST results bitmap
        Descriptor 2: Single-bit ECC memory error
        Data Format 2: Multiple-event
        Descriptor 3: Multi-bit ECC memory error
        Data Format 3: Multiple-event

Handle 0xFEFF, DMI type 127, 4 bytes
End Of Table

Reply via email to