Computer Power Options

Apr 2, 2012 at 4:57 PM

Hi, I know that this subject was repeated several times but I got no answer. The subject says how can I Shutdown and Reboot computer in Cosmos???

 

I've looked at the ACPI.Cs file and it didn't work!! What can I do??

 

Any one can help??!!!

Apr 2, 2012 at 6:36 PM

>>It didn't work!!

What was wrong?

Apr 3, 2012 at 2:59 AM

Yeah whats wrong because I have been using this code since MS4 with a few modifications.

Apr 3, 2012 at 11:29 PM

I added the ACPI.cs file into the project and when I press "Debug" I got these errors:

Error    3    No Kernel found!    C:\Program Files\MSBuild\Cosmos\Cosmos.targets    32    10    OSBoot

Error    1    Unsafe code may only appear if compiling with /unsafe    C:\Users\AHMED\AppData\Local\Temporary Projects\OS\ACPI.cs    12    25    OS


So I allowed the unsafe code in my project and got this:

Error    2    Cosmos.IL2CPU.x86->IL->Conv_U2.cs->The size 2 could not exist, because always is pushed Int32 or Int64!
   at Cosmos.IL2CPU.X86.IL.Conv_U2.Execute(MethodInfo aMethod, ILOpCode aOpCode) in c:\Data\Sources\Cosmos\source2\IL2CPU\Cosmos.IL2CPU.X86\IL\Conv_U2.cs:line 45
   at Cosmos.IL2CPU.AppAssembler.ProcessMethod(MethodInfo aMethod, List`1 aOpCodes) in c:\Data\Sources\Cosmos\source2\IL2CPU\Cosmos.IL2CPU\AppAssembler.cs:line 155
   at Cosmos.IL2CPU.ILScanner.Execute(MethodBase aStartMethod) in c:\Data\Sources\Cosmos\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:line 427
   at Cosmos.Build.MSBuild.IL2CPUTask.Execute() in c:\Data\Sources\Cosmos\source2\Build\Cosmos.Build.MSBuild\IL2CPUTask.cs:line 249    C:\Program Files\MSBuild\Cosmos\Cosmos.targets    32    10    OSBoot

 

So what do you think I should do???

Oh I forgot to mention that I got this warning:

Warning    1    The field 'ACPIManager.ACPI.SCI_EN' is assigned but its value is never used    C:\Users\AHMED\AppData\Local\Temporary Projects\OS\ACPI.cs    22    30    OS

Coordinator
Apr 4, 2012 at 7:03 AM
the second error (Size 2..) is a compiler bug..

On Wed, Apr 4, 2012 at 1:29 AM, ahmed01000410657 <notifications@codeplex.com> wrote:

From: ahmed01000410657

I added the ACPI.cs file into the project and when I press "Debug" I got these errors:

Error 3 No Kernel found! C:\Program Files\MSBuild\Cosmos\Cosmos.targets 32 10 OSBoot

Error 1 Unsafe code may only appear if compiling with /unsafe C:\Users\AHMED\AppData\Local\Temporary Projects\OS\ACPI.cs 12 25 OS


So I allowed the unsafe code in my project and got this:

Error 2 Cosmos.IL2CPU.x86->IL->Conv_U2.cs->The size 2 could not exist, because always is pushed Int32 or Int64!
at Cosmos.IL2CPU.X86.IL.Conv_U2.Execute(MethodInfo aMethod, ILOpCode aOpCode) in c:\Data\Sources\Cosmos\source2\IL2CPU\Cosmos.IL2CPU.X86\IL\Conv_U2.cs:line 45
at Cosmos.IL2CPU.AppAssembler.ProcessMethod(MethodInfo aMethod, List`1 aOpCodes) in c:\Data\Sources\Cosmos\source2\IL2CPU\Cosmos.IL2CPU\AppAssembler.cs:line 155
at Cosmos.IL2CPU.ILScanner.Execute(MethodBase aStartMethod) in c:\Data\Sources\Cosmos\source2\IL2CPU\Cosmos.IL2CPU\ILScanner.cs:line 427
at Cosmos.Build.MSBuild.IL2CPUTask.Execute() in c:\Data\Sources\Cosmos\source2\Build\Cosmos.Build.MSBuild\IL2CPUTask.cs:line 249 C:\Program Files\MSBuild\Cosmos\Cosmos.targets 32 10 OSBoot

So what do you think I should do???

Oh I forgot to mention that I got this warning:

Warning 1 The field 'ACPIManager.ACPI.SCI_EN' is assigned but its value is never used C:\Users\AHMED\AppData\Local\Temporary Projects\OS\ACPI.cs 22 30 OS

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Apr 4, 2012 at 4:14 PM

