Commit graph

473 commits

Author SHA1 Message Date
Gabe Black 05c86ec0d7 Get X86 to load an elf and start a process for it.
src/arch/x86/SConscript:
    Add in process source files.
src/arch/x86/isa_traits.hh:
    Replace magic constant numbers with the x86 register names.
src/arch/x86/miscregfile.cc:
    Make clear the miscreg file succeed. There aren't any misc regs, so clearing them is very easy.
src/arch/x86/process.hh:
    An X86 process class.
src/base/loader/elf_object.cc:
    Add in code to recognize x86 as an architecture.
src/base/traceflags.py:
    Add an x86 traceflag
src/sim/process.cc:
    Add in code to create an x86 process.
src/arch/x86/intregs.hh:
    A file which declares names for the integer register indices.
src/arch/x86/linux/linux.cc:
src/arch/x86/linux/linux.hh:
    A very simple translation of SPARC's linux.cc and linux.hh. It's probably not correct for x86, but it might not be correct for SPARC either.
src/arch/x86/linux/process.cc:
src/arch/x86/linux/process.hh:
    An x86 linux process. The syscall table is split out into it's own file.
src/arch/x86/linux/syscalls.cc:
    The x86 Linux syscall table and the uname function.
src/arch/x86/process.cc:
    The x86 process base class.
tests/test-progs/hello/bin/x86/linux/hello:
    An x86 hello world test binary.

