Skip to contentSkip to conversation

softmmu macro meaning

Qemu-devel Clemens Kolbitsch 2 participants 2 messages Sep 27, 2007

lore
Share & tools
lore
#0 lore raw

hi guys!
just a short question:

in softmmu_header.h, for example in function

glue(glue(ld, USUFFIX), MEMSUFFIX)(target_ulong ptr)

which boils down to be included in (e.g.)

op_ldl_kernel_T0_A0
or
op_ldub_user_T0_A0
or
...

does the MEMSUFFIX macro ("kernel" / "user") mean that the memory is access by code running in ring0/ring3 or does this tell about the memory region being access (mem < or > TASK_SIZE / 0xc0000000)?

and while I'm asking two other related questions I just don't quite understand:

1.) why does the TLB (e.g. tlb_table[CPU_MEM_INDEX][...]) have 2 different arrays? is this because some CPU offer different page sizes depending on a TASK_SIZE border or something??

2.) the MMUSUFFIX macro ("mmu" / "cmmu") what does this stand for??

Thanks!!!
Clemens

#1 lore raw
Quoted 3 lines · Clemens Kolbitsch

does the MEMSUFFIX macro ("kernel" / "user") mean that the memory is access by code running in ring0/ring3 or does this tell about the memory region being access (mem < or > TASK_SIZE / 0xc0000000)?

The former.

Quoted 6 lines

and while I'm asking two other related questions I just don't quite understand:

1.) why does the TLB (e.g. tlb_table[CPU_MEM_INDEX][...]) have 2 different arrays? is this because some CPU offer different page sizes depending on a TASK_SIZE border or something??

It makes more sense if you realize it's kernel/user mode not address space.

Quoted 1 line

2.) the MMUSUFFIX macro ("mmu" / "cmmu") what does this stand for??

cmmu is used to read code to execute, IIRC (different permissions).

Signature · 2 lines
Daniel Jacobowitz
CodeSourcery