target/mips: Add segmentation control registers
authorJames Hogan <james.hogan@imgtec.com>
Tue, 18 Jul 2017 11:55:56 +0000 (12:55 +0100)
committerYongbok Kim <yongbok.kim@imgtec.com>
Thu, 20 Jul 2017 21:42:26 +0000 (22:42 +0100)
commitcec56a733dd2c3fa81dbedbecf03922258747f7d
treec8cac93783b4fd91c05c7ef2ef58b958961be694
parent42c86612d507c2a8789f2b8d920a244693c4ef7b
target/mips: Add segmentation control registers

The optional segmentation control registers CP0_SegCtl0, CP0_SegCtl1 &
CP0_SegCtl2 control the behaviour and required privilege of the legacy
virtual memory segments.

Add them to the CP0 interface so they can be read and written when
CP0_Config3.SC=1, and initialise them to describe the standard legacy
layout so they can be used in future patches regardless of whether they
are exposed to the guest.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Yongbok Kim <yongbok.kim@imgtec.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Yongbok Kim <yongbok.kim@imgtec.com>
Signed-off-by: Yongbok Kim <yongbok.kim@imgtec.com>
target/mips/cpu.h
target/mips/helper.h
target/mips/machine.c
target/mips/op_helper.c
target/mips/translate.c