wip.
[AROS.git] / arch / arm-native / kernel / getsystemattr.c
blobe0ba006ebb724fb1c770ffb667adbe840fc39d2f
1 /*
2 Copyright © 1995-2015, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc:
6 */
8 #include <aros/kernel.h>
9 #include <exec/execbase.h>
10 #include <proto/exec.h>
12 #include "kernel_intern.h"
14 /*****************************************************************************
16 NAME */
17 #include <proto/kernel.h>
19 AROS_LH1(intptr_t, KrnGetSystemAttr,
21 /* SYNOPSIS */
22 AROS_LHA(uint32_t, id, D0),
24 /* LOCATION */
25 struct KernelBase *, KernelBase, 29, Kernel)
27 /* FUNCTION
28 Get value of internal system attributes.
29 Currently defined attributes are:
31 KATTR_Architecture [.G] (char *) - Name of architecture the kernel built for.
33 KATTR_PeripheralBase [.G] IPTR - IO Base address for ARM peripherals
35 INPUTS
36 id - ID of the attribute to get
38 RESULT
39 Value of the attribute
41 NOTES
43 EXAMPLE
45 BUGS
47 SEE ALSO
49 INTERNALS
51 ******************************************************************************/
53 AROS_LIBFUNC_INIT
55 switch (id)
57 case KATTR_Architecture:
58 return (intptr_t)"arm-raspi";
60 case KATTR_PeripheralBase:
61 return (intptr_t)__arm_arosintern.ARMI_PeripheralBase;
63 default:
64 return -1;
67 AROS_LIBFUNC_EXIT