Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\mpparse.c Create Date:2022-07-28 08:25:59
Last Modify:2020-03-16 21:44:10 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:update_mp_table

Proto:static int __init update_mp_table(void)

Type:int

Parameter:Nothing

862  If Not enable_update_mptable Then Return 0
865  If Not mpf_found Then Return 0
868  mpf = early_memremap(mpf_base, size of mpf )
869  If Not mpf Then
870  pr_err("MPTABLE: mpf early_memremap() failed\n")
871  Return 0
877  If Standard or configuration ? Then Go to do_unmap_mpf
880  If Not Configuration table address Then Go to do_unmap_mpf
883  size = get_mpc_size(Configuration table address )
884  mpc = early_memremap(Configuration table address , size)
885  If Not mpc Then
886  pr_err("MPTABLE: mpc early_memremap() failed\n")
887  Go to do_unmap_mpf
890  If Not Read/parse the MPC Then Go to do_unmap_mpc
893  pr_info("mpf: %llx\n", (u64)mpf_base)
894  pr_info("physptr: %x\n", Configuration table address )
896  If mpc_new_phys && Size of table > mpc_new_length Then
897  mpc_new_phys = 0
898  pr_info("mpc_new_length is %ld, please use alloc_mptable=8k\n", mpc_new_length)
902  If Not mpc_new_phys Then
905  checksum = 0
906  old = Checksum an MP configuration block.
907  checksum = 0xff
908  new = Checksum an MP configuration block.
909  If old == new Then
910  pr_info("mpc is readonly, please try alloc_mptable instead\n")
911  Go to do_unmap_mpc
913  pr_info("use in-position replacing\n")
914  Else
915  mpc_new = early_memremap(mpc_new_phys, mpc_new_length)
916  If Not mpc_new Then
917  pr_err("MPTABLE: new mpc early_memremap() failed\n")
918  Go to do_unmap_mpc
920  Configuration table address = mpc_new_phys
921  memcpy(mpc_new, mpc, Size of table )
922  early_memunmap(mpc, size)
923  mpc = mpc_new
924  size = mpc_new_length
929  mpf_new = early_memremap(0x400 - 16, size of mpf_new )
930  If Not mpf_new Then
931  pr_err("MPTABLE: new mpf early_memremap() failed\n")
932  Go to do_unmap_mpc
934  pr_info("mpf new: %x\n", 0x400 - 16)
935  memcpy(mpf_new, mpf, 16)
936  early_memunmap(mpf, size of mpf )
937  mpf = mpf_new
940  Checksum (makes sum 0) = 0
941  Checksum (makes sum 0) -= Checksum an MP configuration block.
942  pr_info("physptr new: %x\n", Configuration table address )
951  replace_intsrc_all(mpc, mpc_new_phys, mpc_new_length)
953  do_unmap_mpc :
954  early_memunmap(mpc, size)
956  do_unmap_mpf :
957  early_memunmap(mpf, size of mpf )
959  Return 0