--HG--
extra : convert_revision : f22919e010c07aeaf5757dca054d9877a537fd08
2007-03-06 15:42:30 +00:00
Gabe Black 992fda55f9 Fill out a stub version of the vtophys header file.
--HG--
extra : convert_revision : 2c10a80a2f73207539e3f98b4a3b864d431f5035
2007-03-05 17:59:04 +00:00
Gabe Black 296891b1c5 Add in NumGDBRegs so the constructor to the base class can get all it's arguments.
--HG--
extra : convert_revision : fcec1ad134b53a419a952e556ed75cb1559a1127
2007-03-05 17:58:15 +00:00
Gabe Black a473d50e4c Reorganize the floating point register file a little.
--HG--
extra : convert_revision : 643c147b77e931d49ac559681d4bbda737f6e1c7
2007-03-05 17:57:26 +00:00
Gabe Black a46e100bd9 Add some new source files.
--HG--
extra : convert_revision : 94f3f19eb91b7f54918640b7605008eb1fe75fc7
2007-03-05 17:56:26 +00:00
Gabe Black a41b86ba01 Stub decoder. This is probably even farther from finished than it looks...
--HG--
extra : convert_revision : a39a158fec4560f6eb7a6987592c473677c0b1ba
2007-03-05 16:16:28 +00:00
Gabe Black a0294c10cd Added missing include.
--HG--
extra : convert_revision : 9d00209e5c0ae8aa5ac37f9558627ee212a72c9b
2007-03-05 16:11:07 +00:00
Gabe Black ecfc622451 Added LargestRead type for x86. I might have picked the wrong type.
--HG--
extra : convert_revision : 5570a595b9adbe9c35f9b4f8dd3b50533b5beb97
2007-03-05 16:10:11 +00:00
Gabe Black 78e5406f19 Stub implementation for x86.
--HG--
extra : convert_revision : 3eccbf699bb62139a06a9b249e56bd205bc316ed
2007-03-05 16:09:09 +00:00
Gabe Black 05ba90b726 Stub implementation for x86
--HG--
extra : convert_revision : dd6b4d14070a2e99c179c5f780c9935847da8eda
2007-03-05 16:08:18 +00:00
Gabe Black 58d30df676 Added fault generation functions. I would still like to see these go away. The page table fault should be moved into sim/faults.hh because it's a "fake" m5 fault for se mode and shouldn't vary between architectures.
--HG--
extra : convert_revision : cafe25befd64f83a424c1a09f5e62a16df5408ad
2007-03-05 16:07:01 +00:00
Gabe Black 7730af9503 Added stub implementations or prototypes for all the functions in this file.
--HG--
extra : convert_revision : c0170eae8aeae130f81618ae49a60f879c2b523f
2007-03-05 14:55:09 +00:00
Gabe Black b2d356a6b2 Added in a missing include.
--HG--
extra : convert_revision : 712480fef36bf7a34c2c0b8d19dd82689eb78a1d
2007-03-05 14:53:51 +00:00
Gabe Black 7ed7d6e80d Filled in a stub header file for setting the result of a syscall.
--HG--
extra : convert_revision : f0a2cdf7d669834b90444fc390b0aceede474737
2007-03-05 14:53:15 +00:00
Gabe Black 43b8f51bb8 Filled in a stub header file for a stacktrace object. I'm still not sure what this is for, and it probably doesn't work on anything but Alpha.
--HG--
extra : convert_revision : 9bc3833628d31799a7b578c450dac096a19aead3
2007-03-05 14:52:28 +00:00
Gabe Black 2e6cf12963 Filled in a stub header file for remote gdb
--HG--
extra : convert_revision : 6289181697142f672548a4d4cf6e010171cb98e1
2007-03-05 14:51:21 +00:00
Gabe Black aa5f42b10d Correct a typo
--HG--
extra : convert_revision : 1e8ef87ddb28873045a08bd104afc8ce129c4299
2007-03-05 14:50:33 +00:00
Gabe Black 0e9db1a2e5 Make the constructor (and all the other functions) public
--HG--
extra : convert_revision : 9d572651fc1722b15ae7dbc59c108d680c911f04
2007-03-05 14:49:52 +00:00
Gabe Black b832e6740f Various touch ups
--HG--
extra : convert_revision : 19ff30d969a46adbd256f674582a9e7d398b56ed
2007-03-05 14:49:07 +00:00
Gabe Black ecc1066f43 Added a missing include.
--HG--
extra : convert_revision : 15a1b49ff9e0a1a15bd2500bec9ec9bc95ee5898
2007-03-05 14:48:18 +00:00
Gabe Black ec8b49cc5f Added a missing include.
--HG--
extra : convert_revision : 62583e5a5647913fb36e1aae265e8ac52a165829
2007-03-05 14:47:42 +00:00
Gabe Black 8a33c8dce4 Fix up the remote gdb include gaurds so it doesn't use the same symbol as Alpha does.
--HG--
extra : convert_revision : b75dbdd95ceb4ec71275588a5cf8e6b614cf4539
2007-03-05 14:46:49 +00:00
Gabe Black 30e700600c x86 register file includes.
--HG--
extra : convert_revision : c00a077dd7ae8f6b48c6939034be244bcf48d715
2007-03-05 12:23:14 +00:00
Gabe Black b9b29525a6 Include the x86 specific traits file.
--HG--
extra : convert_revision : bcf448aedd832022527cc972f7a1f0433987c564
2007-03-05 12:21:20 +00:00
Gabe Black 9e93feea10 Stub x86 Fault class which just panics.
--HG--
extra : convert_revision : abfcf4005ec636b1e6c085515b63c1d8e69e3370
2007-03-05 12:20:34 +00:00
Gabe Black 385eb586ce A new file for x86 specific parameters. This could be implemented as a sim object?
--HG--
extra : convert_revision : 51757435bb0b20132f3ec5782db31382bb2cca18
2007-03-05 12:19:54 +00:00
Gabe Black be29612fbe Add in a declaration of class Checkpoint rather than expecting it to come from some other include.
--HG--
extra : convert_revision : adbd4899508e3d30959a504a48402f01d1187099
2007-03-05 12:19:11 +00:00
Gabe Black 6a19b64de2 Merge zizzer.eecs.umich.edu:/bk/newmem
into  ahchoo.blinky.homelinux.org:/home/gblack/m5/newmem-x86

