summaryrefslogtreecommitdiffstats
path: root/src/include/kernel/cpuid.H
blob: f2ee0244296f5ff7a3bb7e43e3a3f6cd7ba8517c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef __KERNEL_CPUID_H
#define __KERNEL_CPUID_H

#include <stdint.h>
#include <arch/ppc.H>
#include <sys/misc.h>

namespace CpuID
{
    /** @fn getCpuType()
     *  @brief Decode the processor type from the PVR register.
     *
     *  These values come from the pervasive spec for each processor.
     *
     *  @return ProcessorCoreType - Value from enumeration for this core.
     */
    ProcessorCoreType getCpuType();

    /** @fn getCpuDD
     *  @brief Decode the processor DD level from the PVR register.
     *
     *  These offsets come from the pervasive spec for each processor.
     *
     *  @return 1 byte DD level as <major nibble, minor nibble>.
     */
    uint8_t getCpuDD();
};
#endif
OpenPOWER on IntegriCloud