Added more CPU functions, fixed the get_sr() function.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4990 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2003-10-11 19:00:59 +00:00
parent 1d8adcd3f6
commit aaaceca81b
2 changed files with 35 additions and 0 deletions

View File

@ -20,6 +20,34 @@ FUNCTION(set_sdr1):
mtsdr1 %r3
blr
/* uint32 get_sr(void *virtualAddress);
* r3
*/
FUNCTION(get_sr):
mfsrin %r3, %r3
blr
/* void set_sr(void *virtualAddress, uint32 value);
* r3 r4
*/
FUNCTION(set_sr):
mtsrin %r4, %r3
blr
/* uint32 get_msr(void);
*/
FUNCTION(get_msr):
mfmsr %r3
blr
/* uint32 set_msr(uint32 value);
* r3
*/
FUNCTION(set_msr):
mtmsr %r3
blr
#define get_ibat(num) \
mfibatu %r4, num; \
stw %r4, 0(%r3); \

View File

@ -22,6 +22,13 @@ page_table_entry::SecondaryHash(uint32 virtualSegmentID, uint32 virtualAddress)
}
uint32
page_table_entry::SecondaryHash(uint32 primaryHash)
{
return ~primaryHash;
}
void
ppc_get_page_table(void **_pageTable, size_t *_size)
{