You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
(147) |
May
(104) |
Jun
(587) |
Jul
(83) |
Aug
(270) |
Sep
(1) |
Oct
(133) |
Nov
(353) |
Dec
(129) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(15) |
Feb
(31) |
Mar
(32) |
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(22) |
Dec
|
From: Itsuro O. <od...@us...> - 2006-01-05 23:26:11
|
Update of /cvsroot/mkdump/mkexecpatch/2.0/debian/2.6.8/arch/i386/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30627/arch/i386/kernel Modified Files: minik_dump.c Removed Files: setup.c Log Message: for mkdump 2.0 update 1 Index: minik_dump.c =================================================================== RCS file: /cvsroot/mkdump/mkexecpatch/2.0/debian/2.6.8/arch/i386/kernel/minik_dump.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** minik_dump.c 9 Dec 2005 12:39:31 -0000 1.3 --- minik_dump.c 5 Jan 2006 23:26:03 -0000 1.4 *************** *** 55,60 **** struct crashmem *crashmem_dma, *crashmem_main; ! EXPORT_SYMBOL(crashmem_dma); ! EXPORT_SYMBOL(crashmem_main); static void __init crashmem_free(struct crashmem *crashmem) --- 55,64 ---- struct crashmem *crashmem_dma, *crashmem_main; ! ! struct crashmem *crashmem_get(int isdma) ! { ! return isdma ? crashmem_dma : crashmem_main; ! } ! EXPORT_SYMBOL(crashmem_get); static void __init crashmem_free(struct crashmem *crashmem) *************** *** 108,112 **** crashmem->base_pa = __pa(base_va); crashmem->size_bytes = val_ul; - crashmem->pages_ro = 0; *crashmem_pointer = crashmem; printk("mkexec: Allocated 0x%lx of %s memory @0x%lx\n", --- 112,115 ---- *************** *** 119,225 **** module_param_call(crashmain, crashmem_set, NULL, &crashmem_main, 0); - - /* - * Initialize 'mkexecpatch_mem_seg'. - */ - - struct mem_seg mkexecpatch_mem_seg; - - static int seg_list_compar(const struct mem_seg_list *a, const struct mem_seg_list *b) - { - return (b->seg_start_pfn < a->seg_start_pfn) - - (b->seg_start_pfn > a->seg_start_pfn); - } - - static void mem_seg_merge(struct mem_seg *mem_seg) - { - struct mem_seg_list *mem_seg_list; - - sort(mem_seg->seg_list, mem_seg->seg_num, sizeof(*mem_seg->seg_list), - (int (*)(const void *, const void *))seg_list_compar, NULL); - for (mem_seg_list = mem_seg->seg_list; - mem_seg_list < mem_seg->seg_list + mem_seg->seg_num - 1; - mem_seg_list++) { - if (mem_seg_list[0].seg_start_pfn + mem_seg_list[0].seg_size_pfn - != mem_seg_list[1].seg_start_pfn) - continue; - /* Merge mem_seg_list[1] into mem_seg_list[0]. */ - mem_seg_list[0].seg_size_pfn += mem_seg_list[1].seg_size_pfn; - /* Shift the rest 'from mem_seg_list[2] upwards' downwards. */ - memmove(mem_seg_list + 1, mem_seg_list + 2, - (u8 *)(mem_seg->seg_list + mem_seg->seg_num) - - (u8 *)(mem_seg_list + 2)); - mem_seg_list--; - } - } - - /* Returns: success */ - static int mem_seg_list_pfn_extend_try(struct mem_seg_list *mem_seg_list, unsigned long pfn) - { - if (pfn == mem_seg_list->seg_start_pfn + mem_seg_list->seg_size_pfn) { - mem_seg_list->seg_size_pfn++; - return 1; - } - return 0; - } - - /* Append 'NODE_DATA(nodeid)->bdata' to: mkexecpatch_mem_seg */ - void mkexecpatch_mem_seg_append(int nodeid) - { - struct pglist_data *pglist_data; - struct mem_seg_list *mem_seg_list_cache = NULL; - struct mem_seg *mem_seg; - unsigned long pfn; - struct bootmem_data *bdata; - - pglist_data = NODE_DATA(nodeid); - bdata = pglist_data->bdata; - mem_seg = &mkexecpatch_mem_seg; - - mem_seg->page_size = PAGE_SIZE; - /* Assume initial: mem_seg->seg_num = 0; */ - - for (pfn = bdata->node_boot_start / PAGE_SIZE; - pfn < bdata->node_low_pfn; - pfn++) { - if (test_bit(pfn - (bdata->node_boot_start / PAGE_SIZE), - bdata->node_bootmem_map)) - continue; - - if (mem_seg_list_cache - && mem_seg_list_pfn_extend_try(mem_seg_list_cache, pfn)) - continue; - for (mem_seg_list_cache = mem_seg->seg_list; - mem_seg_list_cache < mem_seg->seg_list + mem_seg->seg_num; - mem_seg_list_cache++) - if (mem_seg_list_pfn_extend_try(mem_seg_list_cache, pfn)) - continue; - mem_seg_list_cache = NULL; /* It became invalid here! */ - if (mem_seg->seg_num >= ARRAY_SIZE(mem_seg->seg_list)) { - printk(KERN_ERR "mkexec: Ignoring memory above pfn 0x%lx" - ", MAX_MEM_SEG exceeded!\n", pfn); - break; - } - /* 'mem_seg_list_cache' caching is just sideeffect here. */ - mem_seg_list_cache = mem_seg->seg_list + mem_seg->seg_num; - mem_seg_list_cache->seg_start_pfn = pfn; - mem_seg_list_cache->seg_size_pfn = 1; - mem_seg->seg_num++; - } - mem_seg_merge(mem_seg); - #if 0 /* 'mem_seg_list' debug dump */ - { - struct mem_seg_list *mem_seg_list; - - for (mem_seg_list = mem_seg->seg_list; - mem_seg_list < mem_seg->seg_list + mem_seg->seg_num; - mem_seg_list++) - printk(KERN_INFO "mem_seg_list: pfn 0x%lx .. pfn 0x%lx (- 1)\n", - (unsigned long)(mem_seg_list->seg_start_pfn), - (unsigned long)(mem_seg_list->seg_start_pfn + mem_seg_list->seg_size_pfn)); - } - #endif - } - /* * Export Symbols for mkexec (i386 specific) --- 122,125 ---- *************** *** 238,242 **** EXPORT_SYMBOL(__PAGE_KERNEL_EXEC); EXPORT_SYMBOL(saved_command_line); - EXPORT_SYMBOL(mkexecpatch_mem_seg); #ifdef CONFIG_X86_PAE --- 138,141 ---- --- setup.c DELETED --- |
From: Itsuro O. <od...@us...> - 2006-01-05 23:26:11
|
Update of /cvsroot/mkdump/mkexecpatch/2.0/debian/2.6.8/arch/x86_64/mm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30627/arch/x86_64/mm Removed Files: numa.c Log Message: for mkdump 2.0 update 1 --- numa.c DELETED --- |
From: Itsuro O. <od...@us...> - 2005-12-27 23:28:54
|
Update of /cvsroot/mkdump/mkexec/2.0/2.6 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2523 Modified Files: README Log Message: add note for poweroff Index: README =================================================================== RCS file: /cvsroot/mkdump/mkexec/2.0/2.6/README,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** README 27 Dec 2005 07:43:11 -0000 1.6 --- README 27 Dec 2005 23:28:47 -0000 1.7 *************** *** 230,233 **** --- 230,234 ---- =halt =poweroff + note: working poweroff is hardware dependent dump_delay: specifies wait time before dump start (for waiting completion of |
From: Itsuro O. <od...@us...> - 2005-12-27 07:43:19
|
Update of /cvsroot/mkdump/mkexec/2.0/2.6 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31414 Modified Files: README Log Message: remove "," in the setting of /proc/mkexec/parameter Index: README =================================================================== RCS file: /cvsroot/mkdump/mkexec/2.0/2.6/README,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** README 27 Dec 2005 05:57:46 -0000 1.5 --- README 27 Dec 2005 07:43:11 -0000 1.6 *************** *** 236,240 **** ex. ! # echo "mkdump_reboot=halt, dump_delay=0" > /proc/mkexec/parameter Set the path name of the mini kernel: --- 236,240 ---- ex. ! # echo "mkdump_reboot=halt dump_delay=0" > /proc/mkexec/parameter Set the path name of the mini kernel: |
From: Itsuro O. <od...@us...> - 2005-12-27 05:57:56
|
Update of /cvsroot/mkdump/mkexec/2.0/2.6/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19175/kernel Modified Files: Makefile Makefile.26 Makefile.base Log Message: fix Makefile bug Index: Makefile.26 =================================================================== RCS file: /cvsroot/mkdump/mkexec/2.0/2.6/kernel/Makefile.26,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile.26 9 Dec 2005 13:18:11 -0000 1.2 --- Makefile.26 27 Dec 2005 05:57:46 -0000 1.3 *************** *** 21,25 **** # ! ARCH = i386 KMODSRC := mkexec.c KMODOBJ := $(KMODSRC:.c=.o) --- 21,25 ---- # ! #ARCH = i386 KMODSRC := mkexec.c KMODOBJ := $(KMODSRC:.c=.o) Index: Makefile =================================================================== RCS file: /cvsroot/mkdump/mkexec/2.0/2.6/kernel/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile 14 Dec 2005 22:00:32 -0000 1.5 --- Makefile 27 Dec 2005 05:57:46 -0000 1.6 *************** *** 21,34 **** # ! ARCH = x86_64 ! KVER = 24 ! TOPDIR = /usr/src/linux ! THISDIR = /usr/src/mkexec/kernel ! ifeq ($(KVER),26) include $(THISDIR)/Makefile.26 endif ! ifeq ($(KVER),24) export TOPDIR include $(THISDIR)/Makefile.24 --- 21,35 ---- # ! ARCH = i386 ! KTYPE = 26 ! TOPDIR = /home/src/linux-2.6.12-mkexec-v2-update ! THISDIR = /home/src/mkdump-v2.0/mkexec-module-2.1/kernel ! KVER = 2.6.12-mkexec ! ifeq ($(KTYPE),26) include $(THISDIR)/Makefile.26 endif ! ifeq ($(KTYPE),24) export TOPDIR include $(THISDIR)/Makefile.24 Index: Makefile.base =================================================================== RCS file: /cvsroot/mkdump/mkexec/2.0/2.6/kernel/Makefile.base,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile.base 14 Dec 2005 03:31:25 -0000 1.5 --- Makefile.base 27 Dec 2005 05:57:46 -0000 1.6 *************** *** 24,29 **** CC= gcc LD= ld ! KVER= 2.6.12-mkexec-v2 ! KDIR= /usr/src/linux SBINDIR= /usr/sbin KMODDIR= /lib/modules/$(KVER) --- 24,29 ---- CC= gcc LD= ld ! #KVER= 2.6.12-mkexec-v2 ! KDIR= $(TOPDIR) SBINDIR= /usr/sbin KMODDIR= /lib/modules/$(KVER) |
From: Itsuro O. <od...@us...> - 2005-12-27 05:57:56
|
Update of /cvsroot/mkdump/mkexec/2.0/2.6 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19175 Modified Files: README Log Message: fix Makefile bug Index: README =================================================================== RCS file: /cvsroot/mkdump/mkexec/2.0/2.6/README,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** README 27 Dec 2005 00:25:56 -0000 1.4 --- README 27 Dec 2005 05:57:46 -0000 1.5 *************** *** 154,164 **** # vi kernel/Makefile ! Change "ARCH", "KVER", "TOPDIR" and "THISDIR" for your environment. ex. ARCH = x86_64 # specify "i386" or "x86_64" ! KVER = 24 # specify "24" for kernel 2.4 or "26" for kernel 2.6 TOPDIR = /usr/src/linux-mkexec # specify the top directory of mkexec kernel THISDIR = /usr/src/modules/mkexec/kernel # specify the directory this Makefile exists 3) Make symbolic link --- 154,165 ---- # vi kernel/Makefile ! Change "ARCH", "KTYPE", "KVER", "TOPDIR" and "THISDIR" for your environment. ex. ARCH = x86_64 # specify "i386" or "x86_64" ! KTYPE = 24 # specify "24" for kernel 2.4 or "26" for kernel 2.6 TOPDIR = /usr/src/linux-mkexec # specify the top directory of mkexec kernel THISDIR = /usr/src/modules/mkexec/kernel # specify the directory this Makefile exists + KVER = 2.6.12-mkexec # specify the kernel suffix (=> /lib/modules/$(KVER)) 3) Make symbolic link |
From: Itsuro O. <od...@us...> - 2005-12-27 00:53:24
|
Update of /cvsroot/mkdump/utils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13532 Removed Files: README Log Message: remove --- README DELETED --- |
From: Itsuro O. <od...@us...> - 2005-12-27 00:26:04
|
Update of /cvsroot/mkdump/mkexec/2.0/2.6 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10335 Modified Files: README Log Message: change -p0 to -p4. delete .gz Index: README =================================================================== RCS file: /cvsroot/mkdump/mkexec/2.0/2.6/README,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** README 26 Dec 2005 04:54:44 -0000 1.3 --- README 27 Dec 2005 00:25:56 -0000 1.4 *************** *** 10,23 **** x. README (this file) a. mkexec kernel module ! mkexec-module-2.1.tar.gz b. mkexec kernel patch ! b-1) mkexec-patch-2.6.12-2.1.gz ! b-2) mkexec-patch-rh-2.4.21-27-2.1.gz ! b-3) mkexec-patch-rh-2.4.21-32-2.1.gz c. mini kernel patch ! c-1) minik-patch-2.6.12-2.1.gz ! c-2) minik-patch-2.6.9-1.2.gz d. mkdump utilities ! mkdutils-2.1.tar.gz * support architecture: i386, x86_64 --- 10,23 ---- x. README (this file) a. mkexec kernel module ! mkexec-module-2.1.tar b. mkexec kernel patch ! b-1) mkexec-patch-2.6.12-2.1 ! b-2) mkexec-patch-rh-2.4.21-27-2.1 ! b-3) mkexec-patch-rh-2.4.21-32-2.1 c. mini kernel patch ! c-1) minik-patch-2.6.12-2.1 ! c-2) minik-patch-2.6.9-1.2 d. mkdump utilities ! mkdutils-2.1.tar * support architecture: i386, x86_64 *************** *** 80,84 **** ex. # cd /usr/src/linux-minik ! # patch -p0 < minik-patch-2.6.12-2.1 3) Configuration --- 80,84 ---- ex. # cd /usr/src/linux-minik ! # patch -p4 < minik-patch-2.6.12-2.1 3) Configuration *************** *** 123,127 **** ex. # cd /usr/src/linux-mkexec ! # patch -p0 < mkexec-patch-2.6.12-2.1 3) Configuration --- 123,127 ---- ex. # cd /usr/src/linux-mkexec ! # patch -p4 < mkexec-patch-2.6.12-2.1 3) Configuration *************** *** 147,151 **** # mkdir /usr/src/modules # cd /usr/src/modules ! # tar -xzf mkexec-module-2.1.tar.gz 2) Edit the Makefile --- 147,151 ---- # mkdir /usr/src/modules # cd /usr/src/modules ! # tar -xf mkexec-module-2.1.tar 2) Edit the Makefile *************** *** 276,280 **** ex. # cd /usr/local/src/ ! # tar zxf mkdutils-2.1.tar.gz 2) Make --- 276,280 ---- ex. # cd /usr/local/src/ ! # tar xf mkdutils-2.1.tar 2) Make |
From: Itsuro O. <od...@us...> - 2005-12-26 04:54:58
|
Update of /cvsroot/mkdump/mkexec/2.0/2.6 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26333 Modified Files: README Log Message: re-write for v2.0 update 1 Index: README =================================================================== RCS file: /cvsroot/mkdump/mkexec/2.0/2.6/README,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README 9 Dec 2005 13:18:10 -0000 1.2 --- README 26 Dec 2005 04:54:44 -0000 1.3 *************** *** 1,30 **** ! README for Mini Kernel Dump 2.0 ! ------------------------------- ! $Id$ ! Supported Linux Kernel Versions and Architechtures ! -------------------------------------------------- ! - Linux kernel: 2.6.12 ! - Architectures: i386, x86_64 ! Build Child / minik / Mini Dump Linux Kernel ! -------------------------------------------- ! 1) Apply the "minik-2.6.12-2.0.tar.gz" patchset to the Linux kernel 2.6.12 ! # cd /usr/src/linux-2.6.12-minik ! # cat ../minik-2.6.12-2.0/*.patch|patch -sEp1 - 2) Configration ! # make menuconfig ! ! Turn on: ! CONFIG_DUMP_MINI_KERNEL: Mini Kernel - minik: possibility to run as post-crash dumping kernel ! General rules to build a minimized kernel image: - no SMP - no swap --- 1,98 ---- ! README for Mini Kernel Dump (version 2 update 1) ! ------------------------------------------------ + See the following URL for more information about MKDUMP. + http://mkdump.sourceforge.net ! Contents of this package ! ------------------------ ! x. README (this file) ! a. mkexec kernel module ! mkexec-module-2.1.tar.gz ! b. mkexec kernel patch ! b-1) mkexec-patch-2.6.12-2.1.gz ! b-2) mkexec-patch-rh-2.4.21-27-2.1.gz ! b-3) mkexec-patch-rh-2.4.21-32-2.1.gz ! c. mini kernel patch ! c-1) minik-patch-2.6.12-2.1.gz ! c-2) minik-patch-2.6.9-1.2.gz ! d. mkdump utilities ! mkdutils-2.1.tar.gz + * support architecture: i386, x86_64 ! * the following combinations are available ! = for vanilla kernel ! +-----------+---------------+--------+ +--------+-------+ +---------+ ! | mkexec | mkexec | mkexec | | mini | minik | | utility | ! | kernel | patch | module | | kernel | patch | | | ! +-----------+---------------+--------+ +--------+-------+ +---------+ ! | 2.6.12 | b-1 | a | | 2.6.12 | c-1 | | d | ! | | | | +--------+-------+ | | ! | | | | | 2.6.9 | c-2 | | | ! +-----------+---------------+--------+ +--------+-------+ +---------+ ! = for Red Hat ! +-----------+---------------+--------+ +--------+-------+ +---------+ ! | 2.4.21-20 | i386: no need | | | 2.6.9 | c-2 | | | ! +-----------| x86_64: b-2 | | | | | | | ! | 2.4.21-27 | | | | | | | | ! +-----------+---------------| a | | | | | d | ! | 2.4.21-32 | i386: no need | | | | | | | ! +-----------| x86_64: b-3 | | | | | | | ! | 2.4.21-37 | | | | | | | | ! +-----------+---------------+--------+ +--------+-------+ +---------+ ! for debian 2.6.8 and vanilla 2.4.27, use the old version of mkdump at this moment. ! Installation ! ------------ ! Mini Kernel Dump consists of three parts: ! ! * minik - Mini Kernel ! Patch to build a special Linux kernel version to dump all the memory to ! a device. ! ! * mkexecpatch - MKEXEC kernel ! Hook and support functions to be able to load "mkexec-module". ! This patch must be applied to your standard running Linux kernel to be able ! to dump its faults. ! ! * mkexec-module - MKEXEC kernel module to load Mini Kernel ! Load this Linux kernel module to "mkexecpatch"-ed Linux kernel to be able to ! use the dumping functionality. This module will enable you to load ! 'minik - Mini Kernel' into memory and automatically launch it when needed. ! ! ! Build Mini Kernel ! ----------------- ! ! 1) Prepare the target kernel ! ex. ! # cd /usr/src ! # tar -xjf linux-2.6.12.tar.bz2 ! # mv linux-2.6.12 linux-minik ! ! 2) Apply the patch ! ex. ! # cd /usr/src/linux-minik ! # patch -p0 < minik-patch-2.6.12-2.1 ! ! 3) Configuration ! ! # make menuconfig ! ! Turn on CONFIG_DUMP_MINI_KERNEL: ! ! * 2.6.9 + minik-patch-2.6.9-1.2 ! Select "Make dump mini kernel" in the "General setup" ! ! * 2.6.12 + minik-patch-2.6.12-2.1 ! Select "Mini Kernel" in the "Processor type and features" ! ! General rules to build a minimized kernel image: - no SMP - no swap *************** *** 33,87 **** - your required block device driver choose as built-in (Y) ! 3) Build ! # make bzImage - Note: Do not use "bzImage" for mkexec, use: arch/i386/boot/compressed/vmlinux.bin ! 4) Test only: Run the mini kernel standalone. ! It is possible to run the mini kernel "bzImage" standalone. ! No data will be dumped in this case but you can check its booting. ! You can try different Mini Kernel load addresses by choosing alternate: ! CONFIG_PHYSICAL_START: Physical address where the kernel is loaded ! (CONFIG_EXPERIMENTAL is required as Y) ! Build Parent / mkexecpatch Linux Kernel ! --------------------------------------- ! 1) Apply the "mkexecpatch-2.6.12-2.0.tar.gz" patchset to the Linux kernel 2.6.12 ! # cd /usr/src/linux-2.6.12-mkexecpatch ! # cat ../mkexecpatch-2.6.12-2.0/*.patch|patch -sEp1 - 2) Configration ! # make menuconfig ! ! Turn on: ! CONFIG_DUMP_MKEXEC: Mini Kernel - mkexec: possibility to load post-crash dumping kernel ! 3) Build "bzImage" ! # make bzImage ! Build Parent Linux Kernel Loader Module / mkexec (This Package) ! --------------------------------------------------------------- ! 1) Build the module ! # vi kernel/Makefile.base ! Edit "KVER", "KDIR" and "KMODDIR" for your system. ! # rm -f include/asm ! # ln -s asm-i386 include/asm ! # make ARCH=i386 ! Resulting module: kernel/mkexec.ko --- 101,174 ---- - your required block device driver choose as built-in (Y) ! 4) Build ! # make bzImage ! ! Note: Do not use "bzImage" for mkexec, ! use: arch/[i386|x86_64]/boot/compressed/vmlinux.bin ! Build MKEXEC kernel ! ------------------- ! Note: for RHEL3 (i386) this is not necessary. ! 1) Prepare the target kernel ! ex. ! # cd /usr/src ! # tar -xjf linux-2.6.12.tar.bz2 ! # mv linux-2.6.12 linux-mkexec ! 2) Apply the patch ! ex. ! # cd /usr/src/linux-mkexec ! # patch -p0 < mkexec-patch-2.6.12-2.1 + 3) Configuration ! # make menuconfig ! Turn on CONFIG_DUMP_MKEXEC: ! * 2.6.12 + mkexec-patch-2.6.12-2.1 ! Select "Mini Kernel - mkexec" in the "Processor type and features" ! * other ! no need ! 4) Build ! ex. ! # make bzImage; make modules; make modules_install; make install ! Build MKEXEC Kernel Module ! -------------------------- ! 1) Extract the source ! ex. ! # mkdir /usr/src/modules ! # cd /usr/src/modules ! # tar -xzf mkexec-module-2.1.tar.gz ! 2) Edit the Makefile + # cd /usr/src/modules/mkexec + # vi kernel/Makefile ! Change "ARCH", "KVER", "TOPDIR" and "THISDIR" for your environment. ! ex. ! ARCH = x86_64 # specify "i386" or "x86_64" ! KVER = 24 # specify "24" for kernel 2.4 or "26" for kernel 2.6 ! TOPDIR = /usr/src/linux-mkexec # specify the top directory of mkexec kernel ! THISDIR = /usr/src/modules/mkexec/kernel # specify the directory this Makefile exists ! 3) Make symbolic link ! # ln -s asm-i386 include/asm # for i386 ! or ! # ln -s asm-x86_64 include/asm # for x86_64 ! 4) Make ! # make *************** *** 89,192 **** -------------------- ! 1) Reboot to your patched parent / mkexecpatch Linux kernel with arguments: ! crashdma=1M crashmain=16M ! 2) Load mkexec.ko ! # insmod kernel/mkexec.ko ! 3) Load Child / minik / Mini Dump Linux Kernel # echo "0x800012" > /proc/mkexec/dumpdev - Specify the device number of the dump device. Bits 20..31 are block device - major number, bits 0..19 are block device minor. - Check the device number of your device by command like: ls -l /dev/sda4 ! # echo "..." > /proc/mkexec/parameter ! Specify additional Linux kernel parameters for the child Mini Dump kernel. ! Optional. ! # echo ".../vmlinux.bin" > /proc/mkexec/path ! Specify the Mini Dump Linux kernel's full disk pathname. # echo 1 > /proc/mkexec/stats - Load the Mini Dump Linux kernel's binary into memory. ! 4) Start the Mini Dump kernel. If BUG(), panic() or nmi_watchdog occurs the Mini Dump kernel will be launched. ! Manual dump test invocation: echo 2 >/proc/mkexec/stats - Crash Dumps Analysis - -------------------- - Tools for retrieval of the dumped data from your target partition: - http://prdownloads.sourceforge.net/mkdump/mkd_conv.taz?download ! Optional Stack Checking ! ----------------------- ! Protection against stacks overflow may not be caught by just this package. ! You may want to apply "stackoverflow" patch according to: ! http://mkdump.sourceforge.net/cvs.html ! TODO ! ---- ! * Code cleanup ! * Support for: IA-64, ppc64 ! Known Bugs ! ---------- ! * "noapic" is now required for the child / Mini Dump Linux kernel. ! It is appended automatically by the parent / mkexec Linux kernel. ! LAPIC/IO-APIC state is suspended/restored by the parent / mkexec kernel ! and the legacy interrupts work again to bootstrap the child / minik kernel. ! Unfortunately IO-APIC fails to get reinitialized by the child / minik kernel. ! Changes since 1.90 ! ------------------ ! * x86_64 port; using new-style pages remapping for its position independence. ! * Avoid dumping discontiguous memory holes of the parent kernel. ! * Build tools compatibility fixes. ! Changes since 1.0 ! ----------------- ! * Page tables child / minik remapping replaced by launch-time relocations. ! * "/proc/mkexec/mem" replaced by "crashdma=" and "crashmain=". ! * LAPICs/IO-APIC no longer stuck. At least until the next bugreport. ! * Target device size checked at the minik load time. ! Update from the beta release 1 ! ------------------------------ ! * support x86_64 ! * support the cpu not support PAE (ex. Pentium M) ! Update from the beta release 2 ! ------------------------------ ! * we check the code from crash (panic(), BUG() etc) occur to the mini kernel start ! carefully, and make no deadlock or hang condition occur completely. ! Update from the beta release 3 ! ------------------------------ ! * Even if CONFIG_ACPI=y is specified with x86_64 architecture, mini-kernel doesn't ! hang. ! -- Portions Copyright (C) 2004-2005 NTT DATA CORPORATION. Portions Copyright (C) 2004-2005 VA Linux Systems Japan K.K. --- 176,335 ---- -------------------- ! 1) The MKEXEC kernel boot parameters ! * 2.6.12 + mkexec-patch-2.6.12-2.1 ! Add the following parameters to the kernel boot parameters. ! crashdma=1M crashmain=16M ! crashdma=nn[KMG] ! [MKEXEC,KNL] Reserve a chunk of physical memory ! suitable for a kernel (minik) switched to on panic. ! This memory will be DMA-able (below 16MB for i386). ! You should need at most about 1 MB of such memory ! but it depends a lot on your SCSI controllers. ! crashmain=nn[KMG] ! [MKEXEC,KNL] Reserve a chunk of physical memory to ! hold a kernel (minik) to switch to with mkexec on panic. ! This memory will be LOW on i386 (16 - 896 MB range). ! You usually need about 16 MB memory area. ! * other ! none ! ! 2) Load the MKEXEC module ! ! # insmod /usr/src/modules/mkexec/kernel/mkexec.o # for kernel 2.4 ! or ! # insmod /usr/src/modules/mkexec/kernel/mkexec.ko # for kernel 2.6 ! ! ! 3) Load the Mini kernel + Set the dump device: + ex. # echo "0x800012" > /proc/mkexec/dumpdev ! Specify the device number of the dump device. Bits 20..31 are block device ! major number, bits 0..19 are block device minor. ! Check the device number of your device by command like: ls -l /dev/sda4 ! Set the boot parameters of the mini kernel: ! ex. ! # echo "console=tty0 console=ttyS0,115200n8r" > /proc/mkexec/parameter ! ! * for RHEL3 (i386), the following parameters must be specified ! "lpj=" and "no-hlt" ! ex. ! # echo "lpj=2367488 no-hlt" > /proc/mkexec/parameter ! ! * the following parameters are available for the mini kernel ! mkdump_reboot: specifies action after dump done ! mkdump_reboot=reboot (default) ! =halt ! =poweroff ! ! dump_delay: specifies wait time before dump start (for waiting completion of ! device driver initialization) ! dump_delay=second (default == 5) ! ! ex. ! # echo "mkdump_reboot=halt, dump_delay=0" > /proc/mkexec/parameter ! ! Set the path name of the mini kernel: ! ex. ! # echo "/usr/src/linux-minik/arch/i386/boot/compress/vmlinux.bin" > /proc/mkexec/path ! ! Set the amount of memory the mini kernel uses: ! ex. ! # echo 16 > /proc/mkexec/mem # reserve 16MB of memory ! ! This is necessary only for RHEL3 i386. This must be multiple of 4. ! ! Load the mini kernel image: # echo 1 > /proc/mkexec/stats ! ! Note: the "mkd_load" utility make above tasks easy. ! ! ! Start the Mini Kernel ! --------------------- If BUG(), panic() or nmi_watchdog occurs the Mini Dump kernel will be launched. ! Manual capturing dump: echo 2 >/proc/mkexec/stats + Note: for x86_64, /proc/sys/kernel/panic_on_oops should turn on. + # echo 1 > /proc/sys/kernel/panic_on_oops + *** utilities for the mkdump *** ! Installation ! ------------ ! 1) Extract the source + ex. + # cd /usr/local/src/ + # tar zxf mkdutils-2.1.tar.gz ! 2) Make ! # cd /usr/local/src/mkdutils ! # make ! Contents of this package ! ------------------------ ! 1) mkd_load + load and setup the mkdump according to the /etc/mkdump/mkdump environment file. ! 2) mkd_save ! save the dump from the dump device to a permanent directory according to ! the /etc/mkdump/mkdump environment file. + 3) mkd_chk ! check the dump device whether the dump was captured or not. ! this command is used in mkd_save internaly. ! 4) /etc/mkdump/mkdump + see mkdump-config-sample. ! 5) mkd_conv ! ! There are dump format conversion tools. ! "mini kernel dump" only offers the dump capturing function. ! You can use any analisys tool by converting the dump format. ! This directory includes three tools. ! - mkd2lkcd_i386 ! mkdump format to lkcd format (for i386) ! - mkd2lkcd_x86_64 ! mkdump format to lkcd format (for x86_64) ! - elf2lkcd_i386 ! vmcore format to lkcd format (for i386) + These codes also intend to explain the mkdump format and to + show the format conversion is easy task. ! Note: we use "crash" command rather than "lcrash" command. ! Remark ! ------ + these programs are offered as sample programs. there is nowarranty for + these programs. ! -- Portions Copyright (C) 2004-2005 NTT DATA CORPORATION. Portions Copyright (C) 2004-2005 VA Linux Systems Japan K.K. + |
From: kaku <fk...@us...> - 2005-12-19 05:15:37
|
Update of /cvsroot/mkdump/utils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17644 Modified Files: README Log Message: Changed a path of mkdump configuration file not to depend to RedHat directory tree. /etc/sysconfig/mkdump -> /etc/mkdump/mkdump Index: README =================================================================== RCS file: /cvsroot/mkdump/utils/README,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** README 18 Nov 2005 03:49:40 -0000 1.1 --- README 19 Dec 2005 05:15:23 -0000 1.2 *************** *** 3,7 **** 1. mkd_load ! load and setup the mkdump according to the /etc/sysconfig/mkdump environment file. --- 3,7 ---- 1. mkd_load ! load and setup the mkdump according to the /etc/mkdump/mkdump environment file. *************** *** 9,13 **** save the dump from the dump device to a permanent directory ! according to the /etc/sysconfig/mkdump environment file. 3. mkd_chk --- 9,13 ---- save the dump from the dump device to a permanent directory ! according to the /etc/mkdump/mkdump environment file. 3. mkd_chk *************** *** 20,24 **** # make ! 4. /etc/sysconfig/mkdump see mkdump-config-sample. --- 20,24 ---- # make ! 4. /etc/mkdump/mkdump see mkdump-config-sample. |
From: kaku <fk...@us...> - 2005-12-19 05:11:12
|
Update of /cvsroot/mkdump/utils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17461 Modified Files: mkdump-config-sample Log Message: Changed a value of a variable MKDUMP_MEM from 8M to 16M. Index: mkdump-config-sample =================================================================== RCS file: /cvsroot/mkdump/utils/mkdump-config-sample,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mkdump-config-sample 18 Nov 2005 03:49:40 -0000 1.1 --- mkdump-config-sample 19 Dec 2005 05:11:03 -0000 1.2 *************** *** 3,7 **** MKDUMP_DEV=/dev/hda7 # dump device MKDUMP_VMLINUX=/boot/minik-2.6.9.bin # mini kernel binary ! MKDUMP_MEM=8M # memory size of mini kernel MKDUMP_PARAM="ro" # mini kernel (extra) parameter # for mkd_save --- 3,7 ---- MKDUMP_DEV=/dev/hda7 # dump device MKDUMP_VMLINUX=/boot/minik-2.6.9.bin # mini kernel binary ! MKDUMP_MEM=16M # memory size of mini kernel MKDUMP_PARAM="ro" # mini kernel (extra) parameter # for mkd_save |
From: kaku <fk...@us...> - 2005-12-19 04:30:44
|
Update of /cvsroot/mkdump/mkexec/2.0/2.6 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11498 Added Files: COPYING Log Message: Added GPL statement file. --- NEW FILE: COPYING --- GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. |
From: kaku <fk...@us...> - 2005-12-19 03:32:22
|
Update of /cvsroot/mkdump/utils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32172 Removed Files: COPYRIGHT Log Message: Removed unnecessary file.(COPYRIGHT) --- COPYRIGHT DELETED --- |
From: kaku <fk...@us...> - 2005-12-19 03:06:38
|
Update of /cvsroot/mkdump/utils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25840 Modified Files: Makefile Log Message: Added GPL atatement. Index: Makefile =================================================================== RCS file: /cvsroot/mkdump/utils/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Makefile 18 Dec 2005 12:35:13 -0000 1.1 --- Makefile 19 Dec 2005 03:06:24 -0000 1.2 *************** *** 1,2 **** --- 1,22 ---- + # + # Makefile + # + # Portions Copyright (C) 2004-2005 NTT DATA CORPORATION. + # Portions Copyright (C) 2004-2005 VA Linux Systems Japan K.K. + # + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation (version 2 of the License). + # + # This program is distributed in the hope that it will be useful, + # but WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + # GNU General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program; if not, write to the Free Software + # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + # + MAKE_CMD=make INSTALL_CMD=install -m 755 |
From: kaku <fk...@us...> - 2005-12-18 12:35:24
|
Update of /cvsroot/mkdump/utils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32447 Added Files: Makefile Log Message: Added a top Makefile of mkdump utilities --- NEW FILE: Makefile --- MAKE_CMD=make INSTALL_CMD=install -m 755 RM_CMD=rm -f MKD_CHK_PATH=./mkd_chk MKD_CONV_PATH=./mkd_conv MKD_LOAD_PATH=./mkd_load MKD_SAVE_PATH=./mkd_save INST_PATH=/sbin MKD_CHK=mkd_chk MKD_CONV=mkd_conv MKD_LOAD=mkd_load MKD_SAVE=mkd_save all: $(MAKE_CMD) -C $(MKD_CHK_PATH) all $(MAKE_CMD) -C $(MKD_CONV_PATH) all clean: $(MAKE_CMD) -C $(MKD_CHK_PATH) clean $(MAKE_CMD) -C $(MKD_CONV_PATH) clean install: $(INSTALL_CMD) $(MKD_CHK_PATH)/$(MKD_CHK) $(INST_PATH) $(INSTALL_CMD) $(MKD_LOAD_PATH)/$(MKD_LOAD) $(INST_PATH) $(INSTALL_CMD) $(MKD_SAVE_PATH)/$(MKD_SAVE) $(INST_PATH) uninstall: $(RM_CMD) $(INST_PATH)/$(MKD_CHK) $(RM_CMD) $(INST_PATH)/$(MKD_LOAD) $(RM_CMD) $(INST_PATH)/$(MKD_SAVE) |
From: Itsuro O. <od...@us...> - 2005-12-15 05:47:53
|
Update of /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/include/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18599/include/linux Removed Files: Tag: org-minikpatch-1_0-linux-2_6_9-1_r minik_dump.h Log Message: remove files non original --- minik_dump.h DELETED --- |
From: Itsuro O. <od...@us...> - 2005-12-15 05:47:52
|
Update of /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/init In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18599/init Removed Files: Tag: org-minikpatch-1_0-linux-2_6_9-1_r minik_dump.c Log Message: remove files non original --- minik_dump.c DELETED --- |
From: Itsuro O. <od...@us...> - 2005-12-15 05:34:37
|
Update of /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/init In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17065/init Modified Files: minik_dump.c Log Message: add parameters Index: minik_dump.c =================================================================== RCS file: /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/init/minik_dump.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** minik_dump.c 15 Dec 2005 04:53:48 -0000 1.1 --- minik_dump.c 15 Dec 2005 05:34:28 -0000 1.2 *************** *** 1,9 **** /* ! * Portions Copyright 2004 NTT DATA Corporation ! * Portions Copyright 2004 VA Linux Systems Japan K.K. * - * $Id$ * main routines of mini dump kernel * auther: Itsuro Oda (od...@va...) */ --- 1,27 ---- /* ! * init/minik_dump.c * * main routines of mini dump kernel + * + * $Id$ * auther: Itsuro Oda (od...@va...) + * + * Portions Copyright (C) 2004 NTT DATA CORPORATION. + * Portions Copyright (C) 2004 VA Linux Systems Japan K.K. + * + * This file is part of Mkdump. + * + * Mkdump is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation (version 2 of the License). + * + * Mkdump is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Mkdump; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ *************** *** 36,39 **** --- 54,80 ---- __setup("dump_dev=", set_dump_dev); + #define MKDUMP_REBOOT 0 + #define MKDUMP_HALT 1 + #define MKDUMP_POWER_OFF 2 + static int mkdump_reboot = MKDUMP_REBOOT; + static int __init set_mkdump_reboot(char *str) + { + if (!strcmp(str, "halt")) { + mkdump_reboot = MKDUMP_HALT; + } else if (!strcmp(str, "poweroff")) { + mkdump_reboot = MKDUMP_POWER_OFF; + } /* else/default: MKDUMP_REBOOT */ + return 1; + } + __setup("mkdump_reboot=", set_mkdump_reboot); + + static int dump_delay = 5; + static int __init set_dump_delay(char *str) + { + get_option(&str, &dump_delay); + return 1; + } + __setup("dump_delay=", set_dump_delay); + /* * I/O stuff *************** *** 156,159 **** --- 197,206 ---- } + if (dump_delay >= 0) { + /* wait for a while to bring up necessary driver */ + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(dump_delay * HZ); + } + vaddr = __fix_to_virt(FIX_DUMP); *************** *** 194,201 **** reboot: ! system_state = SYSTEM_RESTART; ! device_shutdown(); ! printk("System reboot.\n"); ! mdelay(3000); /* to look above message */ ! machine_restart(NULL); } --- 241,275 ---- reboot: ! switch (mkdump_reboot) { ! case MKDUMP_REBOOT: ! printk("Preparing for the system reboot...\n"); ! mdelay(3000); ! system_state = SYSTEM_RESTART; ! device_shutdown(); ! printk("System reboot.\n"); ! mdelay(2000); /* Show the messages above for a while. */ ! machine_restart(NULL); ! break; ! case MKDUMP_HALT: ! printk("Preparing for the system halt...\n"); ! mdelay(3000); ! system_state = SYSTEM_HALT; ! device_shutdown(); ! printk("System halted.\n"); ! machine_halt(); ! break; ! case MKDUMP_POWER_OFF: ! printk("Preparing for the power down...\n"); ! mdelay(3000); ! system_state = SYSTEM_POWER_OFF; ! device_shutdown(); ! printk("Power down.\n"); ! mdelay(2000); /* Show the messages above for a while. */ ! machine_power_off(); ! break; ! } ! ! while (1) { ! cpu_relax(); ! } } |
From: Itsuro O. <od...@us...> - 2005-12-15 05:27:36
|
Update of /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/arch/x86_64/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16038/arch/x86_64/kernel Modified Files: Tag: org-minikpatch-1_0-linux-2_6_9 head.S pci-gart.c setup.c setup64.c Log Message: mini kernel v1 update1 original kernel source Index: pci-gart.c =================================================================== RCS file: /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/arch/x86_64/kernel/pci-gart.c,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** pci-gart.c 15 Dec 2005 04:53:47 -0000 1.1 --- pci-gart.c 15 Dec 2005 05:27:23 -0000 1.1.2.1 *************** *** 230,234 **** { int high, mmu; ! bus = true_phys(virt_to_bus(memory)); high = (bus + size) >= dma_mask; mmu = high; --- 230,234 ---- { int high, mmu; ! bus = virt_to_bus(memory); high = (bus + size) >= dma_mask; mmu = high; *************** *** 247,257 **** memset(memory, 0, size); if (!mmu) { ! *dma_handle = true_phys(virt_to_bus(memory)); return memory; } ! } ! ! printk("### Mini Kernel should not reach here.\n"); ! BUG(); *dma_handle = dma_map_area(dev, bus, size, PCI_DMA_BIDIRECTIONAL, 0); --- 247,254 ---- memset(memory, 0, size); if (!mmu) { ! *dma_handle = virt_to_bus(memory); return memory; } ! } *dma_handle = dma_map_area(dev, bus, size, PCI_DMA_BIDIRECTIONAL, 0); *************** *** 407,417 **** dev = &fallback_dev; ! phys_mem = true_phys(virt_to_phys(addr)); if (!need_iommu(dev, phys_mem, size)) return phys_mem; - printk("### Mini Kernel should not reach here.\n"); - BUG(); - bus = dma_map_area(dev, phys_mem, size, dir, 1); flush_gart(dev); --- 404,411 ---- dev = &fallback_dev; ! phys_mem = virt_to_phys(addr); if (!need_iommu(dev, phys_mem, size)) return phys_mem; bus = dma_map_area(dev, phys_mem, size, dir, 1); flush_gart(dev); *************** *** 526,530 **** for (i = 0; i < nents; i++) { struct scatterlist *s = &sg[i]; ! dma_addr_t addr = true_phys(page_to_phys(s->page)) + s->offset; s->dma_address = addr; BUG_ON(s->length == 0); --- 520,524 ---- for (i = 0; i < nents; i++) { struct scatterlist *s = &sg[i]; ! dma_addr_t addr = page_to_phys(s->page) + s->offset; s->dma_address = addr; BUG_ON(s->length == 0); Index: setup64.c =================================================================== RCS file: /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/arch/x86_64/kernel/setup64.c,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** setup64.c 15 Dec 2005 04:53:47 -0000 1.1 --- setup64.c 15 Dec 2005 05:27:23 -0000 1.1.2.1 *************** *** 188,192 **** memcpy(level4, &init_level4_pgt, PAGE_SIZE); set_pml4(level4 + 510, mk_kernel_pml4(__pa_symbol(boot_vmalloc_pgt))); ! asm volatile("movq %0,%%cr3" :: "r" (true_phys(__pa(level4)))); pda->irqstackptr += IRQSTACKSIZE-64; --- 188,192 ---- memcpy(level4, &init_level4_pgt, PAGE_SIZE); set_pml4(level4 + 510, mk_kernel_pml4(__pa_symbol(boot_vmalloc_pgt))); ! asm volatile("movq %0,%%cr3" :: "r" (__pa(level4))); pda->irqstackptr += IRQSTACKSIZE-64; Index: setup.c =================================================================== RCS file: /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/arch/x86_64/kernel/setup.c,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** setup.c 15 Dec 2005 04:53:47 -0000 1.1 --- setup.c 15 Dec 2005 05:27:23 -0000 1.1.2.1 *************** *** 508,518 **** reserve_ebda_region(); - #ifdef CONFIG_DUMP_MINI_KERNEL /* implies !CONFIG_SMP */ - /* pfn 1: mini kernel memory table */ - /* pfn 2: dump header */ - /* pfn 3: memory segments of real kernel used */ - reserve_bootmem_generic(PAGE_SIZE, PAGE_SIZE * 3); - #endif - #ifdef CONFIG_SMP /* --- 508,511 ---- Index: head.S =================================================================== RCS file: /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/arch/x86_64/kernel/head.S,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** head.S 15 Dec 2005 04:53:47 -0000 1.1 --- head.S 15 Dec 2005 05:27:23 -0000 1.1.2.1 *************** *** 9,17 **** * $Id$ */ ! /* ! * Modified for Mini Kernel ! * Portions Copyright 2004 NTT DATA CORPORATION. ! * Portions Copyright 2004 VA Linux Systems Japan K.K. ! */ #include <linux/linkage.h> --- 9,13 ---- * $Id$ */ ! #include <linux/linkage.h> *************** *** 22,30 **** #include <asm/msr.h> #include <asm/cache.h> ! ! #ifdef CONFIG_SMP ! #error "Mini Kernel not support SMP ! #endif ! /* we are not able to switch in one step to the final KERNEL ADRESS SPACE * because we need identity-mapped pages on setup so define __START_KERNEL to --- 18,22 ---- #include <asm/msr.h> #include <asm/cache.h> ! /* we are not able to switch in one step to the final KERNEL ADRESS SPACE * because we need identity-mapped pages on setup so define __START_KERNEL to *************** *** 46,129 **** */ ! /* ! * Calculate real physical address: set to %ebp ! */ ! call 1f ! 1: popl %ebp ! subl $0x100000, %ebp ! andl $0xfffff000, %ebp movl $__KERNEL_DS,%eax movl %eax,%ds - /* - * Set and adjust page tables - */ - /* copy mini kernel memory table */ - movl %esi, %eax /* save %esi */ - movl $0x1000, %esi - addl %ebp, %esi - movl $(phys_table - __START_KERNEL_map), %edi - addl %ebp, %edi - movl $1024, %ecx - cld - rep - movsl - movl %eax, %esi /* restore %esi */ - - /* make level1_ident_pgt */ - movl $512, %ecx - movl $(level1_ident_pgt - __START_KERNEL_map), %edi - addl %ebp, %edi - movl $0x007, %eax - addl %ebp, %eax - 1: - movl %eax, (%edi) - addl $0x1000, %eax - addl $8, %edi - subl $1, %ecx - jnz 1b - - movl $96, %ecx /* adjust 0xa0000 - 0xfffff */ - movl $(level1_ident_a0 - __START_KERNEL_map), %edi - addl %ebp, %edi - movl $0xa0007, %eax - 1: - movl %eax, (%edi) - addl $0x1000, %eax - addl $8, %edi - subl $1, %ecx - jnz 1b - - /* adjust leve4-level2 page tables */ - /* they exist continuously. 0x101000 - 0x105000: 5 pages */ - /* causion: for level2 only first two entries are true */ - movl $2560, %ecx /* 5 * 512 entries */ - movl $(init_level4_pgt - __START_KERNEL_map), %edi - addl %ebp, %edi - 1: - movl (%edi), %eax - orl %eax, %eax - jz 2f - addl %ebp, %eax - movl %eax, (%edi) - 2: - addl $8, %edi - subl $1, %ecx - jnz 1b - - /* true ident map */ - movl $(level2_ident_pgt - __START_KERNEL_map), %edi - addl %ebp, %edi - movl %ebp, %eax - shrl $21, %eax - shll $3, %eax - addl %eax, %edi - movl $0x183, %eax - addl %ebp, %eax - movl %eax, (%edi) - addl $0x200000, %eax - movl %eax, 8(%edi) - /* If the CPU doesn't support CPUID this will double fault. * Unfortunately it is hard to check for CPUID without a stack. --- 38,46 ---- */ ! movl %ebx,%ebp /* Save trampoline flag */ movl $__KERNEL_DS,%eax movl %eax,%ds /* If the CPU doesn't support CPUID this will double fault. * Unfortunately it is hard to check for CPUID without a stack. *************** *** 142,146 **** movl %edx,%edi ! /* * Prepare for entering 64bits mode --- 59,63 ---- movl %edx,%edi ! /* * Prepare for entering 64bits mode *************** *** 155,159 **** /* Setup early boot stage 4 level pagetables */ movl $(init_level4_pgt - __START_KERNEL_map), %eax - addl %ebp, %eax movl %eax, %cr3 --- 72,75 ---- *************** *** 196,211 **** */ /* Load new GDT with the 64bit segment using 32bit descriptor */ movl $(pGDT32 - __START_KERNEL_map), %eax - addl %ebp, %eax lgdt (%eax) movl $(ljumpvector - __START_KERNEL_map), %eax - addl %ebp, %eax /* Finally jump in 64bit mode */ ljmp *(%eax) .code64 ! .org 0x200 /* <-- 0x100 */ reach_long64: movq init_rsp(%rip),%rsp --- 112,129 ---- */ + testw %bp,%bp /* secondary CPU? */ + jnz second + /* Load new GDT with the 64bit segment using 32bit descriptor */ movl $(pGDT32 - __START_KERNEL_map), %eax lgdt (%eax) + second: movl $(ljumpvector - __START_KERNEL_map), %eax /* Finally jump in 64bit mode */ ljmp *(%eax) .code64 ! .org 0x100 reach_long64: movq init_rsp(%rip),%rsp *************** *** 311,316 **** ENTRY(level2_ident_pgt) /* 40MB for bootup. */ ! /* .quad 0x0000000000000283 */ ! .quad 0x000000000010c007 /* -> level1_ident_pgt */ .quad 0x0000000000200183 .quad 0x0000000000400183 --- 229,233 ---- ENTRY(level2_ident_pgt) /* 40MB for bootup. */ ! .quad 0x0000000000000283 .quad 0x0000000000200183 .quad 0x0000000000400183 *************** *** 342,347 **** When you change this change KERNEL_TEXT_SIZE in page.h too. */ /* (2^48-(2*1024*1024*1024)-((2^39)*511)-((2^30)*510)) = 0 */ ! /* .quad 0x0000000000000183 */ ! .quad 0x000000000010c007 /* -> level1_ident_pgt */ .quad 0x0000000000200183 .quad 0x0000000000400183 --- 259,263 ---- When you change this change KERNEL_TEXT_SIZE in page.h too. */ /* (2^48-(2*1024*1024*1024)-((2^39)*511)-((2^30)*510)) = 0 */ ! .quad 0x0000000000000183 .quad 0x0000000000200183 .quad 0x0000000000400183 *************** *** 393,407 **** #endif - .org 0xc000 - ENTRY(level1_ident_pgt) - .fill 160,8,0 - level1_ident_a0: - .fill 96,8,0 /* 0xa0000 - 0xfffff */ - .fill 256,8,0 - - .org 0xd000 - ENTRY(phys_table) - .fill 512,8,0 - .data --- 309,312 ---- |
From: Itsuro O. <od...@us...> - 2005-12-15 05:27:36
|
Update of /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/arch/x86_64/boot/compressed In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16038/arch/x86_64/boot/compressed Modified Files: Tag: org-minikpatch-1_0-linux-2_6_9 head.S Log Message: mini kernel v1 update1 original kernel source Index: head.S =================================================================== RCS file: /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/arch/x86_64/boot/compressed/head.S,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** head.S 15 Dec 2005 04:53:47 -0000 1.1 --- head.S 15 Dec 2005 05:27:23 -0000 1.1.2.1 *************** *** 127,169 **** rep movsl - /* - * ### for Mini Kernel stand alone test ### - */ - /* copy 0-8MB address of memory to 256-264MB address of memory */ - movl $0x000000,%esi - movl $0x10000000,%edi - movl $0x200000,%ecx - cld - rep - movsl - - /* clear orignal text !!!!! */ - xorl %eax,%eax - movl $0x100000,%edi - movl $0x100000,%ecx /* clear 4MB */ - rep ; stosl - - /* set minik memory table */ - xorl %eax,%eax - movl $0x10001000,%edi - movl $1024,%ecx - rep ; stosl - movl $0x10001000,%edi - movl $0x10000000,(%edi) - movl $0x10400000,8(%edi) - - /* set memory segment list */ - movl $0x10003000,%edi - movl $4096,(%edi) /* page_size */ - movl $1,4(%edi) /* seg_num */ - movl $0,8(%edi) /* seg_start_pfn */ - movl $0,12(%edi) - movl $0x40000,16(%edi) /* seg_size */ - /* - * ### end ### - */ movl %ebx,%esi # Restore setup pointer xorl %ebx,%ebx ! ljmp $(__KERNEL_CS), $0x10100000 /* jump 0x100000 + 256MB */ move_routine_end: --- 127,133 ---- rep movsl movl %ebx,%esi # Restore setup pointer xorl %ebx,%ebx ! ljmp $(__KERNEL_CS), $0x100000 move_routine_end: |
From: Itsuro O. <od...@us...> - 2005-12-15 05:27:35
|
Update of /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/arch/i386/mm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16038/arch/i386/mm Modified Files: Tag: org-minikpatch-1_0-linux-2_6_9 init.c pgtable.c Log Message: mini kernel v1 update1 original kernel source Index: pgtable.c =================================================================== RCS file: /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/arch/i386/mm/pgtable.c,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** pgtable.c 15 Dec 2005 04:53:47 -0000 1.1 --- pgtable.c 15 Dec 2005 05:27:23 -0000 1.1.2.1 *************** *** 258,415 **** kmem_cache_free(pgd_cache, pgd); } - - /* - * cheat kernel at page table entry layer - */ - extern unsigned long max_low_pfn; - - #ifdef CONFIG_X86_PAE - void set_pte(pte_t *ptep, pte_t pte) - { - unsigned long long laddr = ((unsigned long long)pte.pte_high << 32) | pte.pte_low; - - if (pte.pte_low & _PAGE_PRESENT) { /* if not, swap entry */ - if (laddr >> PAGE_SHIFT <= max_low_pfn) { - /* note: max_low_pfn and true phys both <= ZONE_NORMAL */ - pte.pte_low = true_phys(pte.pte_low); - } - } - ptep->pte_high = pte.pte_high; - smp_wmb(); /* actually not need */ - ptep->pte_low = pte.pte_low; - } - - void set_pte_atomic(pte_t *ptep, pte_t pte) - { - unsigned long long laddr = ((unsigned long long)pte.pte_high << 32) | pte.pte_low; - - if (pte.pte_low & _PAGE_PRESENT) { /* if not, swap entry */ - if (laddr >> PAGE_SHIFT <= max_low_pfn) { - /* note: max_low_pfn and true phys both <= ZONE_NORMAL */ - pte.pte_low = true_phys(pte.pte_low); - } - } - set_64bit((unsigned long long *)ptep, ((unsigned long long)pte.pte_high << 32) | pte.pte_low); - } - - void set_pmd(pmd_t *pmdp, pmd_t pmd) - { - pmd.pmd = true_phys((unsigned long)pmd.pmd); - set_64bit((unsigned long long *)pmdp, pmd.pmd); - } - - void set_pgd(pgd_t *pgdp, pgd_t pgd) - { - pgd.pgd = true_phys((unsigned long)pgd.pgd); - set_64bit((unsigned long long *)pgdp, pgd.pgd); - } - - /* - * XXX: ptep_get_and_clear: need change ?? - */ - - unsigned long long pte_val(pte_t pte) - { - if (!pte.pte_high && (pte.pte_low & _PAGE_PRESENT)) { - pte.pte_low = pseudo_phys(pte.pte_low); - } - return ((unsigned long long)pte.pte_high << 32) | pte.pte_low; - } - - unsigned long long pmd_val(pmd_t pmd) - { - return pmd.pmd & _PAGE_PRESENT ? pseudo_phys((unsigned long)pmd.pmd) : pmd.pmd; - } - - unsigned long long pgd_val(pgd_t pgd) - { - return pgd.pgd & _PAGE_PRESENT ? pseudo_phys((unsigned long)pgd.pgd) : pgd.pgd; - } - - #else /* non PAE */ - - void set_pte(pte_t *ptep, pte_t pte) - { - ptep->pte_low = pte.pte_low & _PAGE_PRESENT ? true_phys(pte.pte_low) : pte.pte_low; - } - - void set_pmd(pmd_t *pmdp, pmd_t pmd) - { - pmdp->pmd = pmd.pmd ? true_phys(pmd.pmd) : pmd.pmd; - } - - void set_pgd(pgd_t *pgdp, pgd_t pgd) - { - pgdp->pgd = pgd.pgd ? true_phys(pgd.pgd) : pgd.pgd; - } - - unsigned long pte_val(pte_t pte) - { - return pte.pte_low & _PAGE_PRESENT ? pseudo_phys(pte.pte_low) : pte.pte_low; - } - - unsigned long pmd_val(pmd_t pmd) - { - return pmd.pmd & _PAGE_PRESENT ? pseudo_phys(pmd.pmd) : pmd.pmd; - } - - unsigned long pgd_val(pgd_t pgd) - { - return pgd.pgd & _PAGE_PRESENT ? pseudo_phys(pgd.pgd) : pgd.pgd; - } - - #endif /* CONFIG_X86_PAE */ - - unsigned long true_phys(unsigned long pa) - { - unsigned long *phys_table = (unsigned long *)(PAGE_OFFSET + MINIK_MEM_SEG_OFFSET); - unsigned long pfn = pa >> PAGE_SHIFT; - - if (pfn >= max_low_pfn || (0xa0 <= pfn && pfn < 0x100)) { - return pa; - } else { - return (pa & __PHYS_SEG_MASK) + phys_table[pa >> __PHYS_SEG_SHIFT]; - } - } - - unsigned long pseudo_phys(unsigned long pa) - { - unsigned long *phys_table = (unsigned long *)(PAGE_OFFSET + MINIK_MEM_SEG_OFFSET); - int i; - - for (i = 0; i < MAX_MINIK_MEM_SEG; i++) { - if (phys_table[i] == ((pa >> __PHYS_SEG_SHIFT) << __PHYS_SEG_SHIFT)) { - return (pa & __PHYS_SEG_MASK) + ((unsigned long)i << __PHYS_SEG_SHIFT); - } - } - - return pa; - } - - static pte_t *dump_pte = NULL; - static unsigned long dump_vaddr; - void dump_set_pte_pfn(unsigned long pfn) - { - if (!dump_pte) { - pgd_t *pgd; - pmd_t *pmd; - - dump_vaddr = __fix_to_virt(FIX_DUMP); - pgd = swapper_pg_dir + pgd_index(dump_vaddr); - if (pgd_none(*pgd)) { - BUG(); - return; - } - pmd = pmd_offset(pgd, dump_vaddr); - if (pmd_none(*pmd)) { - BUG(); - return; - } - dump_pte = pte_offset_kernel(pmd, dump_vaddr); - } - - /* set pfn asis. don't use set_pte */ - *dump_pte = pfn_pte(pfn, PAGE_KERNEL); - - __flush_tlb_one(dump_vaddr); - } --- 258,259 ---- Index: init.c =================================================================== RCS file: /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/arch/i386/mm/init.c,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** init.c 15 Dec 2005 04:53:47 -0000 1.1 --- init.c 15 Dec 2005 05:27:23 -0000 1.1.2.1 *************** *** 156,166 **** unsigned int address = pfn * PAGE_SIZE + PAGE_OFFSET; ! pte = one_page_table_init(pmd); ! for (pte_ofs = 0; pte_ofs < PTRS_PER_PTE && pfn < max_low_pfn; pte++, pfn++, pte_ofs++) { ! if (is_kernel_text(address)) ! set_pte(pte, pfn_pte(pfn, PAGE_KERNEL_EXEC)); else ! set_pte(pte, pfn_pte(pfn, PAGE_KERNEL)); } } --- 156,177 ---- unsigned int address = pfn * PAGE_SIZE + PAGE_OFFSET; ! /* Map with big pages if possible, otherwise create normal page tables. */ ! if (cpu_has_pse) { ! unsigned int address2 = (pfn + PTRS_PER_PTE - 1) * PAGE_SIZE + PAGE_OFFSET + PAGE_SIZE-1; ! if (is_kernel_text(address) || is_kernel_text(address2)) ! set_pmd(pmd, pfn_pmd(pfn, PAGE_KERNEL_LARGE_EXEC)); else ! set_pmd(pmd, pfn_pmd(pfn, PAGE_KERNEL_LARGE)); ! pfn += PTRS_PER_PTE; ! } else { ! pte = one_page_table_init(pmd); ! ! for (pte_ofs = 0; pte_ofs < PTRS_PER_PTE && pfn < max_low_pfn; pte++, pfn++, pte_ofs++) { ! if (is_kernel_text(address)) ! set_pte(pte, pfn_pte(pfn, PAGE_KERNEL_EXEC)); ! else ! set_pte(pte, pfn_pte(pfn, PAGE_KERNEL)); ! } } } *************** *** 403,407 **** #endif /* !CONFIG_DISCONTIGMEM */ ! static int disable_nx __initdata = 1; u64 __supported_pte_mask = ~_PAGE_NX; --- 414,418 ---- #endif /* !CONFIG_DISCONTIGMEM */ ! static int disable_nx __initdata = 0; u64 __supported_pte_mask = ~_PAGE_NX; |
From: Itsuro O. <od...@us...> - 2005-12-15 05:27:35
|
Update of /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/include/asm-x86_64 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16038/include/asm-x86_64 Modified Files: Tag: org-minikpatch-1_0-linux-2_6_9 fixmap.h page.h pgtable.h Log Message: mini kernel v1 update1 original kernel source Index: page.h =================================================================== RCS file: /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/include/asm-x86_64/page.h,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** page.h 15 Dec 2005 04:53:48 -0000 1.1 --- page.h 15 Dec 2005 05:27:23 -0000 1.1.2.1 *************** *** 50,57 **** typedef struct { unsigned long pgprot; } pgprot_t; ! extern unsigned long pte_val(pte_t); ! extern unsigned long pmd_val(pmd_t); ! extern unsigned long pgd_val(pgd_t); ! extern unsigned long pml4_val(pml4_t); #define pgprot_val(x) ((x).pgprot) --- 50,57 ---- typedef struct { unsigned long pgprot; } pgprot_t; ! #define pte_val(x) ((x).pte) ! #define pmd_val(x) ((x).pmd) ! #define pgd_val(x) ((x).pgd) ! #define pml4_val(x) ((x).pml4) #define pgprot_val(x) ((x).pgprot) *************** *** 151,168 **** #endif - #ifdef CONFIG_DUMP_MINI_KERNEL - #define MINIK_MEM_SEG_OFFSET (PAGE_SIZE) - #define MINIK_DUMP_HEADER_OFFSET (PAGE_SIZE * 2) - #define MEM_SEG_OFFSET (PAGE_SIZE * 3) - #define MAX_MINIK_MEM_SEG 32 - #define __PHYS_SEG_SHIFT 22 - #define __PHYS_SEG_MASK (0x3fffffUL) - #ifndef __ASSEMBLY__ - extern unsigned long phys_table[]; - extern unsigned long true_phys(unsigned long pa); - extern unsigned long pseudo_phys(unsigned long pa); - #endif - #endif - #endif /* __KERNEL__ */ --- 151,154 ---- Index: pgtable.h =================================================================== RCS file: /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/include/asm-x86_64/pgtable.h,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** pgtable.h 15 Dec 2005 04:53:48 -0000 1.1 --- pgtable.h 15 Dec 2005 05:27:23 -0000 1.1.2.1 *************** *** 23,27 **** extern pmd_t level2_kernel_pgt[512]; extern pml4_t init_level4_pgt[]; - extern pte_t level1_ident_pgt[]; extern pgd_t boot_vmalloc_pgt[]; extern unsigned long __supported_pte_mask; --- 23,26 ---- *************** *** 75,81 **** extern inline int pgd_present(pgd_t pgd) { return !pgd_none(pgd); } ! extern void set_pte(pte_t *dst, pte_t val); ! extern void set_pmd(pmd_t *dst, pmd_t val); ! extern void set_pgd(pgd_t *dst, pgd_t val); extern inline void pgd_clear (pgd_t * pgd) --- 74,91 ---- extern inline int pgd_present(pgd_t pgd) { return !pgd_none(pgd); } ! static inline void set_pte(pte_t *dst, pte_t val) ! { ! pte_val(*dst) = pte_val(val); ! } ! ! static inline void set_pmd(pmd_t *dst, pmd_t val) ! { ! pmd_val(*dst) = pmd_val(val); ! } ! ! static inline void set_pgd(pgd_t *dst, pgd_t val) ! { ! pgd_val(*dst) = pgd_val(val); ! } extern inline void pgd_clear (pgd_t * pgd) *************** *** 84,88 **** } ! extern void set_pml4(pml4_t *dst, pml4_t val); #define pgd_page(pgd) \ --- 94,101 ---- } ! static inline void set_pml4(pml4_t *dst, pml4_t val) ! { ! pml4_val(*dst) = pml4_val(val); ! } #define pgd_page(pgd) \ *************** *** 145,150 **** #define _PAGE_NX (1UL<<_PAGE_BIT_NX) - #define _PGTABLE_FLAGS (0xfff0000000000fffUL) /* flags field of page tables */ - #define _PAGE_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | _PAGE_ACCESSED | _PAGE_DIRTY) #define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | _PAGE_DIRTY) --- 158,161 ---- *************** *** 224,231 **** { pte_t pte; ! pte.pte = (page_nr << PAGE_SHIFT); ! pte.pte |= pgprot_val(pgprot); ! pte.pte &= __supported_pte_mask; ! return pte; } --- 235,241 ---- { pte_t pte; ! pte_val(pte) = (page_nr << PAGE_SHIFT); ! pte_val(pte) |= pgprot_val(pgprot); ! pte_val(pte) &= __supported_pte_mask; return pte; } *************** *** 355,359 **** /* page, protection -> pte */ #define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot)) ! #define mk_pte_huge(entry) ((entry).pte |= _PAGE_PRESENT | _PAGE_PSE) /* physical address -> PTE */ --- 365,369 ---- /* page, protection -> pte */ #define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot)) ! #define mk_pte_huge(entry) (pte_val(entry) |= _PAGE_PRESENT | _PAGE_PSE) /* physical address -> PTE */ *************** *** 361,365 **** { pte_t pte; ! pte.pte = physpage | pgprot_val(pgprot); return pte; } --- 371,375 ---- { pte_t pte; ! pte_val(pte) = physpage | pgprot_val(pgprot); return pte; } *************** *** 368,374 **** extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) { ! pte.pte &= _PAGE_CHG_MASK; ! pte.pte |= pgprot_val(newprot); ! pte.pte &= __supported_pte_mask; return pte; } --- 378,384 ---- extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) { ! pte_val(pte) &= _PAGE_CHG_MASK; ! pte_val(pte) |= pgprot_val(newprot); ! pte_val(pte) &= __supported_pte_mask; return pte; } Index: fixmap.h =================================================================== RCS file: /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/include/asm-x86_64/fixmap.h,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** fixmap.h 15 Dec 2005 04:53:48 -0000 1.1 --- fixmap.h 15 Dec 2005 05:27:23 -0000 1.1.2.1 *************** *** 46,50 **** FIX_IO_APIC_BASE_END = FIX_IO_APIC_BASE_0 + MAX_IO_APICS-1, #endif - FIX_DUMP, __end_of_fixed_addresses }; --- 46,49 ---- |
From: Itsuro O. <od...@us...> - 2005-12-15 05:27:35
|
Update of /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/include/asm-i386 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16038/include/asm-i386 Modified Files: Tag: org-minikpatch-1_0-linux-2_6_9 dma-mapping.h fixmap.h page.h pgtable-2level.h pgtable-3level.h processor.h Log Message: mini kernel v1 update1 original kernel source Index: page.h =================================================================== RCS file: /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/include/asm-i386/page.h,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** page.h 15 Dec 2005 04:53:47 -0000 1.1 --- page.h 15 Dec 2005 05:27:23 -0000 1.1.2.1 *************** *** 47,55 **** typedef struct { unsigned long long pgd; } pgd_t; typedef struct { unsigned long long pgprot; } pgprot_t; - #ifdef CONFIG_DUMP_MINI_KERNEL - extern unsigned long long pte_val(pte_t); - #else #define pte_val(x) ((x).pte_low | ((unsigned long long)(x).pte_high << 32)) - #endif #define HPAGE_SHIFT 21 #else --- 47,51 ---- *************** *** 60,68 **** typedef struct { unsigned long pgprot; } pgprot_t; #define boot_pte_t pte_t /* or would you rather have a typedef */ - #ifdef CONFIG_DUMP_MINI_KERNEL - extern unsigned long pte_val(pte_t); - #else #define pte_val(x) ((x).pte_low) - #endif #define HPAGE_SHIFT 22 #endif --- 56,60 ---- *************** *** 76,91 **** - #ifdef CONFIG_DUMP_MINI_KERNEL - #ifdef CONFIG_X86_PAE - extern unsigned long long pmd_val(pmd_t); - extern unsigned long long pgd_val(pgd_t); - #else - extern unsigned long pmd_val(pmd_t); - extern unsigned long pgd_val(pgd_t); - #endif - #else #define pmd_val(x) ((x).pmd) #define pgd_val(x) ((x).pgd) - #endif #define pgprot_val(x) ((x).pgprot) --- 68,73 ---- *************** *** 145,148 **** --- 127,131 ---- #endif + #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) #define VMALLOC_RESERVE ((unsigned long)__VMALLOC_RESERVE) *************** *** 165,186 **** VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) - #ifndef __ASSEMBLY__ - #ifdef CONFIG_DUMP_MINI_KERNEL - #define MINIK_MEM_SEG_OFFSET 4096 - #define MINIK_DUMP_HEADER_OFFSET 8192 - #define MEM_SEG_OFFSET 12288 - #define MAX_MINIK_MEM_SEG 32 - /* offset of TRUE physical addresses. defined in head.S */ - extern unsigned long __phys_offset; - #define __PHYS_SEG_SHIFT 22 - #define __PHYS_SEG_MASK (0x3fffffUL) - extern unsigned long true_phys(unsigned long pa); - extern unsigned long pseudo_phys(unsigned long pa); - #else /* DUMP_MINI_KERNEL */ - #define true_phys(x) (x) - #define pseudo_phys(x) (x) - #endif /* DUMP_MINI_KERNEL */ - #endif /* __ASSEMBLY */ - #endif /* __KERNEL__ */ --- 148,151 ---- Index: dma-mapping.h =================================================================== RCS file: /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/include/asm-i386/dma-mapping.h,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** dma-mapping.h 15 Dec 2005 04:53:47 -0000 1.1 --- dma-mapping.h 15 Dec 2005 05:27:23 -0000 1.1.2.1 *************** *** 23,27 **** BUG_ON(direction == DMA_NONE); flush_write_buffers(); ! return true_phys(virt_to_phys(ptr)); } --- 23,27 ---- BUG_ON(direction == DMA_NONE); flush_write_buffers(); ! return virt_to_phys(ptr); } *************** *** 43,47 **** for (i = 0; i < nents; i++ ) { BUG_ON(!sg[i].page); ! sg[i].dma_address = true_phys(page_to_phys(sg[i].page)) + sg[i].offset; } --- 43,48 ---- for (i = 0; i < nents; i++ ) { BUG_ON(!sg[i].page); ! ! sg[i].dma_address = page_to_phys(sg[i].page) + sg[i].offset; } *************** *** 55,59 **** { BUG_ON(direction == DMA_NONE); ! return true_phys(page_to_phys(page)) + offset; } --- 56,60 ---- { BUG_ON(direction == DMA_NONE); ! return page_to_phys(page) + offset; } Index: pgtable-3level.h =================================================================== RCS file: /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/include/asm-i386/pgtable-3level.h,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** pgtable-3level.h 15 Dec 2005 04:53:47 -0000 1.1 --- pgtable-3level.h 15 Dec 2005 05:27:23 -0000 1.1.2.1 *************** *** 49,58 **** * value and then use set_pte to update it. -ben */ - #ifdef CONFIG_DUMP_MINI_KERNEL - extern void set_pte(pte_t *, pte_t); - extern void set_pte_atomic(pte_t *, pte_t); - extern void set_pmd(pmd_t *, pmd_t); - extern void set_pgd(pgd_t *, pgd_t); - #else static inline void set_pte(pte_t *ptep, pte_t pte) { --- 49,52 ---- *************** *** 68,72 **** #define set_pgd(pgdptr,pgdval) \ set_64bit((unsigned long long *)(pgdptr),pgd_val(pgdval)) - #endif /* --- 62,65 ---- Index: pgtable-2level.h =================================================================== RCS file: /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/include/asm-i386/pgtable-2level.h,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** pgtable-2level.h 15 Dec 2005 04:53:47 -0000 1.1 --- pgtable-2level.h 15 Dec 2005 05:27:23 -0000 1.1.2.1 *************** *** 24,32 **** * hook is made available. */ - #ifdef CONFIG_DUMP_MINI_KERNEL - extern void set_pte(pte_t *, pte_t); - #else #define set_pte(pteptr, pteval) (*(pteptr) = pteval) - #endif #define set_pte_atomic(pteptr, pteval) set_pte(pteptr,pteval) /* --- 24,28 ---- *************** *** 34,44 **** * but the define is needed for a generic inline function.) */ - #ifdef CONFIG_DUMP_MINI_KERNEL - extern void set_pmd(pmd_t *, pmd_t); - extern void set_pgd(pgd_t *, pgd_t); - #else #define set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval) #define set_pgd(pgdptr, pgdval) (*(pgdptr) = pgdval) - #endif #define pgd_page(pgd) \ --- 30,35 ---- Index: fixmap.h =================================================================== RCS file: /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/include/asm-i386/fixmap.h,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** fixmap.h 15 Dec 2005 04:53:47 -0000 1.1 --- fixmap.h 15 Dec 2005 05:27:23 -0000 1.1.2.1 *************** *** 90,94 **** FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS - 1, FIX_WP_TEST, - FIX_DUMP, __end_of_fixed_addresses }; --- 90,93 ---- Index: processor.h =================================================================== RCS file: /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/include/asm-i386/processor.h,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** processor.h 15 Dec 2005 04:53:47 -0000 1.1 --- processor.h 15 Dec 2005 05:27:23 -0000 1.1.2.1 *************** *** 182,186 **** #define load_cr3(pgdir) \ ! asm volatile("movl %0,%%cr3": :"r" (true_phys(__pa(pgdir)))) --- 182,186 ---- #define load_cr3(pgdir) \ ! asm volatile("movl %0,%%cr3": :"r" (__pa(pgdir))) |
From: Itsuro O. <od...@us...> - 2005-12-15 05:27:35
|
Update of /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/arch/i386/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16038/arch/i386/kernel Modified Files: Tag: org-minikpatch-1_0-linux-2_6_9 head.S irq.c pci-dma.c setup.c Log Message: mini kernel v1 update1 original kernel source Index: pci-dma.c =================================================================== RCS file: /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/arch/i386/kernel/pci-dma.c,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** pci-dma.c 15 Dec 2005 04:53:47 -0000 1.1 --- pci-dma.c 15 Dec 2005 05:27:22 -0000 1.1.2.1 *************** *** 51,55 **** if (ret != NULL) { memset(ret, 0, size); ! *dma_handle = true_phys(virt_to_phys(ret)); } return ret; --- 51,55 ---- if (ret != NULL) { memset(ret, 0, size); ! *dma_handle = virt_to_phys(ret); } return ret; Index: setup.c =================================================================== RCS file: /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/arch/i386/kernel/setup.c,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** setup.c 15 Dec 2005 04:53:47 -0000 1.1 --- setup.c 15 Dec 2005 05:27:22 -0000 1.1.2.1 *************** *** 1066,1081 **** reserve_ebda_region(); - #ifdef CONFIG_DUMP_MINI_KERNEL - /* interface area between real kernel: - * pfn 1: memory segment list of mini kernel - * pfn 2: dump header - * pfn 3: memory segment list of real system - * (note: mini kernel is not SMP) - */ - reserve_bootmem(PAGE_SIZE, PAGE_SIZE * 3); - - /* XXX: consider below */ - #endif - /* could be an AMD 768MPX chipset. Reserve a page before VGA to prevent PCI prefetch into it (errata #56). Usually the page is reserved anyways, --- 1066,1069 ---- Index: irq.c =================================================================== RCS file: /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/arch/i386/kernel/irq.c,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** irq.c 15 Dec 2005 04:53:47 -0000 1.1 --- irq.c 15 Dec 2005 05:27:22 -0000 1.1.2.1 *************** *** 271,275 **** } ! static int noirqdebug = 1; static int __init noirqdebug_setup(char *str) --- 271,275 ---- } ! static int noirqdebug; static int __init noirqdebug_setup(char *str) Index: head.S =================================================================== RCS file: /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/arch/i386/kernel/head.S,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** head.S 15 Dec 2005 04:53:47 -0000 1.1 --- head.S 15 Dec 2005 05:27:22 -0000 1.1.2.1 *************** *** 7,15 **** * and Martin Mares, November 1997. */ - /* - * Modified for Mini Kernel - * Portions Copyright 2004 NTT DATA CORPORATION. - * Portions Copyright 2004 VA Linux Systems Japan K.K. - */ .text --- 7,10 ---- *************** *** 40,48 **** /* ! * To be sure this is not SMP */ ! #ifdef CONFIG_SMP ! #error "Mini Kernel does not support SMP" ! #endif /* --- 35,50 ---- /* ! * This is how much memory *in addition to the memory covered up to ! * and including _end* we need mapped initially. We need one bit for ! * each possible page, but only in low memory, which means ! * 2^32/4096/8 = 128K worst case (4G/4G split.) ! * ! * Modulo rounding, each megabyte assigned here requires a kilobyte of ! * memory, which is currently unreclaimed. ! * ! * This should be a multiple of a page. */ ! #define INIT_MAP_BEYOND_END (128*1024) ! /* *************** *** 56,76 **** /* - * Calculate physical address - */ - call 1f - 1: popl %ebx - subl $0x100000, %ebx - andl $0xfffff000, %ebx - - /* * Set segments to known values. */ cld ! movl $boot_gdt_descr - __PAGE_OFFSET, %eax ! addl %ebx, %eax /* adjust TRUE physical addr */ ! movl 2(%eax), %ecx ! addl %ebx, %ecx ! movl %ecx, 2(%eax) /* adjust TRUE physical addr */ ! lgdt (%eax) movl $(__BOOT_DS),%eax movl %eax,%ds --- 58,65 ---- /* * Set segments to known values. */ cld ! lgdt boot_gdt_descr - __PAGE_OFFSET movl $(__BOOT_DS),%eax movl %eax,%ds *************** *** 87,91 **** movl $__bss_stop - __PAGE_OFFSET,%ecx subl %edi,%ecx - addl %ebx, %edi /* adjust TRUE physical addr */ shrl $2,%ecx rep ; stosl --- 76,79 ---- *************** *** 93,100 **** /* * Initialize page tables. This creates a PDE and a set of page ! * tables, which are first 4MB of TRUE physical memory. The variable * init_pg_tables_end is set up to point to the first "safe" location. * Mappings are created both at virtual address 0 (identity mapping) ! * and PAGE_OFFSET and TRUE identity mapping. * * Warning: don't use %esi or the stack in this code. However, %esp --- 81,88 ---- /* * Initialize page tables. This creates a PDE and a set of page ! * tables, which are located immediately beyond _end. The variable * init_pg_tables_end is set up to point to the first "safe" location. * Mappings are created both at virtual address 0 (identity mapping) ! * and PAGE_OFFSET for up to _end+sizeof(page tables)+INIT_MAP_BEYOND_END. * * Warning: don't use %esi or the stack in this code. However, %esp *************** *** 104,122 **** movl $(pg0 - __PAGE_OFFSET), %edi - addl %ebx, %edi /* adjust TRUE physical addr */ movl $(swapper_pg_dir - __PAGE_OFFSET), %edx ! addl %ebx, %edx /* adjust TRUE physical addr */ ! leal 0x007(%edi),%ecx /* Create PDE entry */ movl %ecx,(%edx) /* Store identity PDE entry */ movl %ecx,page_pde_offset(%edx) /* Store kernel PDE entry */ ! /* Store TRUE identity PDE entry */ ! movl %ebx, %eax ! shrl $20, %eax ! addl %eax, %edx ! movl %ecx,(%edx) ! ! movl $0x007, %eax /* 0x007 = PRESENT+RW+USER */ ! addl %ebx, %eax /* adjust TRUE physical addr */ movl $1024, %ecx 11: --- 92,102 ---- movl $(pg0 - __PAGE_OFFSET), %edi movl $(swapper_pg_dir - __PAGE_OFFSET), %edx ! movl $0x007, %eax /* 0x007 = PRESENT+RW+USER */ ! 10: leal 0x007(%edi),%ecx /* Create PDE entry */ movl %ecx,(%edx) /* Store identity PDE entry */ movl %ecx,page_pde_offset(%edx) /* Store kernel PDE entry */ ! addl $4,%edx movl $1024, %ecx 11: *************** *** 124,147 **** addl $0x1000,%eax loop 11b ! ! movl $init_pg_tables_end - __PAGE_OFFSET, %eax ! addl %ebx, %eax /* adjust TRUE physical addr */ ! subl %ebx, %edi /* back to PSEUDO physical addr */ ! movl %edi,(%eax) ! ! /* reset address 0x0 */ ! movl $pg0 - __PAGE_OFFSET, %eax ! addl %ebx, %eax /* adjust TRUE physical addr */ ! movl $0x007, (%eax) ! ! /* reset address range [0xa0000-0xfffff] for use video ram */ ! movl $pg0 - __PAGE_OFFSET + 0x280, %edi ! addl %ebx, %edi /* adjust TRUE physical addr */ ! movl $96, %ecx /* 96 entries */ ! movl $0xa0007, %eax ! 12: ! stosl ! addl $0x1000, %eax ! loop 12b; #ifdef CONFIG_SMP --- 104,113 ---- addl $0x1000,%eax loop 11b ! /* End condition: we must map up to and including INIT_MAP_BEYOND_END */ ! /* bytes beyond the end of our own page tables; the +0x007 is the attribute bits */ ! leal (INIT_MAP_BEYOND_END+0x007)(%edi),%ebp ! cmpl %ebp,%eax ! jb 10b ! movl %edi,(init_pg_tables_end - __PAGE_OFFSET) #ifdef CONFIG_SMP *************** *** 221,225 **** */ movl $swapper_pg_dir-__PAGE_OFFSET,%eax - addl %ebx, %eax /* adjust TRUE physical addr */ movl %eax,%cr3 /* set the page table pointer.. */ movl %cr0,%eax --- 187,190 ---- *************** *** 228,235 **** ljmp $__BOOT_CS,$1f /* Clear prefetch and normalize %eip */ 1: - /* Set __phys_offset for later use */ - movl %ebx, (__phys_offset) - xorl %ebx, %ebx /* nen no tame */ - /* Set up the stack pointer */ lss stack_start,%esp --- 193,196 ---- *************** *** 504,510 **** .fill NR_CPUS-1,8,0 # space for the other GDT descriptors - ENTRY(__phys_offset) - .long 0 - /* * The boot_gdt_table must mirror the equivalent in setup.S and is --- 465,468 ---- |
From: Itsuro O. <od...@us...> - 2005-12-15 05:27:34
|
Update of /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/arch/x86_64/mm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16038/arch/x86_64/mm Modified Files: Tag: org-minikpatch-1_0-linux-2_6_9 init.c Log Message: mini kernel v1 update1 original kernel source Index: init.c =================================================================== RCS file: /cvsroot/mkdump/minikpatch/1.0/linus/2.6.9/arch/x86_64/mm/init.c,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** init.c 15 Dec 2005 04:53:47 -0000 1.1 --- init.c 15 Dec 2005 05:27:23 -0000 1.1.2.1 *************** *** 239,254 **** unsigned long pe; - if (paddr == 0) { - /* set level4_page_table */ - pe = _KERNPG_TABLE | (unsigned long)((char *)level1_ident_pgt - __START_KERNEL_map); - set_pmd(pmd, __pmd(pe)); - continue; - } - if (paddr >= end) { for (; j < PTRS_PER_PMD; j++, pmd++) set_pmd(pmd, __pmd(0)); break; ! } pe = _PAGE_NX|_PAGE_PSE | _KERNPG_TABLE | _PAGE_GLOBAL | paddr; pe &= __supported_pte_mask; --- 239,247 ---- unsigned long pe; if (paddr >= end) { for (; j < PTRS_PER_PMD; j++, pmd++) set_pmd(pmd, __pmd(0)); break; ! } pe = _PAGE_NX|_PAGE_PSE | _KERNPG_TABLE | _PAGE_GLOBAL | paddr; pe &= __supported_pte_mask; *************** *** 630,761 **** return (addr >= vma->vm_start) && (addr < vma->vm_end); } - - /* - * page tables handle routines for Mini Kernel - */ - /* _PAGE_NX is bit-63. sigh */ - unsigned long pte_val(pte_t pte) - { - unsigned long flags = pte.pte & _PGTABLE_FLAGS; - unsigned long paddr = pte.pte & ~_PGTABLE_FLAGS; - - return (pte.pte & _PAGE_PRESENT) ? pseudo_phys(paddr) | flags : pte.pte; - } - - unsigned long pmd_val(pmd_t pmd) - { - unsigned long flags = pmd.pmd & _PGTABLE_FLAGS; - unsigned long paddr = pmd.pmd & ~_PGTABLE_FLAGS; - - return (pmd.pmd & _PAGE_PRESENT) ? pseudo_phys(paddr) | flags : pmd.pmd; - } - - unsigned long pgd_val(pgd_t pgd) - { - unsigned long flags = pgd.pgd & _PGTABLE_FLAGS; - unsigned long paddr = pgd.pgd & ~_PGTABLE_FLAGS; - - return (pgd.pgd & _PAGE_PRESENT) ? pseudo_phys(paddr) | flags : pgd.pgd; - } - - unsigned long pml4_val(pml4_t pml4) - { - unsigned long flags = pml4.pml4 & _PGTABLE_FLAGS; - unsigned long paddr = pml4.pml4 & ~_PGTABLE_FLAGS; - - return (pml4.pml4 & _PAGE_PRESENT) ? pseudo_phys(paddr) | flags : pml4.pml4; - } - - void set_pte(pte_t *dst, pte_t val) - { - unsigned long flags = val.pte & _PGTABLE_FLAGS; - unsigned long paddr = val.pte & ~_PGTABLE_FLAGS; - - dst->pte = val.pte & _PAGE_PRESENT ? true_phys(paddr) | flags : val.pte; - } - - void set_pmd(pmd_t *dst, pmd_t val) - { - unsigned long flags = val.pmd & _PGTABLE_FLAGS; - unsigned long paddr = val.pmd & ~_PGTABLE_FLAGS; - - dst->pmd = val.pmd ? true_phys(paddr) | flags : val.pmd; - } - - void set_pgd(pgd_t *dst, pgd_t val) - { - unsigned long flags = val.pgd & _PGTABLE_FLAGS; - unsigned long paddr = val.pgd & ~_PGTABLE_FLAGS; - - dst->pgd = val.pgd ? true_phys(paddr) | flags : val.pgd; - } - - void set_pml4(pml4_t *dst, pml4_t val) - { - unsigned long flags = val.pml4 & _PGTABLE_FLAGS; - unsigned long paddr = val.pml4 & ~_PGTABLE_FLAGS; - - dst->pml4 = val.pml4 ? true_phys(paddr) | flags : val.pml4; - } - - unsigned long true_phys(unsigned long pa) - { - unsigned long pfn = pa >> PAGE_SHIFT; - - /* end_pfn == 0 means true_phys called by early boot part */ - if ((end_pfn && pfn >= end_pfn) || (0xa0 <= pfn && pfn < 0x100)) { - return pa; - } else { - return (pa & __PHYS_SEG_MASK) + phys_table[pa >> __PHYS_SEG_SHIFT]; - } - } - - unsigned long pseudo_phys(unsigned long pa) - { - int i; - - if (0xa0000 <= pa && pa < 0x100000) { - return pa; - } - for (i = 0; i < MAX_MINIK_MEM_SEG; i++) { - if (phys_table[i] == ((pa >> __PHYS_SEG_SHIFT) << __PHYS_SEG_SHIFT)) { - return (pa & __PHYS_SEG_MASK) + ((unsigned long)i << __PHYS_SEG_SHIFT); - } - } - - return pa; - } - - static pte_t *dump_pte = NULL; - static unsigned long dump_vaddr; - void dump_set_pte_pfn(unsigned long pfn) - { - if (!dump_pte) { - pml4_t *pml4; - pgd_t *pgd; - pmd_t *pmd; - - dump_vaddr = __fix_to_virt(FIX_DUMP); - pml4 = pml4_offset_k(dump_vaddr); - if (pml4_none(*pml4)) { - BUG(); - return; - } - pgd = level3_offset_k(pml4, dump_vaddr); - if (pgd_none(*pgd)) { - BUG(); - return; - } - pmd = pmd_offset(pgd, dump_vaddr); - if (pmd_none(*pmd)) { - BUG(); - return; - } - dump_pte = pte_offset_kernel(pmd, dump_vaddr); - } - - /* set pfn asis. don't use set_pte. */ - *dump_pte = pfn_pte(pfn, PAGE_KERNEL); - - __flush_tlb_one(dump_vaddr); - } --- 623,624 ---- |