qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-ppc] Help with assembly


From: Programmingkid
Subject: [Qemu-ppc] Help with assembly
Date: Tue, 27 Nov 2012 23:35:44 -0500

I'm trying to make a procedure that would make QEMU reduce the amount of CPU time it uses. Using the information from here: https://www-01.ibm.com/chips/techlib/techlib.nsf/techdocs/852569B20050FF7785256996006C28E2/$file/7xx_um.pdf, I tried to make a program that would cause the PowerPC 750 to enter DOZE mode. I think this mode is what I need to do to make QEMU more energy efficient. So far my attempts to make QEMU use less than 100% of the CPU time haven't worked. Any one have a clue what I'm doing wrong? 

mfspr r11, 1008 ; copy HID0 into r11
ori r11, r11,  0x0100 ; set doze bit   0000 0001 0000 0000  = 0x0100
andi. r11, r11,  0xF9FF  ; 1111 1001 1111 1111 = 0xF9FF   disable nap and sleep bits
mtspr 1008, r11 ; copy r11 back into HID0
mfmsr r11 ; copy MSR into r11
ori r11, r11, 0x200 ; set MSR[POW] bit   0010 0000 0000 0000 = 0x2000
oris r11, r11, 1 ; set MSR[EE] bit 
sync
mtmsr r11 ; copy r11 back into MSR
isync

This code goes into a function that is suppose to be called inside of a loop. 

I do know my goal is possible because when Linux runs inside of QEMU, QEMU only uses about 5% of the total CPU time. Any hints would be great. 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]