--HG--
extra : convert_revision : b585cea2221377eb2fceea8976c46a17c0034f51
2007-03-05 11:00:44 +00:00
Nathan Binkert ba042842c6 Don't use the exact same name as a system header #define
--HG--
extra : convert_revision : 099e380395fc1fdaef993b019d3d4e596e8076c2
2007-03-04 19:26:49 -08:00
Ali Saidi 82874eefca Merge zizzer:/bk/newmem
into  zeep.pool:/z/saidi/work/m5.newmem

--HG--
extra : convert_revision : fd6464c9883783c7c2cbefba317f4a0f20dd24cb
2007-03-03 19:03:22 -05:00
Ali Saidi 36f43ff6a5 Implement Niagara I/O interface and rework interrupts
configs/common/FSConfig.py:
    Use binaries we've compiled instead of the ones that come with Legion
src/arch/alpha/interrupts.hh:
    get rid of post(int int_type) and add a get_vec function that gets the interrupt vector for an interrupt number
src/arch/sparc/asi.cc:
    Add AsiIsInterrupt() to AsiIsMmu()
src/arch/sparc/faults.cc:
src/arch/sparc/faults.hh:
    Add InterruptVector type
src/arch/sparc/interrupts.hh:
    rework interrupts. They are no longer cleared when created... A I/O or ASI read/write needs to happen before they are cleared
src/arch/sparc/isa_traits.hh:
    Add the "interrupt" trap types to isa traits
src/arch/sparc/miscregfile.cc:
    add names for all the misc registers and possible post an interrupt when TL is changed.
src/arch/sparc/miscregfile.hh:
    Add a helper function to post an interrupt when pil < some set softint
src/arch/sparc/regfile.cc:
src/arch/sparc/regfile.hh:
    InterruptLevel shouldn't really live here, moved to interrupt.hh
src/arch/sparc/tlb.cc:
    Add interrupt ASIs to TLB
src/arch/sparc/ua2005.cc:
    Add checkSoftInt to check if a softint needs to be posted
    Check that a tickCompare isn't scheduled before scheduling one
    Post and clear interrupts on queue writes and what not
src/base/bitfield.hh:
    Add an helper function to return the msb that is set
src/cpu/base.cc:
src/cpu/base.hh:
    get rid of post_interrupt(type) since it's no longer needed.. Add a way to see what interrupts are pending
src/cpu/intr_control.cc:
src/cpu/intr_control.hh:
src/dev/alpha/tsunami_cchip.cc:
src/python/m5/objects/IntrControl.py:
    Make IntrControl have a system pointer rather than using a cpu pointer to get one
src/dev/sparc/SConscript:
    add iob to SConsscrip
tests/quick/10.linux-boot/ref/alpha/linux/tsunami-simple-atomic-dual/config.ini:
tests/quick/10.linux-boot/ref/alpha/linux/tsunami-simple-atomic-dual/config.out:
tests/quick/10.linux-boot/ref/alpha/linux/tsunami-simple-atomic/config.ini:
tests/quick/10.linux-boot/ref/alpha/linux/tsunami-simple-atomic/config.out:
tests/quick/10.linux-boot/ref/alpha/linux/tsunami-simple-timing-dual/config.ini:
tests/quick/10.linux-boot/ref/alpha/linux/tsunami-simple-timing-dual/config.out:
tests/quick/10.linux-boot/ref/alpha/linux/tsunami-simple-timing/config.ini:
tests/quick/10.linux-boot/ref/alpha/linux/tsunami-simple-timing/config.out:
tests/quick/80.netperf-stream/ref/alpha/linux/twosys-tsunami-simple-atomic/config.ini:
tests/quick/80.netperf-stream/ref/alpha/linux/twosys-tsunami-simple-atomic/config.out:
    update config.ini/out for intrcntrl not having a cpu pointer anymore

