Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.1:Update
lcrash
lcrash-add-kl-init-virtop-i386
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File lcrash-add-kl-init-virtop-i386 of Package lcrash
From: Bernhard Walle <bwalle@suse.de> Subject: [PATCH] Add kl_init_virtop_i386() This patch adds kl_init_virtop_i386(). This is necessary for the next patch that adds a kl_linux_banner_valid() check also for i386. Signed-off-by: Bernhard Walle <bwalle@suse.de> --- lib/libklib/include/kl_dump_i386.h | 1 + lib/libklib/kl_dump_i386.c | 1 + lib/libklib/kl_kern.c | 16 ---------------- lib/libklib/kl_kern_i386.c | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 37 insertions(+), 16 deletions(-) --- a/lib/libklib/include/kl_dump_i386.h +++ b/lib/libklib/include/kl_dump_i386.h @@ -90,5 +90,6 @@ kaddr_t kl_dumpesp_i386(kaddr_t); int kl_get_dump_header_i386(kl_dump_header_i386_t*); int kl_smp_dumptask_i386(kaddr_t); int kl_set_dumparch_i386(void); +int kl_init_virtop_i386(void); #endif /* __KL_DUMP_I386_H */ --- a/lib/libklib/kl_dump_i386.c +++ b/lib/libklib/kl_dump_i386.c @@ -211,6 +211,7 @@ kl_set_dumparch_i386(void) KLP->dump->arch.fix_vaddr = kl_fix_vaddr_i386; KLP->dump->arch.dha_size = sizeof(kl_dump_header_i386_t); KLP->dump->arch.write_dha = kl_write_dha_i386; + KLP->dump->arch.init_virtop = kl_init_virtop_i386; return(0); } --- a/lib/libklib/kl_kern.c +++ b/lib/libklib/kl_kern.c @@ -199,21 +199,5 @@ kl_init_virtop(void) } } - /* Get the cr4 settings. This will tell us if the system is PAE enabled - * - */ - if(KL_ARCH == KL_ARCH_I386){ - sp = kl_lkup_symname("mmu_cr4_features"); - if(sp){ - KL_KERNEL_FLAGS = KL_READ_PTR(sp->s_addr - KL_PAGE_OFFSET); - if (KL_ERROR) { - /* XXX set error code */ - return(1); - } - } else { - return(1); - } - } - return(0); } --- a/lib/libklib/kl_kern_i386.c +++ b/lib/libklib/kl_kern_i386.c @@ -88,3 +88,38 @@ kl_fix_vaddr_i386(kaddr_t vaddr, size_t } return vaddr; } + +/* + * Name: kl_init_virtop_i386() + * Func: initialize virtual to physical address translation + * This function must at least initialize high_memory and init_mm. + */ +int +kl_init_virtop_i386(void) +{ + syment_t *sp; + int ret; + + ret = kl_init_virtop(); + if (ret != 0) { + return ret; + } + + /* Get the cr4 settings. This will tell us if the system is PAE enabled + * + */ + if(KL_ARCH == KL_ARCH_I386){ + sp = kl_lkup_symname("mmu_cr4_features"); + if(sp){ + KL_KERNEL_FLAGS = KL_READ_PTR(sp->s_addr - KL_PAGE_OFFSET); + if (KL_ERROR) { + /* XXX set error code */ + return(1); + } + } else { + return(1); + } + } + + return(0); +}
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor