Displaying 6 results from an estimated 6 matches for "virtual_address".
2013 Nov 27
20
[PATCH 0/4] efi: PE header generation fix
The PE headers of the generated efi file were quite buggy. And since OVMF
perform a few consistency checks, syslinux was unable to run on it. I don't
pretend to have a thorough understanding of the PE+ headers, some bugs may
remain. :)
Celelibi (4):
efi: Fix PE header field rva_and_sizes_nr
efi: Location, size and alignment of .text section
efi: Useless relocations in PE file
efi: PE
2013 Dec 01
0
[PATCH v2 3/4] efi: Useless relocations in PE file
...write_header(FILE *f, __uint32_t entry, size_t data_size,
fwrite(&t_sec, sizeof(t_sec), 1, f);
/*
- * Write our dummy relocation and reloc section.
- */
- memset(&r_sec, 0, sizeof(r_sec));
- strcpy((char *)r_sec.name, ".reloc");
- r_sec.virtual_sz = sizeof(c_rel);
- r_sec.virtual_address = ftell(f) + sizeof(r_sec);
- r_sec.raw_data_sz = r_sec.virtual_sz;
- r_sec.raw_data = r_sec.virtual_address;
- r_sec.characteristics = IMAGE_SCN_CNT_INITIALIZED_DATA |
- IMAGE_SCN_ALIGN_1BYTES | IMAGE_SCN_MEM_DISCARDABLE |
- IMAGE_SCN_MEM_READ;
- fwrite(&r_sec, sizeof(r_sec), 1, f);
-
- mems...
2013 Nov 27
0
[PATCH 3/4] efi: Useless relocations in PE file
...write_header(FILE *f, __uint32_t entry, size_t data_size,
fwrite(&t_sec, sizeof(t_sec), 1, f);
/*
- * Write our dummy relocation and reloc section.
- */
- memset(&r_sec, 0, sizeof(r_sec));
- strcpy((char *)r_sec.name, ".reloc");
- r_sec.virtual_sz = sizeof(c_rel);
- r_sec.virtual_address = ftell(f) + sizeof(r_sec);
- r_sec.raw_data_sz = r_sec.virtual_sz;
- r_sec.raw_data = r_sec.virtual_address;
- r_sec.characteristics = IMAGE_SCN_CNT_INITIALIZED_DATA |
- IMAGE_SCN_ALIGN_1BYTES | IMAGE_SCN_MEM_DISCARDABLE |
- IMAGE_SCN_MEM_READ;
- fwrite(&r_sec, sizeof(r_sec), 1, f);
-
- mems...
2013 Nov 27
0
[PATCH 2/4] efi: Location, size and alignment of .text section
...pe32p), 1, f);
@@ -136,8 +130,10 @@ static void write_header(FILE *f, __uint32_t entry, size_t data_size,
memset(&t_sec, 0, sizeof(t_sec));
strcpy((char *)t_sec.name, ".text");
- t_sec.virtual_sz = total_sz;
- t_sec.raw_data_sz = total_sz;
+ t_sec.virtual_sz = data_size;
+ t_sec.virtual_address = hdr_sz;
+ t_sec.raw_data_sz = t_sec.virtual_sz;
+ t_sec.raw_data = t_sec.virtual_address;
t_sec.characteristics = IMAGE_SCN_CNT_CODE |
IMAGE_SCN_ALIGN_16BYTES | IMAGE_SCN_MEM_EXECUTE |
IMAGE_SCN_MEM_READ;
@@ -163,6 +159,16 @@ static void write_header(FILE *f, __uint32_t entry, size_t data...
2013 Nov 29
1
[PATCH 2/4] efi: Location, size and alignment of .text section
...@@ -163,6 +159,16 @@ static void write_header(FILE *f, __uint32_t entry, size_t data_size,
> fwrite(&c_rel, sizeof(c_rel), 1, f);
> fwrite(&dummy, sizeof(dummy), 1, f);
>
> + /*
> + * Add some padding to align the ELF as needed
> + */
> + if (ftell(f) > t_sec.virtual_address) {
> + // A fseek that rewind would be a bug hard to track
Use C-style comments please.
Other than that, the patch looks good. Thanks!
--
Matt Fleming, Intel Open Source Technology Center
2003 Aug 22
3
PAE removal patch for testing
...fset_t addr);
-static int pmap_is_current(pmap_t);
+static unsigned pdir4mb;
-#ifdef PAE
-static pdpt_entry_t *pmap_alloc_pdpt(void);
-static void pmap_free_pdpt(pdpt_entry_t *);
-#endif
+/*
+ * Routine: pmap_pte
+ * Function:
+ * Extract the page table entry associated
+ * with the given map/virtual_address pair.
+ */
+
+PMAP_INLINE unsigned *
+pmap_pte(pmap, va)
+ register pmap_t pmap;
+ vm_offset_t va;
+{
+ unsigned *pdeaddr;
+
+ if (pmap) {
+ pdeaddr = (unsigned *) pmap_pde(pmap, va);
+ if (*pdeaddr & PG_PS)
+ return pdeaddr;
+ if (*pdeaddr) {
+ return get_ptbase(pmap) + i386_btop(va);
+...