--HG--
extra : convert_revision : 38614f6b9ffc8f3c93949a94ff04b7d2987168dd
2007-03-03 17:22:47 -05:00
Gabe Black 5498d52985 Filled in with basic x86 stuff. Some things are missing, wrong, or nonsensical for x86.
--HG--
extra : convert_revision : 2f7845db6d65b353985b474f7012cfbbaece6a39
2007-03-03 17:19:52 +00:00
Gabe Black 0150515ac3 Filled in with basic x86 information. Some things are missing, wrong, or non-sensical in x86.
--HG--
extra : convert_revision : bba78db3667e214c95bb127872d3fdf546619703
2007-03-03 17:18:29 +00:00
Gabe Black 10871b7342 Add build hooks for x86.
--HG--
extra : convert_revision : 438eb74f14e6ea60bab5012110f3946c9213786e
2007-03-03 16:01:48 +00:00
Gabe Black 23dc5099a4 Implement the _llseek syscall. It's Linux only, so we'll actually use the lseek syscall.
--HG--
extra : convert_revision : cccfd5efddbba527c6fb4e07ad2ab235a2670918
2007-03-03 03:34:55 +00:00
Gabe Black 477afcaf5b Fix some issues with 32 bit processes.
--HG--
extra : convert_revision : b01b38bbf185f2279134db4976a9bdb3e381a670
2007-03-03 03:34:54 +00:00
Ali Saidi 4e8d2d1593 make ldtw(a) -- Twin 32 bit load work correctly -- by doing it the same way as the twin 64 bit loads
src/arch/isa_parser.py:
src/arch/sparc/isa/decoder.isa:
src/arch/sparc/isa/operands.isa:
src/base/bigint.hh:
src/cpu/simple/atomic.cc:
src/cpu/simple/timing.cc:
src/mem/packet_access.hh:
    make ldtw(a) Twin 32 bit load work correctly

--HG--
extra : convert_revision : 2646b269d58cc1774e896065875a56cf5e313b42
2007-03-02 22:34:51 -05:00
Gabe Black d8ada247f4 Forgot to commit this new file last earlier.
--HG--
extra : convert_revision : f2d80ae551b7e29426141d5c9fe355b43a0b9c7d
2007-03-02 14:43:27 +00:00
Gabe Black ececf101c7 Make the m5 psuedo instructions use the BasicOperate format
--HG--
extra : convert_revision : f02da702ab9b99da124fac7e10a07386b04f3a0f
2007-02-28 16:49:17 +00:00
Gabe Black eb57b4f214 Merge zizzer.eecs.umich.edu:/bk/newmem
into  ahchoo.blinky.homelinux.org:/home/gblack/m5/newmem-sparc32

--HG--
extra : convert_revision : 88d1401f6e6b7c82344abef2c81b3c22bf6a0499
2007-02-28 16:39:42 +00:00
Gabe Black 29e5df890d Make trap instructions always generate TrapInstruction Fault objects which call into the Process object to handle system calls. Refactored the Process objects, and move the handler code into it's own file, and add some syscalls which are used in a natively compiled hello world. Software traps with trap number 3 (not syscall number 3) are supposed to cause the register windows to be flushed but are ignored right now. Finally, made uname for SPARC report a 2.6.12 kernel which is what m22-018.pool happens to be running.
--HG--
extra : convert_revision : ea873f01c62234c0542f310cc143c6a7c76ade94
2007-02-28 16:36:38 +00:00
Gabe Black 99948060b2 The "hostname" variable isn't used in the process classes. It should be removed from the other ones as well.
--HG--
extra : convert_revision : 0c07534de42d6c32ac26d9e43709111e3ab30d57
2007-02-28 16:29:25 +00:00
Ali Saidi f892608ff7 Merge zizzer:/bk/newmem
into  zeep.pool:/z/saidi/work/m5.newmem

