2 Copyright © 1995-2017, The AROS Development Team. All rights reserved.
8 #include <aros/kernel.h>
9 #include <exec/execbase.h>
10 #include <proto/exec.h>
12 #include <kernel_base.h>
13 #include "kernel_intern.h"
16 /*****************************************************************************
19 #include <proto/kernel.h>
21 AROS_LH1(intptr_t, KrnGetSystemAttr
,
24 AROS_LHA(uint32_t, id
, D0
),
27 struct KernelBase
*, KernelBase
, 29, Kernel
)
30 Get value of internal system attributes.
31 Currently defined attributes are:
33 KATTR_Architecture [.G] (char *) - Name of architecture the kernel built for.
35 KATTR_PeripheralBase [.G] IPTR - IO Base address for ARM peripherals
38 id - ID of the attribute to get
41 Value of the attribute
53 ******************************************************************************/
57 struct PlatformData
*pdata
= KernelBase
->kb_PlatformData
;
58 struct APICData
*apicData
= pdata
->kb_APIC
;
62 if ((apicData
) && (id
>= KATTR_CPULoad
&& id
< KATTR_CPULoad_END
))
65 if (id
< apicData
->apic_count
)
66 retval
= apicData
->cores
[id
].cpu_Load
;
68 else if (id
== KATTR_Architecture
)
70 retval
= (intptr_t)AROS_ARCHITECTURE
;