Hi, again!

I'm attach our conversation on IRC about poweroff.

Best regards, Taras!

On Sun, Jul 27, 2008 at 10:05 PM, Sander van Rossen <[EMAIL PROTECTED]
> wrote:

> What emulator are you using, i've tried the code and it doesn't
> shutdown the kernel at all
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> SharpOS-Developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sharpos-developers
>
[22:11] Logical_Error: hey, you're back
[22:15] Logical_Error: i noticed that your code would only reboot if i 
uncomment the code at the end, so it seems to be doing what it should
[22:15] Logical_Error: as far as i can see it starts a method from qemu
[22:19] Logical_Error: airstep?
[22:20] airstep: yep
[22:20] Logical_Error: did you get my previous messages?
[22:20] Logical_Error: irc-messages, not just email messages
[22:20] airstep: yes
[22:21] airstep: so... why reboot ? ^)
[22:21] airstep: poweroff?
[22:21] airstep: maybe
[22:21] Logical_Error: ugh..
[22:22] Logical_Error: for some reason i consistently say "reboot" when i mean 
"poweroff", sorry
[22:22] airstep: ok
[22:22] airstep: don't worry
[22:22] airstep: I understand
[22:22] airstep: so, do you think all correct?
[22:23] airstep: what code you are uncomment?
[22:23] Logical_Error:             Asm.XOR (R32.EAX, R32.EAX);
[22:23] Logical_Error:             Asm.MOV (Seg.DS, R16.AX);
[22:23] Logical_Error:             Asm.MOV (Seg.ES, R16.AX);
[22:23] Logical_Error:             Asm.MOV (Seg.FS, R16.AX);
[22:23] Logical_Error:             Asm.MOV (Seg.GS, R16.AX);
[22:23] Logical_Error:             Asm.MOV (Seg.SS, R16.AX);
[22:23] Logical_Error:             Asm.STI ();
[22:23] Logical_Error:             Asm.RET ();
[22:24] airstep: and before you uncomment it - poweroff dosen't work?
[22:24] Logical_Error: tgiphil: what is that diagnostictool for anyway?
[22:25] Logical_Error: airstep: no before it didn't work
[22:25] airstep: it's strange
[22:25] Logical_Error: afterwards it turned off the virtual machine
[22:25] airstep: :) 
[22:25] airstep: wtf...
[22:25] airstep: sorry
[22:26] airstep: hm...
[22:26] airstep: I really want understand why 
[22:26] Logical_Error: yes?
[22:27] airstep: why it's work, maybe need to test in another VM - virtual 
machine
[22:27] Logical_Error: what vm do you use?
[22:27] airstep: qemu
[22:27] Logical_Error: hmm, me too
[22:28] Logical_Error: i'm using 0.9.0
[22:28] airstep: I get it from repo
[22:28] airstep: repo of the SharpOS
[22:29] Logical_Error: me 2
[22:29] Logical_Error: so how is it that you get a different result?
[22:29] Logical_Error: i called reboot before the console was inited, maybe 
that's it?
[22:29] airstep: poweroff*
[22:30] Logical_Error: sigh, you know what i mean
[22:30] airstep: I think I don't make clean rebuild when desire to make more 
small use of code
[22:30] airstep: I will try again to rebuild
[22:30] Logical_Error: ok
[22:30] airstep: strange
[22:33] airstep: I make "clean" then "rebuild" and system down with commented 
part that you uncomment
[22:36] airstep: Ideal algorithm should be such:
[22:36] airstep: 1. Switch to real mode
[22:36] airstep: 2. Call APM poweroff by using INT 15
[22:37] airstep: 0. kernel must unload all that loaded before
[22:39] airstep: "i called reboot before the console was inited, maybe that's 
it?" - I called such as other commands after get shell access
[22:39] airstep: added "poweroff" to BuiltIn commands
[22:40] airstep: you didn't?
[22:40] Logical_Error: no i called it in bootentry before the console was inited
[22:40] airstep: why?
[22:41] airstep: maybe that is the reason for the difference...
[22:42] Logical_Error: try it
[22:43] airstep: how do that before console initialization?
[22:45] Logical_Error: in entrymodule.cs
[22:45] Logical_Error: before
[22:45] Logical_Error: StageMessage ("Shell setup...");
[22:45] Logical_Error: i put:
[22:45] Logical_Error: BootControl.PowerOff();
[22:45] airstep: ok
[22:47] airstep: I get shut down in this part too
[22:48] airstep: "So you're saying that the system goes down in 
"SwitchToRealMode", even
[22:48] airstep: though you haven't even implemented the actuall real-mode 
"poweroff"
[22:48] airstep: code?" - yes
[22:49] Logical_Error: and when you put poweroff where i placed it, and comment 
out that code that i uncommented?
[22:50] airstep: yes
[22:50] airstep: in this case
[22:51] airstep: "I also noticed that in the example they used ljmp (long 
jump), i'm not
[22:51] airstep: entirely sure, but wouldn't that be the same as JMP_FAR? not 
JMP?" - I didn't use JMP in patch - that part of code was commented...
[22:53] Logical_Error: yeah, but it seemed to work, at that location, without 
the jumps anyway..
[22:53] Logical_Error: but i just looked at the code when i wrote that, didn't 
run it yet
[22:55] airstep: ah, I'm understand now
[22:56] airstep: so, any ideas?
[22:56] Logical_Error: no not at the moment
[22:56] Logical_Error: but apparently something changes after the console is 
inited
[22:57] Logical_Error: the only thing i can think of is that the console starts 
using an interrupt
[22:57] Logical_Error: but that shouldn't matter
[22:57] Logical_Error: as interrupts are disabled before poweroff
[22:57] airstep: strange that on my system it's works
[22:57] Logical_Error: ...unless, somehow, they're enabled in a very sneaky 
way.. ?
[22:58] Logical_Error: i dunno
[22:58] Logical_Error: anyway, i'm going to get some shuteye..
[22:58] airstep: shuteye - ?
[22:58] Logical_Error: hope i've helped you get a little but further
[22:58] airstep: sleep?
[22:58] Logical_Error: shut eye = sleep
[22:58] Logical_Error: yes
[22:58] airstep: :) 
[22:59] airstep: something more
[22:59] airstep: ca say
[22:59] airstep: can*
[22:59] airstep: if I remove
[22:59] airstep: return or make function SwitchToRealMode void - system freeze
[23:00] airstep: that's strange too
[23:00] Logical_Error: that's because i think what happens is that when you set 
up the real mode stuff the whole stack is replaced
[23:00] Logical_Error: meaning that when you 'return' you return to a different 
location
[23:01] Logical_Error: different from the location from where you called 
SwitchToRealMode i mean..
[23:02] airstep: understand
[23:02] airstep: it's seems like a some kind of hack
[23:02] Logical_Error: well it might be the only way
[23:02] Logical_Error: anyway, i'm going to sleep now
[23:02] Logical_Error: ttyl
[23:02] airstep: bye
[23:02] Logical_Error: bye
[23:02] airstep: ^)
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
SharpOS-Developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sharpos-developers

Reply via email to