Skip to contentSkip to conversation

I do not know what the code means.

DISCUSSION ZhangWeiXue 2 participants 2 messages Jun 14, 1999 Memory management

lore
Share & tools
lore
#0 lore raw

Dear all,

The following code is cut from the head.s, I do not know exactly what it do?
If you can explain the meaning of " .long 0x00102007 " and " .fill __USER_PGD_PTRS-1,4,0" for me,
I will appreciate deeply.
Best regards.

/*
* This is initialized to create a identity-mapping at 0-4M (for bootup
* purposes) and another mapping of the 0-4M area at virtual address
* PAGE_OFFSET.
*/
.org 0x1000
ENTRY(swapper_pg_dir)
.long 0x00102007
.fill __USER_PGD_PTRS-1,4,0
/* default: 767 entries */
.long 0x00102007
/* default: 255 entries */
.fill __KERNEL_PGD_PTRS-1,4,0

--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address' in the body to [email protected]. For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

#1 lore raw
Quoted 10 lines · ZhangWeiXue

Dear all,

The following code is cut from the head.s, I do not know exactly what it do?
If you can explain the meaning of " .long 0x00102007 " and " .fill __USER_PGD_PTRS-1,4,0" for me,
I will appreciate deeply.
Best regards.

Quoted 13 lines

/*
* This is initialized to create a identity-mapping at 0-4M (for bootup
* purposes) and another mapping of the 0-4M area at virtual address
* PAGE_OFFSET.
*/
.org 0x1000
ENTRY(swapper_pg_dir)
.long 0x00102007
.fill __USER_PGD_PTRS-1,4,0
/* default: 767 entries */
.long 0x00102007
/* default: 255 entries */
.fill __KERNEL_PGD_PTRS-1,4,0

Hi,

There are zero files named 'head.s' and 12 files names 'head.S' in the Linux kernel sources, so telling which file you are referring to would have been good.
However this is not an MM or even Linux related question. You will find the answer in the "Pseudo Ops" section of the GNU Assembler manual ('info as').

//Marcus

Signature · 8 lines
-------------------------------+------------------------------------
        Marcus Sundberg        | http://www.stacken.kth.se/~mackan/
 Royal Institute of Technology |       Phone: +46 707 295404
       Stockholm, Sweden       |   E-Mail: [email protected]
--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to [email protected].  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/