Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\setup.c Create Date:2022-07-28 07:40:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:setup_arch - architecture-specific boot-time initializations* Note: On x86_64, fixmaps are ready for use even before this is called.

Proto:void __init setup_arch(char **cmdline_p)

Type:void

Parameter:

TypeParameterName
char **cmdline_p
858  memblock_reserve(We need __phys_reloc_hide() here because gcc may assume that there is no* overflow during __pa() calculation and can optimize it unexpectedly.* Newer versions of gcc provide -fno-strict-overflow switch to handle this* case properly(Usage guidelines:* _text, _data: architecture specific, don't use them in arch-independent code* [_stext, _etext]: contains .text.* sections, may also contain .rodata.** and/or .init.* sections* [_sdata, _edata]: contains ), (unsignedlong)__end_of_kernel_reserve - (unsignedlong)Usage guidelines:* _text, _data: architecture specific, don't use them in arch-independent code* [_stext, _etext]: contains .text.* sections, may also contain .rodata.** and/or .init.* sections* [_sdata, _edata]: contains )
865  memblock_reserve(0, PAGE_SIZE)
867  early_reserve_initrd()
876  memcpy( & common cpu data for all cpus , & cpu data as detected by the assembly code in head_32.S , size of cpu data as detected by the assembly code in head_32.S )
882  lone_pgd_range(pgd_t *dst, pgd_t *src, int count);* dst and src can be on the same page, but the range must not overlap,* and must not cross a page boundary.
886  load_cr3(swapper_pg_dir)
896  lush everything
906  olpc_ofw_detect()
908  dt_setup_early_traps - Initialize the idt table with early traps* On X8664 these traps do not use interrupt stacks as they can't work* before cpu_init() is invoked and sets up TSS. The IST variants are* installed after that.
909  early_cpu_init()
910  arch_init_ideal_nops()
911  jump_label_init()
912  early_ioremap_init()
914  setup_olpc_ofw_pgd()
916  ROOT_DEV = old_decode_dev(root_dev)
917  screen_info = 0x000
918  edid_info = 0x140
920  bios = 0x040
921  ist_info = 0x060
923  saved_video_mode = vid_mode
924  Boot loader ID and version as integers, for the benefit of proc_dointvec = type_of_loader
925  If Boot loader ID and version as integers, for the benefit of proc_dointvec >> 4 == 0xe Then
926  Boot loader ID and version as integers, for the benefit of proc_dointvec &= 0xf
927  Boot loader ID and version as integers, for the benefit of proc_dointvec |= ext_loader_type + 0x10 << 4
929  Boot loader ID and version as integers, for the benefit of proc_dointvec = Boot loader ID and version as integers, for the benefit of proc_dointvec & 0xf
930  Boot loader ID and version as integers, for the benefit of proc_dointvec |= ext_loader_ver << 4
948  arch_setup()
950  end = (1ULL << x86_phys_bits) - 1
951  e820__memory_setup()
952  parse_setup_data()
954  copy_edd()
956  If Not root_flags Then root_mountflags &= ~Mount read-only
958  start_code = Usage guidelines:* _text, _data: architecture specific, don't use them in arch-independent code* [_stext, _etext]: contains .text.* sections, may also contain .rodata.** and/or .init.* sections* [_sdata, _edata]: contains
959  end_code = Usage guidelines:* _text, _data: architecture specific, don't use them in arch-independent code* [_stext, _etext]: contains .text.* sections, may also contain .rodata.** and/or .init.* sections* [_sdata, _edata]: contains
960  end_data = _edata
961  brk = _brk_end
963  mpx_mm_init( & init_mm)
965  start = We need __phys_reloc_hide() here because gcc may assume that there is no* overflow during __pa() calculation and can optimize it unexpectedly.* Newer versions of gcc provide -fno-strict-overflow switch to handle this* case properly(Usage guidelines:* _text, _data: architecture specific, don't use them in arch-independent code* [_stext, _etext]: contains .text.* sections, may also contain .rodata.** and/or .init.* sections* [_sdata, _edata]: contains )
966  end = We need __phys_reloc_hide() here because gcc may assume that there is no* overflow during __pa() calculation and can optimize it unexpectedly.* Newer versions of gcc provide -fno-strict-overflow switch to handle this* case properly(Usage guidelines:* _text, _data: architecture specific, don't use them in arch-independent code* [_stext, _etext]: contains .text.* sections, may also contain .rodata.** and/or .init.* sections* [_sdata, _edata]: contains ) - 1
967  start = We need __phys_reloc_hide() here because gcc may assume that there is no* overflow during __pa() calculation and can optimize it unexpectedly.* Newer versions of gcc provide -fno-strict-overflow switch to handle this* case properly(__start_rodata)
968  end = We need __phys_reloc_hide() here because gcc may assume that there is no* overflow during __pa() calculation and can optimize it unexpectedly.* Newer versions of gcc provide -fno-strict-overflow switch to handle this* case properly(__end_rodata) - 1
969  start = We need __phys_reloc_hide() here because gcc may assume that there is no* overflow during __pa() calculation and can optimize it unexpectedly.* Newer versions of gcc provide -fno-strict-overflow switch to handle this* case properly(_sdata)
970  end = We need __phys_reloc_hide() here because gcc may assume that there is no* overflow during __pa() calculation and can optimize it unexpectedly.* Newer versions of gcc provide -fno-strict-overflow switch to handle this* case properly(_edata) - 1
971  start = We need __phys_reloc_hide() here because gcc may assume that there is no* overflow during __pa() calculation and can optimize it unexpectedly.* Newer versions of gcc provide -fno-strict-overflow switch to handle this* case properly(__bss_start)
972  end = We need __phys_reloc_hide() here because gcc may assume that there is no* overflow during __pa() calculation and can optimize it unexpectedly.* Newer versions of gcc provide -fno-strict-overflow switch to handle this* case properly(__bss_stop) - 1
987  Copy a NUL terminated string into a sized buffer
988  cmdline_p = command_line
997  x86_configure_nx()
999  Relies on boot_command_line being set
1001  If efi_enabled(Were we booted from EFI? ) Then efi_memblock_x86_reserve_range()
1023  If movable_node_is_enabled() Then Set the allocation direction to bottom-up or top-down.
1027  x86_report_nx()
1030  memblock_x86_reserve_range_setup_data()
1032  If acpi_mps_check() Then
1036  setup_clear_cpu_cap(Onboard APIC )
1039  e820__reserve_setup_data()
1040  e820__finish_early_params()
1042  If efi_enabled(Were we booted from EFI? ) Then efi_init()
1045  dmi_setup()
1051  init_hypervisor_platform()
1053  tsc_early_init()
1054  probe_roms()
1057  insert_resource( & iomem_resource, & code_resource)
1058  insert_resource( & iomem_resource, & Machine setup..)
1059  insert_resource( & iomem_resource, & data_resource)
1060  insert_resource( & iomem_resource, & bss_resource)
1062  alled before trim_bios_range() to spare extra sanitize
1063  trim_bios_range()
1065  If ppro_with_ram_bug() Then
1066  e820__range_update(0x70000000ULL, 0x40000ULL, E820_TYPE_RAM, E820_TYPE_RESERVED)
1068  e820__update_table(e820_table)
1069  printk(formational "fixed physical RAM map:\n")
1070  e820__print_table("bad_ppro")
1080  duplicated to the one in bootmem.h = e820__end_of_ram_pfn()
1083  mtrr_bp_init()
1084  If mtrr_trim_uncached_memory(duplicated to the one in bootmem.h ) Then duplicated to the one in bootmem.h = e820__end_of_ram_pfn()
1087  highest possible page = duplicated to the one in bootmem.h
1094  init_cache_modes()
1100  kernel_randomize_memory()
1104  find_low_pfn_range()
1121  find_smp_config()
1123  reserve_ibft_region()
1125  early_alloc_pgt_buf()
1132  reserve_brk()
1134  cleanup_highmap()
1136  memblock_set_current_limit - Set the current allocation limit to allow* limiting allocations to what is currently* accessible during boot*@limit: New limit value (physical address)
1137  e820__memblock_setup()
1139  reserve_bios_regions()
1141  efi_fake_memmap()
1142  efi_find_mirror()
1143  efi_esrt_init()
1149  efi_reserve_boot_services()
1152  e820__memblock_alloc_reserved_mpc_new()
1159  printk(debug-level messages "initial memory mapped: [mem 0x00000000-%#010lx]\n", (max_pfn_mapped << PAGE_SHIFT determines the page size ) - 1)
1163  reserve_real_mode()
1165  Here we put platform-specific memory range workarounds, i.e.* memory known to be corrupt or otherwise in need to be reserved on* specific platforms.* If this gets used more widely it could use a real dispatch mechanism.
1166  trim_low_memory_range()
1168  init_mem_mapping()
1170  dt_setup_early_pf - Initialize the idt table with early pagefault handler* On X8664 this does not use interrupt stacks as they can't work before* cpu_init() is invoked and sets up TSS
1181  mmu_cr4_features = __read_cr4() & ~X86_CR4_PCIDE
1183  memblock_set_current_limit - Set the current allocation limit to allow* limiting allocations to what is currently* accessible during boot*@limit: New limit value (physical address)
1194  setup_log_buf(1)
1196  If efi_enabled(Were we booted from EFI? ) Then
1199  pr_info("Secure boot disabled\n")
1200  Break
1202  pr_info("Secure boot enabled\n")
1203  Break
1204  Default
1205  pr_info("Secure boot could not be determined\n")
1206  Break
1210  reserve_initrd()
1212  acpi_table_upgrade()
1214  Interrupt control for vSMPowered x86_64 systems
1216  io_delay_init()
1218  early_platform_quirks()
1223  acpi_boot_table_init() and acpi_boot_init()* called from setup_arch(), always
1225  early_acpi_boot_init()
1227  initmem_init()
1228  dma_contiguous_reserve(max_pfn_mapped << PAGE_SHIFT determines the page size )
1234  reserve_crashkernel()
1236  memblock_find_dma_reserve()
1238  If Not early_xdbc_setup_hardware() Then early_xdbc_register_console()
1241  pagetable_init()
1243  kasan_init()
1251  sync_initial_page_table()
1253  tboot_probe()
1255  map_vsyscall()
1257  generic_apic_probe()
1259  early_quirks()
1264  acpi_boot_init()
1265  sfi_init()
1266  x86_dtb_init()
1271  get_smp_config()
1277  _apic_mappings - initialize APIC mappings
1279  prefill_possible_map()
1281  init_cpu_to_node()
1283  io_apic_init_mappings()
1285  guest_late_init()
1287  e820__reserve_resources()
1288  e820__register_nosave_regions(duplicated to the one in bootmem.h )
1290  reserve_resources()
1292  e820__setup_pci_gap()
1302  banner()
1304  wallclock_init()
1306  mcheck_init()
1308  register_refined_jiffies(Assume we use the PIT time source for the clock tick )
1315  unwind_init()