Skip to content

Commit

Permalink
re integrated platform changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mthenault committed Sep 10, 2020
1 parent 5a26456 commit 40a83c9
Show file tree
Hide file tree
Showing 7 changed files with 2,158 additions and 1 deletion.
3 changes: 3 additions & 0 deletions arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ static void arm_display_machine_stats(void);
static int arm_get_smp_cpus(void);
static void arm_init_machspec(void);

//static void arm_cputime_to_timeval(ulonglong, struct timeval*);

static struct line_number_hook arm_line_number_hooks[];
static struct machine_specific arm_machine_specific;

Expand Down Expand Up @@ -264,6 +266,7 @@ arm_init(int when)
machdep->dump_irq = generic_dump_irq;
machdep->show_interrupts = generic_show_interrupts;
machdep->get_irq_affinity = generic_get_irq_affinity;
//machdep->cputime_to_timeval = arm_cputime_to_timeval;

arm_init_machspec();
break;
Expand Down
32 changes: 32 additions & 0 deletions defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,8 @@ struct program_context {
#define QEMU_MEM_DUMP_COMPRESSED (0x10000ULL)
#define SNAP (0x20000ULL)
#define EXCLUDED_VMEMMAP (0x40000ULL)
#define ENDIAN_DIFF (0x80000ULL) /* Nathan */
#define NEED_SWAP() (pc->flags2 & ENDIAN_DIFF) /* Nathan */
#define is_excluded_vmemmap() (pc->flags2 & EXCLUDED_VMEMMAP)
#define MEMSRC_LOCAL (0x80000ULL)
#define REDZONE (0x100000ULL)
Expand Down Expand Up @@ -1049,6 +1051,8 @@ struct machdep_table {
void (*get_irq_affinity)(int);
void (*show_interrupts)(int, ulong *);
int (*is_page_ptr)(ulong, physaddr_t *);
/* Appcore add ons */
void (*cputime_to_timeval)(ulonglong, struct timeval*);
};

/*
Expand Down Expand Up @@ -1248,6 +1252,8 @@ struct offset_table { /* stash of commonly-used offsets */
long task_struct_thread_info;
long task_struct_nsproxy;
long task_struct_rlim;
long task_struct_static_prio;
long task_struct_rt_priority;
long thread_info_task;
long thread_info_cpu;
long thread_info_previous_esp;
Expand Down Expand Up @@ -2043,6 +2049,20 @@ struct offset_table { /* stash of commonly-used offsets */
long bpf_prog_aux_user;
long user_struct_uid;
long idr_cur;
/* appcore add ons */
long mm_struct_map_count;
long mm_struct_flags;
long mm_struct_saved_auxv;

long vm_area_struct_anon_vma;
long pid_level;

long sigset_t_sig;

long task_struct_real_cred;
long cred_gid;
long cred_uid;
/* end of appcore add ons */
long kmem_cache_memcg_params;
long memcg_cache_params___root_caches_node;
long memcg_cache_params_children;
Expand Down Expand Up @@ -2255,6 +2275,7 @@ struct size_table { /* stash of commonly-used sizes */
long bpf_prog_aux;
long bpf_map;
long bpf_insn;
long cred; /* add on for fsp2 */
long xarray;
long xa_node;
long zram_table_entry;
Expand Down Expand Up @@ -2413,6 +2434,16 @@ DEF_LOADER(pointer_t);

#endif /* NEED_ALIGNED_MEM_ACCESS */

/* start for appcore */
/* Target's LONG size: */
#ifdef _64BIT_
#define SIZEOF_LONG 8
#else
#define SIZEOF_LONG 4
#endif
/* end for appcore */


struct node_table {
int node_id;
ulong pgdat;
Expand Down Expand Up @@ -5554,6 +5585,7 @@ void sort_tgid_array(void);
int sort_by_tgid(const void *, const void *);
int in_irq_ctx(ulonglong, int, ulong);
void check_stack_overflow(void);
int task_nice( struct task_context * );

/*
* extensions.c
Expand Down
Loading

0 comments on commit 40a83c9

Please sign in to comment.