summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a194312)
raw | patch | inline | side by side (parent: a194312)
author | Wendy Liang <jliang@xilinx.com> | |
Fri, 15 Jul 2016 18:25:59 +0000 (11:25 -0700) | ||
committer | Wendy Liang <jliang@xilinx.com> | |
Thu, 13 Oct 2016 05:01:45 +0000 (22:01 -0700) |
Introduce hil_proc resource header
so that user can specify their hardware resource in such a format:
{
<resource_header>
<user_defined_resource>
}
User don't have to define the full hil_proc in their application.
This way can sperate data structure definition from internal
implementation and user input.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
so that user can specify their hardware resource in such a format:
{
<resource_header>
<user_defined_resource>
}
User don't have to define the full hil_proc in their application.
This way can sperate data structure definition from internal
implementation and user input.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
lib/common/hil.c | patch | blob | history | |
lib/include/openamp/hil.h | patch | blob | history |
diff --git a/lib/common/hil.c b/lib/common/hil.c
index 1cf9dabe3259840f2bfc988e386c2e0151066351..f3c981278494261c4b7ffc04b6c954d58737f10f 100644 (file)
--- a/lib/common/hil.c
+++ b/lib/common/hil.c
*/
struct hil_proc *hil_create_proc(void *pdata, int cpu_id)
{
- struct hil_proc *proc = 0, *proc_data;
+ struct hil_proc *proc = 0;
+ struct proc_info_hdr *info_hdr = (struct proc_info_hdr *)pdata;
struct metal_list *node;
/* If proc already exists then return it */
}
}
- proc_data = (struct hil_proc *)pdata;
- proc = proc_data->ops->initialize(pdata, cpu_id);
+ proc = info_hdr->ops->initialize(pdata, cpu_id);
if (proc)
metal_list_add_tail(&procs, &proc->node);
index 4a4d3b2c1ff580beaf96793cedec5a323732b35f..be5a8eb953025cf0213eaf649e8a901f8cdae7b4 100644 (file)
/* Reserved CPU id */
#define HIL_RSVD_CPU_ID 0xffffffff
+/**
+ * struct proc_info_hdr
+ *
+ * This structure is maintained by hardware interface layer
+ * for user to pass hardware information to remote processor.
+ */
+struct proc_info_hdr {
+ /* CPU ID as defined by the platform */
+ unsigned long cpu_id;
+ /* HIL platform ops table */
+ struct hil_platform_ops *ops;
+};
+
/**
* struct proc_shm
*
struct hil_proc {
/* CPU ID as defined by the platform */
unsigned long cpu_id;
+ /* HIL platform ops table */
+ struct hil_platform_ops *ops;
/* Shared memory info */
struct proc_shm sh_buff;
/* Virtio device hardware info */
unsigned long num_chnls;
/* RPMsg channels array */
struct proc_chnl chnls[HIL_MAX_NUM_CHANNELS];
- /* HIL platform ops table */
- struct hil_platform_ops *ops;
/* Attrbites to represent processor role, master or remote . This field is for
* future use. */
unsigned long attr;