and i have some more problems.
this is my TSS (copied from linux2.6.2):
Code: Select all
struct x86_64_tss {
U32 Reserved1;
U64 Rsp0;
U64 Rsp1;
U64 Rsp2;
U64 Reserved2;
U64 IST[7];
U32 Reserved3;
U32 Reserved4;
U16 Reserved5;
U16 IoBmpBase;
}__attribute__((packed)) ____cacheline_aligned;
in fact i have only one tss in hw.cpp:Trive/microk/mm.o:(.bss+0x0): multiple definition of `____cacheline_aligned'
Trive/microk/hw.o:(.bss+0x0): first defined here
Trive/microk/proc.o:(.bss+0x0): multiple definition of `____cacheline_aligned'
Trive/microk/hw.o:(.bss+0x0): first defined here
Trive/microk/kmain.o:(.bss+0x0): multiple definition of `____cacheline_aligned'
Trive/microk/hw.o:(.bss+0x0): first defined here
Code: Select all
LOCAL VOID X64Init(){
U64 x,y;
static struct x86_64_tss Tss;
.....
}
__attribute__((packed,align(4096)));// ____cacheline_aligned;
but i don't feel good.
is the method proper or is 4096 proper?
and another question:
i got such warnings at such places:Trive/fs/filesystem.cpp:77: warning: deprecated conversion from string constant to ‘WCHAR*’
Code: Select all
printk(L"\nFS %x : 分配测试: %x ",pMe,base=mallock(pMe,1020));
printk(L"\nFS %x : 分配测试: %x ",pMe,base=mallock(pMe,1020));
printk(L"\nFS %x : 分配测试: %x ",pMe,base=mallock(pMe,1020));
Code: Select all
typedef wchar_t WCHAR;
GLOBAL I64 printk(WCHAR *str,...);
thank you,
lemonyii