device/class/cpu.h header reference
[Devices support library module]

The source code of this header can be browsed online.

Description  

Members  

Types  

Functions  

Variable  

Macros  

Members detail  

#define DEV_CPU_GET_NODE(n)  

This macro is declared in device/class/cpu.h source file, line 60.

dev_cpu_get_node_t

#define DEV_CPU_REG_INIT(n)  

This macro is declared in device/class/cpu.h source file, line 53.

See also dev_cpu_reg_init_t.

#define DRIVER_CPU_METHODS(prefix)  

This macro is declared in device/class/cpu.h source file, line 77.

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: defined( CONFIG_ARCH_SMP )

See also struct driver_cpu_s.

#define DRIVER_CPU_METHODS(prefix)  

This macro is declared in device/class/cpu.h source file, line 85.

Alternate declarations with same identifier: [1], [2].

Preprocessor condition: not defined( CONFIG_ARCH_SMP )

See also struct driver_cpu_s.

#define __DEVICE_CPU_H__  

This macro is declared in device/class/cpu.h source file, line 31.

struct device_s * cpu_local_device(void )  

This function is declared in device/class/cpu.h source file, line 45.

This function returns a pointer to local cpu device

typedef struct cpu_tree_s *(dev_cpu_get_node_t)(struct device_cpu_s *accessor)   

This typedef is declared in device/class/cpu.h source file, line 65.

This typedef returns pointer to the cpu tree node. .

This is available when CONFIG_ARCH_SMP is defined.

This declaration involves expansion of the DEV_CPU_GET_NODE macro.

See also struct cpu_tree_s.

typedef void (dev_cpu_reg_init_t)(struct device_cpu_s *accessor)   

This typedef is declared in device/class/cpu.h source file, line 58.

This typedef executes processor registers initialization which can not be performed from an other processor on driver init.

This declaration involves expansion of the DEV_CPU_REG_INIT macro.

struct device_cpu_s  

This struct is declared in DRIVER_CLASS_TYPES function like macro expansion, line 19 in device/class/cpu.h source file, line 74.

This struct is the device accessor object type for the cpu device class. This accessor must be initialized by calling the device_get_accessor function.

See also DRIVER_CLASS_CPU, struct device_accessor_s and Device accessor.

FieldDescription
union <anonymous> {
struct device_accessor_s base;
struct <anonymous> {
struct device_s * dev;
struct driver_cpu_s * api;
uint_fast8_t number;
};
};

struct device_accessor_s * device_cpu_s_base(struct device_cpu_s *x)  

This function is declared in DRIVER_CLASS_TYPES function like macro expansion, line 40 in device/class/cpu.h source file, line 74.

This function casts a cpu device accessor to a generic device accessor

struct device_cpu_s * device_cpu_s_cast(struct device_accessor_s *x)  

This function is declared in DRIVER_CLASS_TYPES function like macro expansion, line 33 in device/class/cpu.h source file, line 74.

This function casts a generic device accessor to a cpu device accessor

struct driver_cpu_s  

This struct is declared in DRIVER_CLASS_TYPES function like macro expansion, line 5 in device/class/cpu.h source file, line 74.

This struct is the driver API descriptor for the cpu device class.

See also DRIVER_CLASS_CPU and struct driver_class_s.

#define CPU_TREE_XOR_VALUE  

This macro is declared in device/class/cpu.h source file, line 94.

This macro specifies the value which should be xored with the cpu id for lookup in the cpu tree.

This macro is for internal use only.

struct device_s * cpu_device  

This variable is declared in device/class/cpu.h source file, line 41.

This variable is for internal use only.

This declaration involves expansion of the CPU_LOCAL macro.

error_t cpu_tree_insert(struct cpu_tree_s *node)  

This function inserts a node in the cpu tree, the cpu_tree_s::cpu_id, cpu_tree_s::stack and cpu_tree_s::cpu_dev fields must be initialized .

This is available when CONFIG_DEVICE_CPU is defined.

This function is for internal use only.

const struct cpu_tree_s * cpu_tree_lookup(uintptr_t id)  

This function lookup a cpu tree node from the cpu numerical id.

This is available when CONFIG_DEVICE_CPU is defined.

This function is for internal use only.

void cpu_tree_node_cleanup(struct cpu_tree_s *node)  

This function function free the resources allocated by the cpu_tree_node_init function.

This is available when CONFIG_DEVICE_CPU is defined.

This function is for internal use only.

error_t cpu_tree_node_init(struct cpu_tree_s *node, cpu_id_t id, struct device_s *dev)  

This function function initializes the various fields of the cpu node. It allocates the stack and allocates and initializes the cpu local storage. This helper function is designed to be called from the cpu driver initialization code.

This is available when CONFIG_DEVICE_CPU is defined.

This function is for internal use only.

void cpu_tree_remove(struct cpu_tree_s *node)  

This function removes a node from the cpu tree.

This is available when CONFIG_DEVICE_CPU is defined.

This function is for internal use only.

struct cpu_tree_s  

This struct is declared in device/class/cpu.h source file, line 106.

This defines the cpu tree node structure. This node is designed to be part of a binary tree which is used from both C and assembly code to lookup the processor from its numerical id. It's first used on startup to setup the processor stack.

This node must be inserted in the cpu tree when the processor device driver initialization takes place.

This struct is for internal use only.

FieldDescription
uintptr_t stack;address of the cpu stack.
See also #CPU_TREE_STACK.
struct device_s * cpu_dev;pointer to the cpu device.
See also #CPU_TREE_CPU_DEV.
struct cpu_tree_s * childs[2];left and right childs of the binary tree.
See also #CPU_TREE_CHILDS.
uintptr_t cpu_id;physical cpu id value. ,
See also #CPU_TREE_CHILDS and CPU_TREE_XOR_VALUE.
void * cls;cpu local storage pointer.
See also #CPU_TREE_CLS.

Valid XHTML 1.0 StrictGenerated by diaxen on Wed Oct 17 21:18:37 2018 using MkDoc