WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] RFC : 4KiB page support - x86_32.S

To: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] RFC : 4KiB page support - x86_32.S
From: Adam Sulmicki <adam@xxxxxxxxxxxx>
Date: Mon, 22 Nov 2004 16:19:27 -0500 (EST)
Delivery-date: Mon, 22 Nov 2004 21:07:20 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
Hello,
        now that I got basic patch to work, I was wondering what is the
right way to integrate it into xen.

        I have attached:
a) diff of plain x86_32.S and x86_32.S with support for 4kb pages
b) modifed x86_32.S with support for 4kb pages.

I see few issues.

For one thing PAGE_OFFSET points to "4gb - 60mb" and 60mb. This is where
the current page table stuff live. This is fine with 4mb pages as in this
configuration page table/directory occupy only 4kb.

However, once I want to duplicate current setup using 4kb of pages, I need
4MB for page tables (+4kb for page directory).

It seems to me that once I have 4mb of page tables + other stuff from
x86_32.S I would run over the 4gb mark (although with a bit of empirical
testing it did not crash right away.. not sure If I'm missing something.).

I have tried to change PAGE_OFFSET to point to "4gb - 56", but then all
hell would break lose and it would not even work with 4mb pages on pentium
3.

Thus in my code I just put the 4mb wroth of page tables at 56mb-60mb
address space, what should fit well with both low and high memory. It
seems to work fine other than it just my idea to use this particular space
for the page.

Another issue is that I don't quie understand where the mmu_cr4_features
get setup. I see the __start where xen enters and just few lines further
the mmu_cr4_features is being used without any apparent code that set it
up before.

There's still a need to add "cpuid" instruction and test
EAX=1/EDX(bit=6)  for PAE support. In that way it could enable 4kb page
support only if 4mb is not supported.

Finally, with all those additions all this asm code seems to be getting
more complex than it needs to be. LinuxBIOS Project uses C code
succesfully for lots of the low level programming. Perhaps a lot of this
x86_32.S could be changed to C code as well.

comments?





Attachment: 4kb.diff
Description: Text document

Attachment: x86_32.S
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>