OpenQNX :: The QNX Community Portal

May 13, 2008 - 11:52 AM
Google
  Web openqnx.com   
     Create an account Home · Submit News · QNX Forums · QNX Download · Search   
_
Main Menu
Who's Online
There are 52 unlogged users and 0 registered users online.

You can log-in or register for a user account here.

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
Eiswuerfel
Post subject: How to read the actual settings via C which are made in BIOS  PostPosted: Oct 25, 2007 - 08:31 AM
New Member


Joined: Oct 12, 2005
Posts: 4

Hi,

how do I manage to read out all the settings which are adjustable from within the BIOS?
I've got a PC which runs under QNX 6.3.2. This system needs to have some changed BIOS values, which I made by hand.
As I run my application, which talks directly to a special hardware and which is very time critical or let me say hard real time, I've to assure, that those BIOS-settings are still in use.
If some of those BIOS-settings are not in use, there will be a chance that my application may fail. But my application has to run automatically and error free all the time, without needing my help in re-adjust the BIOS-settings...

Any ideas on how to get/compare/set the actual BIOS-settings via c-code?

Martin
 
 View user's profile Send private message  
Reply with quote Back to top
rgallen
Post subject: Re: How to read the actual settings via C which are made in  PostPosted: Oct 28, 2007 - 01:39 AM
QNX Master


Joined: Jul 11, 2002
Posts: 557

Eiswuerfel wrote:
Hi,

how do I manage to read out all the settings which are adjustable from within the BIOS?
I've got a PC which runs under QNX 6.3.2. This system needs to have some changed BIOS values, which I made by hand.
As I run my application, which talks directly to a special hardware and which is very time critical or let me say hard real time, I've to assure, that those BIOS-settings are still in use.
If some of those BIOS-settings are not in use, there will be a chance that my application may fail. But my application has to run automatically and error free all the time, without needing my help in re-adjust the BIOS-settings...

Any ideas on how to get/compare/set the actual BIOS-settings via c-code?

Martin


I don't think you can change the effective BIOS settings on-the-fly (or at least it would be very difficult).

You shouldn't have too much trouble getting the settings (you need to understand the format), and maybe not even too much trouble writing these settings; however, when you write the settings they will only take effect after the next reboot (duplicating the chip programming that the BIOS does based on the setting is most likely quite difficult).

Best place for information on how to do this for your specific system would be the Linux source for /dev/nvram...

If you wanted to create a /dev/nvram for QNX, you might want to look at my free C++ class library (http://community.qnx.com/sf/projects/qfc), which would make creating the resmgr part of it very simple.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Eiswuerfel
Post subject:   PostPosted: Nov 06, 2007 - 07:48 AM
New Member


Joined: Oct 12, 2005
Posts: 4

Thansk for your answer, this was very helpful for me.

Martin
 
 View user's profile Send private message  
Reply with quote Back to top
debasis_bhadra
Post subject:   PostPosted: Feb 07, 2008 - 10:10 AM
Active Member


Joined: Jan 10, 2008
Posts: 15

hai Eiswuerfel
as you have written that you were able to access hardware via C code i think u can help me.
have you written the c code in momentics IDE to access the target system?
can u share some code by which i can draw a pixel at terget surface calling ghrapics related API(with out using PHOTON)
 
 View user's profile Send private message  
Reply with quote Back to top
Eiswuerfel
Post subject:   PostPosted: Feb 07, 2008 - 10:28 AM
New Member


Joined: Oct 12, 2005
Posts: 4

I'm sorry, but I don't access a target system, I'm working self-hosted with Momentics/Photon under 6.3 SP 3.

Martin
 
 View user's profile Send private message  
Reply with quote Back to top
debasis_bhadra
Post subject:   PostPosted: Feb 07, 2008 - 10:33 AM
Active Member


Joined: Jan 10, 2008
Posts: 15

thanks for ur response
It's ok.i think the C code will be same for self hosted or other.could u please share some code that atleast help me on my above mentioned problem(accessing hardware/draw pixel)
 
 View user's profile Send private message  
Reply with quote Back to top
Eiswuerfel
Post subject:   PostPosted: Feb 07, 2008 - 11:04 AM
New Member


Joined: Oct 12, 2005
Posts: 4

Hi again,

I'm using this kind of code to display some small previews, which are directly stamped into the actual display of my photon application.
I do it this way, because I want to use the fastest way to display some small previews which I've made by shrinking the picture width and height by 4,
while my realtime testsystem is making many tests, generating much data and sending 50 MB/s via a special PCI-card to the product to be tested.
The small previews are 192x127 and it lasts roughly 2 ms to stamp such a pre-calculated preview into the photon display.

May it help you on whatever you are doing on your system. Wink

Martin


// MyPictureData is a pointer to my pixels
// Height and Width are the size of the picture in pixels
// Pg_IMAGE_DIRECT_8888 gives the fastest way to set pixels
// Pixel data is 32-bit (reserved/red/green/blue)


PhImage_t *pPhImage = NULL;
PhPoint_t PhUpperLeftCorner;

pPhImage = PhCreateImage(NULL, Width, Height, Pg_IMAGE_DIRECT_8888, NULL, 0, 0);



// Picture data must be copied line by line, because pPhImage->bpl may be not identical with the number of visible pixels in horizontal direction
for(Index=0 ; Index < Height ; Index++)
{
memcpy(((unsigned char*)pPhImage->image) + (Index * pPhImage->bpl), ((unsigned char*)MyPictureData) + (Index * (Width * sizeof(*MyPictureData))), Width * sizeof(*MyPictureData));
}
PhUpperLeftCorner.x = MyPosX;
PhUpperLeftCorner.y = MyPosY;
PgFFlush(Ph_START_DRAW);
PgDrawImage(pPhImage->image, pPhImage->type, &PhUpperLeftCorner, &pPhImage->size, pPhImage->bpl, 0);
PgFFlush(Ph_DONE_DRAW);




PhReleaseImage(pPhImage);
 
 View user's profile Send private message  
Reply with quote Back to top
debasis_bhadra
Post subject:   PostPosted: Feb 07, 2008 - 11:11 AM
Active Member


Joined: Jan 10, 2008
Posts: 15

thanks a lot .I am trying.If anything would be positive i will inform u Very Happy
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2007 The PNphpBB Group
Credits
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.
Powered by OpenQNX: The QNX Community Portal Site
QNX and the QNX logo are registered trademarks of QNX Software Systems.