Page 1 of 1

non-paged memory

Posted: Mon Jan 21, 2008 10:55 am
by sawdust
Maybe this question has been asked in several forms by other people. My apologies for asking again.
In a non-paged OS like pyros or exclaim, is memory mapped 1:1 ?

e.g, if a device's BAR0 is 0xf4000000 and if I want to read the contents of a hardware register at offset 0x20, what's wrong in doing this?

Code: Select all

    unsigned int tempReg = 0xf4000020;
    printf("tempReg value = 0x%x\n",*(volatile unsigned int*)tempReg); 
I'm getting garbage :?

Posted: Mon Jan 21, 2008 12:31 pm
by xyzzy
Exclaim uses paging...

EDIT: You were in the IRC channel earlier mentioning Exclaim 0.1, if you're looking at that, don't, and look at 0.2. 0.1 is completely useless

Posted: Mon Jan 21, 2008 12:54 pm
by Wave
It would depend on what segments you're using. Do they start at 0?

Posted: Mon Jan 21, 2008 1:12 pm
by sawdust
AlexExtreme wrote:Exclaim uses paging...

EDIT: You were in the IRC channel earlier mentioning Exclaim 0.1, if you're looking at that, don't, and look at 0.2. 0.1 is completely useless
Thx. But I want only a very basic kernel like 0.1 for my purpose. Does 0.1 also use paging? Who sets that feature?
Wave:
It would depend on what segments you're using. Do they start at 0?
only CS and DS are declared and they start at '0'

Posted: Mon Jan 21, 2008 1:20 pm
by Wave
I think you should set ES and SS as well. In fact, if you don't set SS I don't know how your code can run properly.

Posted: Mon Jan 21, 2008 3:15 pm
by xyzzy
sawdust wrote:Thx. But I want only a very basic kernel like 0.1 for my purpose. Does 0.1 also use paging? Who sets that feature?
I repeat, it's utterly useless. It has no memory management at all. It should never have been released. I don't know what I was thinking when I released it. It's just bkerndev with a bit of stuff changed and a small shell added. Do Not Use It (TM)