So what do you think I should do???

Anyone can help - Thanks

Apr 4, 2012 at 4:27 PM

Can you run your OS OK without ACPI?

Apr 4, 2012 at 8:52 PM

Actually yes, but including the ACPI.cs file does not make any errors but it make errors after using this sentence in the kernel

ACPIManager.ACPI.Shutdown();

So the error comes from this sentence. I'm using VS2010


So the answer for your question is yes my OS works very well without using the ACPI.cs functions in it.

 

Thanks for support.


Coordinator
Apr 5, 2012 at 7:02 AM
Cosmos uses a scanner approach: if code isn't used, it wont get compiled.
If you leave out the Shutdown call, most likely the whole ACPI code is not being compiled by Cosmos, and the bug in the compiler isn't hit...


On Wed, Apr 4, 2012 at 10:52 PM, ahmed01000410657 <notifications@codeplex.com> wrote:

From: ahmed01000410657

Actually yes, but including the ACPI.cs file does not make any errors but it make errors after using this sentence in the kernel

ACPIManager.ACPI.Shutdown();

So the error comes from this sentence. I'm using VS2010


So the answer for your question is yes my OS works very well without using the ACPI.cs functions in it.

Thanks for support.


Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Apr 5, 2012 at 1:50 PM

So what I should I do now???

 

Any ideas!!

Coordinator
Apr 5, 2012 at 1:53 PM
contribute a fix for the compiler? :)


On Thu, Apr 5, 2012 at 3:50 PM, ahmed01000410657 <notifications@codeplex.com> wrote:

From: ahmed01000410657

So what I should I do now???

Any ideas!!

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Apr 5, 2012 at 3:20 PM

Any other ideas!!

Any other ways to shut system down without the ACPI.cs!!??

Apr 5, 2012 at 4:13 PM

2 wierd things: firstly, the ACPI code works for everyone else and secondly, howcome you get a no kernel found error?

Apr 5, 2012 at 6:41 PM

I don't know what's wrong :(

Oh, Please! can you make a simple OS that contains the ACPI.cs file and the shutdown function and upload the source for me on MediaFire for example or any thing else.

Would yo do that??

Apr 5, 2012 at 7:54 PM

What version of Cosmos are you using?

Apr 5, 2012 at 8:14 PM

I'm using VS 2010 with the latest version of Cosmos.

Apr 6, 2012 at 7:23 AM

VS Pro or Express?

Apr 6, 2012 at 8:12 PM

VS 2010 Pro!!

Thanks for your help Aurora01!

Coordinator
Apr 7, 2012 at 6:38 AM
Welcome to join development then: the compiler error you got is easy to solve...


On Fri, Apr 6, 2012 at 10:12 PM, ahmed01000410657 <notifications@codeplex.com> wrote:

From: ahmed01000410657

VS 2010 Pro!!

Thanks for your help Aurora01!

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Apr 7, 2012 at 12:35 PM

How to solve it?

You are saying it's very easy.

How to do it?

Thanks bro..

Coordinator
Apr 7, 2012 at 12:50 PM
Start by joining the cosmos-dev mailinglist, then install the devkit instead of the userkit. After that, you can modify the compiler. When you installed the devkit, first verify that the issue is still there. then ask on the mailinglist on how to do it..


On Sat, Apr 7, 2012 at 2:35 PM, ahmed01000410657 <notifications@codeplex.com> wrote:

From: ahmed01000410657

How to solve it?

You are saying it's very easy.

How to do it?

Thanks bro..

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Apr 7, 2012 at 3:22 PM

I've done this

Can you give me some steps, I mean I've installed the MS4 and MS5 and I have the files in the "Cosmos User Kit" folder.

How do I fix this pug?? an explanation or a book would be useful.

Coordinator
Apr 7, 2012 at 3:39 PM
Userkit is something different than devkit. Userkit are normal releases, devkit are developer snapshots which you install.

Please start by removing MS4 and MS5, and install latest userkit, and see if the error persists..


Op 7-4-2012 17:22, ahmed01000410657 schreef:

From: ahmed01000410657

I've done this

Can you give me some steps, I mean I've installed the MS4 and MS5 and I have the files in the "Cosmos User Kit" folder.

How do I fix this pug?? an explanation or a book would be useful.


Apr 7, 2012 at 9:55 PM

I've done this and still got the same error??

Coordinator
Apr 8, 2012 at 8:06 AM
You installed devkit? (with VS SDK installed, Innosetup QuickStart pack, running install.bat, etc)


On Sat, Apr 7, 2012 at 11:55 PM, ahmed01000410657 <notifications@codeplex.com> wrote:

From: ahmed01000410657

I've done this and still got the same error??

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com