|
49 | 49 | #include <asm/efi.h>
|
50 | 50 | #include <asm/e820/api.h>
|
51 | 51 | #include <asm/time.h>
|
52 |
| -#include <asm/set_memory.h> |
53 | 52 | #include <asm/tlbflush.h>
|
54 | 53 | #include <asm/x86_init.h>
|
55 | 54 | #include <asm/uv/uv.h>
|
@@ -496,74 +495,6 @@ void __init efi_init(void)
|
496 | 495 | efi_print_memmap();
|
497 | 496 | }
|
498 | 497 |
|
499 |
| -#if defined(CONFIG_X86_32) |
500 |
| - |
501 |
| -void __init efi_set_executable(efi_memory_desc_t *md, bool executable) |
502 |
| -{ |
503 |
| - u64 addr, npages; |
504 |
| - |
505 |
| - addr = md->virt_addr; |
506 |
| - npages = md->num_pages; |
507 |
| - |
508 |
| - memrange_efi_to_native(&addr, &npages); |
509 |
| - |
510 |
| - if (executable) |
511 |
| - set_memory_x(addr, npages); |
512 |
| - else |
513 |
| - set_memory_nx(addr, npages); |
514 |
| -} |
515 |
| - |
516 |
| -void __init runtime_code_page_mkexec(void) |
517 |
| -{ |
518 |
| - efi_memory_desc_t *md; |
519 |
| - |
520 |
| - /* Make EFI runtime service code area executable */ |
521 |
| - for_each_efi_memory_desc(md) { |
522 |
| - if (md->type != EFI_RUNTIME_SERVICES_CODE) |
523 |
| - continue; |
524 |
| - |
525 |
| - efi_set_executable(md, true); |
526 |
| - } |
527 |
| -} |
528 |
| - |
529 |
| -void __init efi_memory_uc(u64 addr, unsigned long size) |
530 |
| -{ |
531 |
| - unsigned long page_shift = 1UL << EFI_PAGE_SHIFT; |
532 |
| - u64 npages; |
533 |
| - |
534 |
| - npages = round_up(size, page_shift) / page_shift; |
535 |
| - memrange_efi_to_native(&addr, &npages); |
536 |
| - set_memory_uc(addr, npages); |
537 |
| -} |
538 |
| - |
539 |
| -void __init old_map_region(efi_memory_desc_t *md) |
540 |
| -{ |
541 |
| - u64 start_pfn, end_pfn, end; |
542 |
| - unsigned long size; |
543 |
| - void *va; |
544 |
| - |
545 |
| - start_pfn = PFN_DOWN(md->phys_addr); |
546 |
| - size = md->num_pages << PAGE_SHIFT; |
547 |
| - end = md->phys_addr + size; |
548 |
| - end_pfn = PFN_UP(end); |
549 |
| - |
550 |
| - if (pfn_range_is_mapped(start_pfn, end_pfn)) { |
551 |
| - va = __va(md->phys_addr); |
552 |
| - |
553 |
| - if (!(md->attribute & EFI_MEMORY_WB)) |
554 |
| - efi_memory_uc((u64)(unsigned long)va, size); |
555 |
| - } else |
556 |
| - va = efi_ioremap(md->phys_addr, size, |
557 |
| - md->type, md->attribute); |
558 |
| - |
559 |
| - md->virt_addr = (u64) (unsigned long) va; |
560 |
| - if (!va) |
561 |
| - pr_err("ioremap of 0x%llX failed!\n", |
562 |
| - (unsigned long long)md->phys_addr); |
563 |
| -} |
564 |
| - |
565 |
| -#endif |
566 |
| - |
567 | 498 | /* Merge contiguous regions of the same type and attribute */
|
568 | 499 | static void __init efi_merge_regions(void)
|
569 | 500 | {
|
|
0 commit comments