lkml.org 
[lkml]   [2004]   [Mar]   [2]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
From(H. Peter Anvin)
SubjectRe: [CFT][PATCH] 2.6.4-rc1 remove x86 boot page tables
DateTue, 2 Mar 2004 09:21:15 +0000 (UTC)
Followup to:  <m1vflp81kq.fsf@ebiederm.dsl.xmission.com>
By author:    ebiederm@xmission.com (Eric W. Biederman)
In newsgroup: linux.dev.kernel
> > -	.quad 0x0000000000000000	/* 0x20 unused */> -	.quad 0x0000000000000000	/* 0x28 unused */> +	.quad 0x40cf9a000000ffff	/* 0x20 kernel 4G code at 0-__PAGE_OFFSET */
> +	.quad 0x40cf92000000ffff	/* 0x28 kernel 4G data at 0-__PAGE_OFFSET */
> 

This needs to actually be derived from __PAGE_OFFSET (it may or may
not be 0xc0000000.)
I'd suggest:

/* Create a descriptor from (base,limit,flags) */
/* Limit is in 20-bit form! */
#define DESC(b,l,f)     .long (((l) & 0x0ffff)) |\
                              (((b) & 0x0000ffff) << 16), \
			      (((b) & 0x00ff0000) >> 16) | \
                              (((l) & 0xf0000)) | \
                              (((f) & 0xf0ff) << 8) | \
			      (((b) & 0xff000000))
        DESC(-__PAGE_OFFSET,0xfffff,0xc09a)       /* 0x20 kernel 4G code at -__PAGE_OFFSET */
        DESC(-__PAGE_OFFSET,0xfffff,0xc092)       /* 0x28 kernel 4G code at -__PAGE_OFFSET */
[It broken up into .longs like that, because gas doesn't seem to
handle 64-bit arithmetric.]

Writing all the descriptors in that form may be a good thing :)

	-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:01    [from the cache]
©2003-2008