ia64/xen-unstable
changeset 1079:61fc940adace
bitkeeper revision 1.713.1.1 (4027cee4DwiREGMFe_AVrFnHsCg2Ug)
Add comment.
Add comment.
author | br260@labyrinth.cl.cam.ac.uk |
---|---|
date | Mon Feb 09 18:18:12 2004 +0000 (2004-02-09) |
parents | 2c88db033b06 |
children | 7fd167963d2f |
files | BitKeeper/etc/ignore tools/xc/lib/xc_netbsd_build.c xen/include/hypervisor-ifs/hypervisor-if.h |
line diff
1.1 --- a/BitKeeper/etc/ignore Mon Feb 09 13:59:17 2004 +0000 1.2 +++ b/BitKeeper/etc/ignore Mon Feb 09 18:18:12 2004 +0000 1.3 @@ -538,3 +538,4 @@ xen/arch/i386/flushtlb.o 1.4 xen/common/rbtree.o 1.5 xen/drivers/block/cciss.o 1.6 xen/drivers/block/cciss_scsi.o 1.7 +TAGS
2.1 --- a/tools/xc/lib/xc_netbsd_build.c Mon Feb 09 13:59:17 2004 +0000 2.2 +++ b/tools/xc/lib/xc_netbsd_build.c Mon Feb 09 18:18:12 2004 +0000 2.3 @@ -503,7 +503,7 @@ loadelfimage(gzFile kernel_gfd, int pm_h 2.4 } 2.5 curpos += ehdr.e_phnum * sizeof(Elf_Phdr); 2.6 2.7 - 2.8 + /* Copy kernel .text .data .bss segments into physical memory */ 2.9 for (h = 0; h < ehdr.e_phnum; h++) { 2.10 if (phdr[h].p_type != PT_LOAD || 2.11 (phdr[h].p_flags & (PF_W|PF_X)) == 0) 2.12 @@ -585,6 +585,7 @@ loadelfimage(gzFile kernel_gfd, int pm_h 2.13 maxva += sizeof(Elf_Ehdr) + ehdr.e_shnum * sizeof(Elf_Shdr); 2.14 maxva = (maxva + ELFROUND - 1) & ~(ELFROUND - 1); 2.15 2.16 + /* Copy kernel string / symbol tables into physical memory */ 2.17 for (h = 0; h < ehdr.e_shnum; h++) { 2.18 if (shdr[h].sh_type == SHT_STRTAB) { 2.19 for (i = 0; i < ehdr.e_shnum; i++) 2.20 @@ -593,7 +594,7 @@ loadelfimage(gzFile kernel_gfd, int pm_h 2.21 break; 2.22 if (i == ehdr.e_shnum) { 2.23 shdr[h].sh_offset = 0; 2.24 - continue; 2.25 + continue; /* Skip string tables which are not for symbol tables */ 2.26 } 2.27 } 2.28 2.29 @@ -606,7 +607,7 @@ loadelfimage(gzFile kernel_gfd, int pm_h 2.30 } 2.31 curpos = shdr[h].sh_offset; 2.32 2.33 - shdr[h].sh_offset = maxva - *symtab_addr; 2.34 + shdr[h].sh_offset = maxva - *symtab_addr; /* Mangled to be based on ELF header location */ 2.35 2.36 DPRINTF(("copy section %d, size 0x%x\n", h, shdr[h].sh_size)); 2.37 for (i = 0; i < shdr[h].sh_size; i += c, maxva += c) { 2.38 @@ -635,7 +636,7 @@ loadelfimage(gzFile kernel_gfd, int pm_h 2.39 maxva = (maxva + ELFROUND - 1) & ~(ELFROUND - 1); 2.40 2.41 } 2.42 - shdr[h].sh_name = 0; 2.43 + shdr[h].sh_name = 0; /* Name is NULL */ 2.44 } 2.45 2.46 if (*symtab_len == 0) { 2.47 @@ -656,6 +657,7 @@ loadelfimage(gzFile kernel_gfd, int pm_h 2.48 memcpy(p + sizeof(int), &ehdr, sizeof(Elf_Ehdr)); 2.49 *(int *)p = maxva - *symtab_addr; 2.50 2.51 + /* Copy total length, crafted ELF header and section header table */ 2.52 s = sizeof(int) + sizeof(Elf_Ehdr) + ehdr.e_shnum * sizeof(Elf_Shdr); 2.53 for (i = 0; i < s; i += c, symva += c) { 2.54 c = PAGE_SIZE - (symva & (PAGE_SIZE - 1));
3.1 --- a/xen/include/hypervisor-ifs/hypervisor-if.h Mon Feb 09 13:59:17 2004 +0000 3.2 +++ b/xen/include/hypervisor-ifs/hypervisor-if.h Mon Feb 09 18:18:12 2004 +0000 3.3 @@ -29,10 +29,10 @@ 3.4 * are also present in the initial GDT, many OSes will be able to avoid 3.5 * installing their own GDT. 3.6 */ 3.7 -#define FLAT_RING1_CS 0x0819 3.8 -#define FLAT_RING1_DS 0x0821 3.9 -#define FLAT_RING3_CS 0x082b 3.10 -#define FLAT_RING3_DS 0x0833 3.11 +#define FLAT_RING1_CS 0x0819 /* GDT index 259 */ 3.12 +#define FLAT_RING1_DS 0x0821 /* GDT index 260 */ 3.13 +#define FLAT_RING3_CS 0x082b /* GDT index 261 */ 3.14 +#define FLAT_RING3_DS 0x0833 /* GDT index 262 */ 3.15 3.16 3.17 /*