diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2005-06-05 04:08:41 -0400 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2005-06-05 04:08:41 -0400 |
commit | d9991ff59953389251c6d081c6318ac1e0549954 (patch) | |
tree | b9cb82ff4081ce1d5fe154d65d31d2cb446dfcbb /kern/linux | |
parent | 2ccbeef33813dfff99bd45fa53709ea92fc67fe7 (diff) | |
parent | 5070f27c694571eb238bb2f98d69cf06d551994c (diff) | |
download | gem5-d9991ff59953389251c6d081c6318ac1e0549954.tar.xz |
Merge zizzer:/bk/m5 into zeep.eecs.umich.edu:/z/saidi/work/m5-clean
--HG--
extra : convert_revision : 6fce1b31995cf5c68bd2f4bdfa2b88db6dcd006c
Diffstat (limited to 'kern/linux')
-rw-r--r-- | kern/linux/aligned.hh | 29 | ||||
-rw-r--r-- | kern/linux/hwrpb.hh | 39 | ||||
-rw-r--r-- | kern/linux/sched.hh | 96 | ||||
-rw-r--r-- | kern/linux/thread_info.hh | 18 |
4 files changed, 66 insertions, 116 deletions
diff --git a/kern/linux/aligned.hh b/kern/linux/aligned.hh index 042f0ad2c..426299b5d 100644 --- a/kern/linux/aligned.hh +++ b/kern/linux/aligned.hh @@ -1,6 +1,35 @@ +/* + * Copyright (c) 2004 The Regents of The University of Michigan + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer; + * redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution; + * neither the name of the copyright holders nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + #ifndef __KERN_LINUX_ALIGNED_HH__ #define __KERN_LINUX_ALIGNED_HH__ + #include "sim/host.hh" #include "targetarch/isa_traits.hh" diff --git a/kern/linux/hwrpb.hh b/kern/linux/hwrpb.hh index 16544f196..8fa6ec404 100644 --- a/kern/linux/hwrpb.hh +++ b/kern/linux/hwrpb.hh @@ -1,3 +1,28 @@ +/* +Copyright 1990 Hewlett-Packard Development Company, L.P. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to +do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + #ifndef __KERN_LINUX_HWRPB_HH__ #define __KERN_LINUX_HWRPB_HH__ @@ -5,13 +30,13 @@ namespace Linux { struct pcb_struct { - uint64_ta ksp; - uint64_ta usp; - uint64_ta ptbr; - uint32_t pcc; - uint32_t asn; - uint64_ta unique; - uint64_ta flags; + uint64_ta rpb_ksp; + uint64_ta rpb_usp; + uint64_ta rpb_ptbr; + uint32_t rpb_cc; + uint32_t rpb_psn; + uint64_ta rpb_unique; + uint64_ta rpb_fen; uint64_ta res1, res2; }; } diff --git a/kern/linux/sched.hh b/kern/linux/sched.hh index 287214b2b..bb07f093a 100644 --- a/kern/linux/sched.hh +++ b/kern/linux/sched.hh @@ -2,105 +2,15 @@ #define __LINUX_SCHED_H__ #include "targetarch/isa_traits.hh" -#include "kern/linux/atomic.hh" -#include "kern/linux/list.hh" -#include "kern/linux/wait.hh" -#include "kern/linux/timer.hh" -#include "kern/linux/pid.hh" #include "kern/linux/aligned.hh" namespace Linux { - - struct rlimit { - uint64_ta rlim_cur; - uint64_ta rlim_max; - }; - - const uint32_t RLIM_NLIMITS = 11; - struct task_struct { - int64_ta state; /* -1 unrunnable, 0 runnable, >0 stopped */ - Addr_a thread_info; - atomic_t usage; - - uint64_ta flags; /* per process flags, defined below */ - uint64_ta ptrace; - - int32_t lock_depth; /* Lock depth */ - - int32_t prio, static_prio; - - struct list_head run_list; - Addr_a array; - - uint64_ta sleep_avg; - int64_ta interactive_credit; - uint64_ta timestamp; - int32_t activated; - - uint64_ta policy; - uint64_ta cpus_allowed; - uint32_t time_slice, first_time_slice; - - struct list_head tasks; - struct list_head ptrace_children; - struct list_head ptrace_list; - - Addr_a mm, active_mm; - - /* task state */ - Addr_a binfmt; - int32_t exit_code, exit_signal; - int32_t pdeath_signal; /* The signal sent when the parent dies */ - /* ??? */ - uint64_ta personality; - int32_t did_exec:1; + uint8_t junk1[0xf4]; int32_t pid; - int32_t __pgrp; /* Accessed via process_group() */ - int32_t tty_old_pgrp; - int32_t session; - int32_t tgid; - /* boolean value for session group leader */ - int32_t leader; - /* - * pointers to (original) parent process, youngest child, younger sibling, - * older sibling, respectively. (p->father can be replaced with - * p->parent->pid) - */ - Addr_a real_parent; /* real parent process (when being debugged) */ - Addr_a parent; /* parent process */ - struct list_head children; /* list of my children */ - struct list_head sibling; /* linkage in my parent's children list */ - Addr_a group_leader; /* threadgroup leader */ - - /* PID/PID hash table linkage. */ - struct pid_link pids[PIDTYPE_MAX]; - - wait_queue_head_t wait_chldexit; /* for wait4() */ - Addr_a vfork_done; /* for vfork() */ - Addr_a set_child_tid; /* CLONE_CHILD_SETTID */ - Addr_a clear_child_tid; /* CLONE_CHILD_CLEARTID */ - - uint64_ta rt_priority; - uint64_ta it_real_value, it_prof_value, it_virt_value; - uint64_ta it_real_incr, it_prof_incr, it_virt_incr; - struct timer_list real_timer; - struct list_head posix_timers; /* POSIX.1b Interval Timers */ - uint64_ta utime, stime, cutime, cstime; - uint64_ta nvcsw, nivcsw, cnvcsw, cnivcsw; /* context switch counts */ + uint8_t junk2[0x190]; uint64_ta start_time; - /* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */ - uint64_ta min_flt, maj_flt, nswap, cmin_flt, cmaj_flt, cnswap; - /* process credentials */ - uint32_t uid,euid,suid,fsuid; - uint32_t gid,egid,sgid,fsgid; - Addr_a group_info; - uint32_t cap_effective, cap_inheritable, cap_permitted; - int32_t keep_capabilities:1; - Addr user; - /* limits */ - struct rlimit rlim[RLIM_NLIMITS]; - uint16_t used_math; + uint8_t junk3[0x5c]; char comm[16]; }; diff --git a/kern/linux/thread_info.hh b/kern/linux/thread_info.hh index 1b4053a78..d4253b16a 100644 --- a/kern/linux/thread_info.hh +++ b/kern/linux/thread_info.hh @@ -6,22 +6,8 @@ namespace Linux { struct thread_info { - struct pcb_struct pcb; /* palcode state */ - - Addr_a task; /* main task structure */ - uint32_t flags; /* low level flags */ - uint32_t ieee_state; /* see fpu.h */ - - Addr_a exec_domain; /* execution domain */ - uint64_ta addr_limit; /* thread address space */ - int64_ta cpu; /* current CPU */ - int32_t preempt_count; /* 0 => preemptable, <0 => BUG */ - - int32_t bpt_nsaved; - uint64_ta bpt_addr[2]; /* breakpoint handling */ - uint32_t bpt_insn[2]; - - /*restart_block;*/ + struct pcb_struct pcb; + Addr_a task; }; } #endif /* __ALPHA_THREAD_INFO_H__ */ |