--HG--
extra : convert_revision : a4f80ce975a23ba9858e6bf2dbbfed8897dd1810
2007-02-24 22:10:06 -05:00
Ali Saidi cf0e202cba make m5 readfile work on solaris... we can have a solaris regression soon!
src/arch/sparc/isa/decoder.isa:
    add readfile and break to sparc decoder
src/arch/sparc/isa/operands.isa:
    fix O0-O5 operands registers
util/m5/Makefile.sparc:
    Make sparc makefile compile a 64bit binary
util/m5/m5.c:
    readfile was in here twice, once will be sufficient I think
util/m5/m5op_sparc.S:
    implement readfile and debugbreak

--HG--
extra : convert_revision : 139b3f480ee6342b37b5642e072c8486d91a3944
2007-02-24 22:05:01 -05:00
Gabe Black 6ae4cae971 Ali and I both made the same change and we only need it once. I liked mine a little better.
--HG--
extra : convert_revision : 3a1b7856e6143ca089fd6e36492608377dfede19
2007-02-23 01:05:34 +00:00
Gabe Black 187cc99e4e Merge zizzer.eecs.umich.edu:/bk/newmem
into  ahchoo.blinky.homelinux.org:/home/gblack/m5/newmem-sparc32

--HG--
extra : convert_revision : a7697ea8457a03318e3fcf34775bf3ecc4786e8a
2007-02-23 01:05:33 +00:00
Gabe Black 34b4722aee Make the m5 pseudo instructions only work in FS. Also, make sure any undefined opcodes in impdep2 (which in SE is all of them) trap with an illegal_instruction exception.
--HG--
extra : convert_revision : dd7848d0685e4cc6f5fd5e3b846a3f70b62ee30a
2007-02-22 13:17:51 +00:00
Ali Saidi 63fef6b011 fix se compiling oops
--HG--
extra : convert_revision : ce7ac94da0ed6bad457a8a9e4c949b0c3b09c2ae
2007-02-22 01:11:04 -05:00
Ali Saidi f01f8f1be6 Merge zizzer:/bk/newmem
into  zeep.pool:/z/saidi/work/m5.newmem

--HG--
extra : convert_revision : 4105ebbeca59206bece27f229ee810d594fb4310
2007-02-21 21:06:29 -05:00
Ali Saidi 7a2ecf9e26 add pseduo instruction support for sparc
util/m5/Makefile.alpha:
    Clean up to make it a bit easier to muck with
util/m5/Makefile.alpha:
    Make the makefile more reasonable
util/m5/Makefile.alpha:
    Remove authors from copyright.
util/m5/Makefile.alpha:
    Updated Authors from bk prs info
util/m5/Makefile.alpha:
    bk cp Makefile Makefile.alpha
src/arch/sparc/tlb.cc:
    Clean up the cache code a little bit and make sure the uncacbale bit is set when appropriate
src/arch/alpha/isa/decoder.isa:
src/sim/pseudo_inst.cc:
src/sim/pseudo_inst.hh:
    Rename AlphaPseudo -> PseudoInst since it's all generic
src/arch/sparc/isa/bitfields.isa:
src/arch/sparc/isa/decoder.isa:
src/arch/sparc/isa/includes.isa:
src/arch/sparc/isa/operands.isa:
    Add support for pseudo instructions in sparc
util/m5/Makefile.alpha:
util/m5/Makefile.sparc:
    split off alpha make file and sparc make file for m5 app
util/m5/m5.c:
    ivle and ivlb aren't used anymore
util/m5/m5op.h:
    stdint seems like a more generic better fit here
util/m5/m5op_alpha.S:
    move the op ids into their own header file since we can share them between sparc and alpha

--HG--
rename : util/m5/Makefile => util/m5/Makefile.sparc
rename : util/m5/m5op.S => util/m5/m5op_alpha.S
extra : convert_revision : 490ba2e8b8bc6e28bfc009cedec6b686b28e7834
2007-02-21 21:06:17 -05:00