Deleted Added
sdiff udiff text old ( 13885:d10ea5e56cb0 ) new ( 13952:197e72db5ab0 )
full compact
1# Copyright (c) 2015 Advanced Micro Devices, Inc.
2# All rights reserved
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 46 unchanged lines hidden (view full) ---

55def config_filesystem(options):
56 fsdir = joinpath(m5.options.outdir, 'fs')
57 replace_tree(fsdir)
58
59 # Set up /proc
60 procdir = joinpath(fsdir, 'proc')
61 mkdir(procdir)
62
63 for i in xrange(options.num_cpus):
64 one_cpu = 'processor : %d\n' % (i) + \
65 'vendor_id : Generic\n' + \
66 'cpu family : 0\n' + \
67 'model : 0\n' + \
68 'model name : Generic\n' + \
69 'stepping : 0\n' + \
70 'cpu MHz : %0.3d\n' \
71 % (toFrequency(options.cpu_clock)/mega) + \
72 'cache size: : %dK\n' \
73 % (toMemorySize(options.l2_size)/kibi) + \
74 'physical id : 0\n' + \
75 'siblings : %s\n' \
76 % options.num_cpus + \
77 'core id : %d\n' \
78 % i + \
79 'cpu cores : %d\n' \
80 % options.num_cpus + \
81 'fpu : yes\n' + \
82 'fpu exception : yes\n' + \
83 'cpuid level : 1\n' + \
84 'wp : yes\n' + \
85 'flags : fpu\n' + \
86 'cache alignment : %d\n' \
87 % options.cacheline_size + \
88 '\n'
89 file_append((procdir, 'cpuinfo'), one_cpu)
90
91 file_append((procdir, 'stat'), 'cpu 0 0 0 0 0 0 0\n')
92 for i in xrange(options.num_cpus):
93 file_append((procdir, 'stat'), 'cpu%d 0 0 0 0 0 0 0\n' % i)
94
95 # Set up /sys

--- 80 unchanged lines hidden ---