Function report | 
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 activity | Download SCCT | Chinese | 
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 | 
| 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 | 
| 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 | 
| 907 | checksum = 0xff | 
| 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 | 
| 916 | If Not mpc_new Then | 
| 917 | pr_err("MPTABLE: new mpc early_memremap() failed\n") | 
| 918 | Go to do_unmap_mpc | 
| 921 | memcpy(mpc_new, mpc, Size of table ) | 
| 922 | early_memunmap(mpc, size) | 
| 924 | size = mpc_new_length | 
| 926 | If mpc_new_phys - Configuration table address Then | 
| 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) | 
| 936 | early_memunmap(mpf, size of mpf ) | 
| 940 | Checksum (makes sum 0) = 0 | 
| 942 | pr_info("physptr new: %x\n", Configuration table address ) | 
| 953 | do_unmap_mpc : | 
| 954 | early_memunmap(mpc, size) | 
| 956 | do_unmap_mpf : | 
| 957 | early_memunmap(mpf, size of mpf ) | 
| 959 | Return 0 | 
| Source code conversion tool public plug-in interface  | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion  |