non-paged memory

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
sawdust
Member
Member
Posts: 51
Joined: Thu Dec 20, 2007 4:04 pm

non-paged memory

Post 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 :?
xyzzy
Member
Member
Posts: 391
Joined: Wed Jul 25, 2007 8:45 am
Libera.chat IRC: aejsmith
Location: London, UK
Contact:

Post 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
User avatar
Wave
Member
Member
Posts: 50
Joined: Sun Jan 20, 2008 5:51 am

Post by Wave »

It would depend on what segments you're using. Do they start at 0?
Conway's Law: If you have four groups working on a compiler, you'll get a 4-pass compiler.
Melvin Conway
sawdust
Member
Member
Posts: 51
Joined: Thu Dec 20, 2007 4:04 pm

Post 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'
User avatar
Wave
Member
Member
Posts: 50
Joined: Sun Jan 20, 2008 5:51 am

Post 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.
Conway's Law: If you have four groups working on a compiler, you'll get a 4-pass compiler.
Melvin Conway
xyzzy
Member
Member
Posts: 391
Joined: Wed Jul 25, 2007 8:45 am
Libera.chat IRC: aejsmith
Location: London, UK
Contact:

Post 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)
Post Reply