I use VMWare Work station 6.0.
If you see my previous posts i was too working on PCI and faced similar issue but when the code is written in ASM the problem was solved dont know why and yes VMWare behaves differently you may even face issue if you try to write a fdd driver code.
it initialises things differently
How to start?
- naiksidd_85
- Member
- Posts: 76
- Joined: Thu Jan 17, 2008 1:15 am
Re: How to start?
Learning a lot these days THANKS to OSdev users
Re: How to start?
faced similar issue but when the code is written in ASM the problem was solved dont know why
I bet VMWare PCI emulation behaves differently than hw PCI only for buggy codeand yes VMWare behaves differently you may even face issue if you try to write a fdd driver code.
it initialises things differently
And I bet you have some problems with your C code for PCI handling. The behaviour for programming the hardware wrong is very often defined to be "unspecified", so that means there may be no standard for what is to happen, when a buggy routine talks to the PCI; so it can differ between stations.
This seem to dfifer from the wiki's example: wiki makes some bit shifting http://wiki.osdev.org/PCIreturn inportl(0xCFC);
tmp = (unsigned short)((sysInLong (0xCFC) >> ((offset & 2) * 8 )) & 0xffff);
You forgot to initialise ret.PCI_Device_t* pci_readdevice(int bus, int dev, int func)
{
PCI_Device_t* ret;
ret->VendorID = (short) (pci_read(bus,dev,func,0)&0x0000FFFF);
Re: How to start?
my return is long, the return in the wiki is short.
what do you mean to initialize?
ps: still having the vs2008 problem with no other output that echo's.
what do you mean to initialize?
ps: still having the vs2008 problem with no other output that echo's.
Re: How to start?
ret is a pointer. Later in the code you showed, you write the memory ret points at. However, you do not know what it points at. It may point at data that should not be overwritten, like your program's code or the stack. To be sure it is legal to write (and read) the memory pointed by ret, you must initialise it, that is, assigning a proper value to it like
ret = new pci_device_t;
What is vs2008 ? What is the problem: what should it do and what does it do?
ret = new pci_device_t;
What is vs2008 ? What is the problem: what should it do and what does it do?
Re: How to start?
new from where. C doesn't accept it.
ok, doesnt matter, i'll do it later. i am now focused on memory management. I have some problems with it(I'm following jamesM tutorial), cause it doesn't fault when i do the fault test(reading from an unpaged address).
vs2008 means Visual Studio 2008. I use a makefile project and there is a tool, nmake for custom build command.
the output windows shows only the output of the command echo. it should shows all(gcc, ld, nasm output, etc)
ok, doesnt matter, i'll do it later. i am now focused on memory management. I have some problems with it(I'm following jamesM tutorial), cause it doesn't fault when i do the fault test(reading from an unpaged address).
vs2008 means Visual Studio 2008. I use a makefile project and there is a tool, nmake for custom build command.
the output windows shows only the output of the command echo. it should shows all(gcc, ld, nasm output, etc)
Re: How to start?
problems again. memory management is the hardest problem.
i'm getting page fault on this line:
from the function place_ordered_array
if jamesM can tell me why and how i can implement the memory management on my system, is welcome.
this is causing me headcaches...
PS: can you recomend another memory management ideea?
i'm getting page fault on this line:
Code: Select all
memset(to_ret.array, 0, max_size*sizeof(type_t));
if jamesM can tell me why and how i can implement the memory management on my system, is welcome.
this is causing me headcaches...
PS: can you recomend another memory management ideea?
- naiksidd_85
- Member
- Posts: 76
- Joined: Thu Jan 17, 2008 1:15 am
Re: How to start?
i agree but i was saying i faced the issue and resolved it by using asm I never did say it is problem with VMWareI bet VMWare PCI emulation behaves differently than hw PCI only for buggy code
Learning a lot these days THANKS to OSdev users
Re: How to start?
have you know a very very simple memory manager code(I mean very basic paging and very basic mem alloc).
I'm so noob even the forum search is too hard to use properly(I mean to find what i want).
i haven't found any topic that could help me. If you can, thank you. Even if it is a very simple code, i'll improve later.
Anyway, my code is so buggy, it restarts before starts .
Thanks for helping a poor noob....
EDIT: sorry for my english
I'm so noob even the forum search is too hard to use properly(I mean to find what i want).
i haven't found any topic that could help me. If you can, thank you. Even if it is a very simple code, i'll improve later.
Anyway, my code is so buggy, it restarts before starts .
Thanks for helping a poor noob....
EDIT: sorry for my english
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: How to start?
Then practice google skills first
There are too many examples of this (in and out of the forum) that it couldn't be that you can't find any.
There are too many examples of this (in and out of the forum) that it couldn't be that you can't find any.