search for: physaddr

Displaying 20 results from an estimated 72 matches for "physaddr".

Did you mean: phys_addr
2006 Mar 24
2
[PATCH] qemu pcnet emulation fixes
...t;rdra + - (CSR_RCVRL(s) - nrdc) * - (BCR_SWSTYLE(s) ? 16 : 8 ); - int nnrc = nrdc<=1 ? CSR_RCVRL(s) : nrdc-1; - target_phys_addr_t nnrd = s->rdra + - (CSR_RCVRL(s) - nnrc) * - (BCR_SWSTYLE(s) ? 16 : 8 ); -#endif - CHECK_RMD(PHYSADDR(s,crda), bad); + if (!s->crmd.rmd1.own) { + CHECK_RMD(&(s->crmd),PHYSADDR(s,crda), bad); + } if (!bad) { - CHECK_RMD(PHYSADDR(s,nrda), bad); + if (s->crmd.rmd1.own && !s->nrmd.rmd1.own) { + CHECK_RMD(&(s->nrmd),PHYSADDR(s,nrda), bad); +...
2020 Jul 24
0
[PATCH v5 34/75] x86/head/64: Make fixup_pointer() static inline
...ms boot_params; extern char _text[]; +/* + * This function is used in C code that runs while the kernel still runs on + * identity mapped addresses to get the correct address of kernel pointers in + * the identity mapping. + */ +static __always_inline void *fixup_pointer(void *ptr, unsigned long physaddr) +{ + return ptr - (void *)_text + (void *)physaddr; +} + static inline bool kaslr_enabled(void) { return IS_ENABLED(CONFIG_RANDOMIZE_MEMORY) && diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index b0ab5627900b..8703292a35e9 100644 --- a/arch/x86/kernel/head64.c +++ b/...
2017 Jun 22
2
lld extra program headers
...s causes file sizes to be significantly larger than what would get with ld.gold or ld.bfd. # readelf -l test.bfd Elf file type is EXEC (Executable file) Entry point 0x4000b0 There are 2 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align LOAD 0x0000000000000000 0x0000000000400000 0x0000000000400000 0x00000000000000c0 0x00000000000000c0 R E 0x200000 GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000...
2020 Aug 24
0
[PATCH v6 36/76] x86/head/64: Load IDT earlier
...++++++++++++++ 4 files changed, 34 insertions(+) diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h index 8aa6ba0427b0..5c09f50ecf1c 100644 --- a/arch/x86/include/asm/setup.h +++ b/arch/x86/include/asm/setup.h @@ -50,6 +50,8 @@ extern unsigned long __startup_64(unsigned long physaddr, struct boot_params *bp extern unsigned long __startup_secondary_64(void); extern void startup_64_setup_env(unsigned long physbase); extern int early_make_pgtable(unsigned long address); +extern void early_idt_setup_early_handler(unsigned long physaddr); +extern void early_load_idt(void); #if...
2007 Apr 18
1
[PATCH] Lguest32, use guest page tables to find paddr for emulated instructions
...============================================================ --- linux-2.6.21-rc5-mm2.orig/drivers/lguest/core.c +++ linux-2.6.21-rc5-mm2/drivers/lguest/core.c @@ -160,11 +160,14 @@ static int emulate_insn(struct lguest *l { u8 insn; unsigned int insnlen = 0, in = 0, shift = 0; - unsigned long physaddr = guest_pa(lg, lg->regs->eip); + unsigned long physaddr = lguest_find_guest_paddr(lg, lg->regs->eip); - /* This only works for addresses in linear mapping... */ - if (lg->regs->eip < lg->page_offset) + /* FIXME: Handle physaddr's that crosses pages (modules are in VM)...
2007 Apr 18
1
[PATCH] Lguest32, use guest page tables to find paddr for emulated instructions
...============================================================ --- linux-2.6.21-rc5-mm2.orig/drivers/lguest/core.c +++ linux-2.6.21-rc5-mm2/drivers/lguest/core.c @@ -160,11 +160,14 @@ static int emulate_insn(struct lguest *l { u8 insn; unsigned int insnlen = 0, in = 0, shift = 0; - unsigned long physaddr = guest_pa(lg, lg->regs->eip); + unsigned long physaddr = lguest_find_guest_paddr(lg, lg->regs->eip); - /* This only works for addresses in linear mapping... */ - if (lg->regs->eip < lg->page_offset) + /* FIXME: Handle physaddr's that crosses pages (modules are in VM)...
2017 Oct 09
4
Understanding of ldd header allocation
...is expected from the resulting binary (and what ld.bfd produces) is that no ELF headers are allocated in the address space, e.g. Elf file type is EXEC (Executable file) Entry point 0x80001a0f There are 1 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x001000 0x80000000 0x80000000 0x08284 0x08284 RWE 0x1000 Section to Segment mapping: Segment Sections... 00 .text .rodata .eh_frame .data However, what ldd does is different. (To create a single segment I use --omagic argument, it works fin...
2007 Jul 30
2
possible bug in xen.hg/tools/ioemu/tools/vl.c, function net_tap_init()
in xen.hg/tools/ioemu/tools/vl.c, function net_tap_init() if (need_setphysaddr) { if ((r = dlpi_set_physaddr(dh, DL_CURR_PHYS_ADDR, s->mac_addr, ETHERADDRL)) != DLPI_SUCCESS) { fprintf(logfile, "net_tap_init: cannot set physaddr (%d)\n", r);...
2016 Aug 12
2
How LLD should create segments when linkerscript is used ?
...+ RW) when LLD creates 4 (R RE R RW), and since we do not align sections to the page boundary manually or in script, it will not work I think. Below is lld output of FreeBSD kernel (notice that RE and R loads are not aligned): Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align PHDR 0x0000000000000040 0xffffffff80001040 0xffffffff80001040 0x00000000000001f8 0x00000000000001f8 R 8 INTERP 0x0000000000000238 0xffffffff80001238 0xffffffff80001238...
2006 Dec 01
1
[PATCH 2/10] Add support for netfront/netback acceleration drivers
...+++ b/xen/arch/ia64/xen/mm.c Fri Dec 01 16:22:41 2006 +0000 @@ -857,7 +857,8 @@ __assign_domain_page(struct domain *d, /* get_page() and map a physical address to the specified metaphysical addr */ void assign_domain_page(struct domain *d, - unsigned long mpaddr, unsigned long physaddr) + unsigned long mpaddr, unsigned long physaddr, + unsigned long flags) { struct page_info* page = mfn_to_page(physaddr >> PAGE_SHIFT); int ret; @@ -869,7 +870,7 @@ assign_domain_page(struct domain *d, // because __assign_domain_page() uses...
2020 Aug 29
1
[PATCH v6 36/76] x86/head/64: Load IDT earlier
...020 at 10:54:31AM +0200, Joerg Roedel wrote: > @@ -385,3 +386,25 @@ void __init alloc_intr_gate(unsigned int n, const void *addr) > if (!WARN_ON(test_and_set_bit(n, system_vectors))) > set_intr_gate(n, addr); > } > + > +void __init early_idt_setup_early_handler(unsigned long physaddr) I wonder if you could drop one of the "early"es: idt_setup_early_handler() for example looks ok to me. Or early_setup_idt_handler() if you wanna have "early" as prefix... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette
2013 Dec 10
7
[PATCH] libxc/arm: Correctly handle the difference between virtual and physical address
xc_dom_alloc_page deals with virtual address not physical address. When an ELF is loaded, virtual address and physical address may be different. Signed-off-by: Julien Grall <julien.grall@linaro.org> --- tools/libxc/xc_dom_arm.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tools/libxc/xc_dom_arm.c b/tools/libxc/xc_dom_arm.c index a40e04d..75a6f1c
2007 Feb 18
2
shared klibc broken on x86_64 with binutils >= 2.17.50.0.2
...n building klibc with new binutils, I get: $ readelf -l usr/klibc/libc.so Elf file type is EXEC (Executable file) Entry point 0x200200 There are 3 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align LOAD 0x0000000000000000 0x0000000000200000 0x0000000000200000 0x0000000000011a5e 0x0000000000011a5e R E 200000 LOAD 0x0000000000011a60 0x0000000000411a60 0x0000000000411a60...
2012 Mar 23
10
[hybrid] : mmap pfn space...
Hi Ian/Stefano, So, I''m back to using pfn space from maxphysaddr below. Stefano, you suggested ballooning, but that would be just too slow. There are lot of pages to be mapped, 4k at a time during guest creation, and I am afraid ballooning and hypercalls to populate EPT will be pretty slow. OTOH, there is tons of address space available between max-physaddr and...
2017 Oct 04
28
x86: PIE support and option to extend KASLR randomization
These patches make the changes necessary to build the kernel as Position Independent Executable (PIE) on x86_64. A PIE kernel can be relocated below the top 2G of the virtual address space. It allows to optionally extend the KASLR randomization range from 1G to 3G. Thanks a lot to Ard Biesheuvel & Kees Cook on their feedback on compiler changes, PIE support and KASLR in general. Thanks to
2017 Oct 04
28
x86: PIE support and option to extend KASLR randomization
These patches make the changes necessary to build the kernel as Position Independent Executable (PIE) on x86_64. A PIE kernel can be relocated below the top 2G of the virtual address space. It allows to optionally extend the KASLR randomization range from 1G to 3G. Thanks a lot to Ard Biesheuvel & Kees Cook on their feedback on compiler changes, PIE support and KASLR in general. Thanks to
2018 Nov 22
0
[PATCH] x86: fix -Wmissing-prototypes warning
...; > > 24 files changed, 55 insertions(+), 3 deletions(-) > > > > Breaks 32-bit compilation: > > > > ../arch/x86/include/asm/setup.h: Assembler messages: > > ../arch/x86/include/asm/setup.h:30: Error: no such instruction: `unsigned long __startup_64(unsigned long physaddr,struct boot_params *bp)' > > > > I'll skip the setup.h bits - let's hope that's the only bug. > > Sorry for the inconvenience, though I have checked carefully :-) > > How do you produce this error? I tested this way but did not reproduce > that error: &g...
2020 Apr 28
0
[PATCH v3 70/75] x86/head/64: Setup TSS early for secondary CPUs
...table[]; extern const struct desc_ptr debug_idt_descr; diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index d83d59c15548..30a6d09fd9d0 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c @@ -523,6 +523,19 @@ void __head early_idt_setup_early_handler(unsigned long physaddr) } } +void __head early_load_tss(void) +{ + struct desc_struct *gdt = (struct desc_struct *)boot_gdt; + struct tss_struct *tss = this_cpu_ptr(&cpu_tss_rw); + tss_desc tss_desc; + + set_tssldt_descriptor(&tss_desc, (unsigned long)tss, DESC_TSS, + __KERNEL_TSS_LIMIT); + native_wr...
2020 Jun 04
0
[PATCH v3 31/75] x86/head/64: Install boot GDT
...ds to be set at runtime because it references the boot_gdt while + * the kernel still uses a direct mapping. + */ +struct desc_ptr boot_gdt_descr = { + .size = sizeof(boot_gdt), + .address = 0, +}; + #define __head __section(.head.text) static void __head *fixup_pointer(void *ptr, unsigned long physaddr) diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index 4bbc770af632..62513dd1e0e4 100644 --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S @@ -72,6 +72,26 @@ SYM_CODE_START_NOALIGN(startup_64) /* Set up the stack for verify_cpu(), similar to initial_stack below */...
2017 Oct 11
32
[PATCH v1 00/27] x86: PIE support and option to extend KASLR randomization
Changes: - patch v1: - Simplify ftrace implementation. - Use gcc mstack-protector-guard-reg=%gs with PIE when possible. - rfc v3: - Use --emit-relocs instead of -pie to reduce dynamic relocation space on mapped memory. It also simplifies the relocation process. - Move the start the module section next to the kernel. Remove the need for -mcmodel=large on modules. Extends