Silent Void

本文探讨了一种神秘的力量——爱,它存在于寂静的虚空之中,既是静止的又是不断运动的。文章认为每种生命都有其存在的目的,无论多么卑微;每种爱都表达了生命的阴阳两面,并在生命中占有其位置。文中还提到了一些关于生命、爱和存在本质的哲学思考。
Something mysterious is formed, born in the silent void. Waiting alone and unmoving, it is at once still and yet in constant motion.I do not know its name, so I will call it the love.
The Tao of love flows far away and returns on the wind of morning.If the love is great,then the life is great.If the life is great,then you will happy all time.
Each life has its purpose, however humble. Eachlove expresses the Yin and Yang of life.Each Love has its place within the Life.
The highest sounds are the hardest to hear. Going forward is a way to retreat. Greater love shows itself in life. Even a perfect love still has bugs.I don't know whether I amme dreaming that I am a spirit, or a spirit dreaming that I am me!
My GOD!!!!
/* # Copyright 2022 Unisoc (Shanghai) Technologies Co., Ltd. # Licensed under the Unisoc General Software License, version 1.0 (the License); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # https://www.unisoc.com/en_us/license/UNISOC_GENERAL_LICENSE_V1.0-EN_US # Software distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OF ANY KIND, either express or implied. # See the Unisoc General Software License, version 1.0 for more details. */ #include "boot_mode.h" #include <lk/debug.h> #include <sprd_common.h> #include <dl_common.h> #include <sprd_wdt.h> #include <malloc.h> #include <android_bootimg.h> #include <sprd_common_rw.h> #include <boot_parse.h> #include <logo_bin.h> #include <secureboot/sec_common.h> #include <asm/arch/check_reboot.h> /* panzhibin@MULTIMEDIA.DISPLAY.LCD, 2023/02/18, add for silence mode */ #include <boot_mode.h> bool silent_flag = false; extern int do_fastboot(void); extern void lcd_printf(const char *fmt, ...); extern void lcd_printf_xy(struct sprd_font_info *font_info, const char *fmt, ...); void lcd_enable(void); extern void fastboot_lcd_printf(void); #ifdef CONFIG_FASTBOOT_SECURITY_DOWNLOAD extern int fb_check_reboot_edl(void *ptr); #endif const char* g_env_bootmode = "normal"; unsigned int g_charger_mode = 0; uint64_t backstage_query_size = 0; extern char backtrace[512]; extern volatile int dump_backtrace_once; void __attribute__((weak)) fastboot_lcd_printf(void) { lcd_printf(" fastboot mode\n"); #ifdef CONFIG_ENABLE_LOGPOINT if(dump_backtrace_once && strlen(backtrace)) lcd_printf("lk_panic:\n%s\n", backtrace); #endif return; } #ifdef CONFIG_AUTOLOAD_MODE void autoload_mode(void) { struct boot_img_hdr *boot_hdr; ulong kernel_size = 0; uchar * ramdisk_addr = 0; ulong ramdisk_size = 0; uchar * dt_addr = 0; ulong dt_size = 0; struct dt_table_t *table = NULL; uint64_t size = 0; struct dt_entry_t *dt_entry_ptr = NULL; uint64_t offset = 0; debugf("autoload_mode\n"); stop_watchdog(); boot_hdr = malloc(512*4); if (boot_hdr == NULL) { errorf("autoload_mode malloc failed!\n"); return; } memcpy((void *)boot_hdr,(const void *)BOOTIMG_ADR,512*4); if (!memcmp(boot_hdr->magic, BOOT_MAGIC, BOOT_MAGIC_SIZE)) { kernel_size = (boot_hdr->kernel_size + (KERNL_PAGE_SIZE-1)) & (~(KERNL_PAGE_SIZE -1)); ramdisk_addr = (void *)BOOTIMG_ADR+512*4+kernel_size; ramdisk_size = (boot_hdr->ramdisk_size + (KERNL_PAGE_SIZE-1)) & (~(KERNL_PAGE_SIZE -1)); dt_addr = (void *)BOOTIMG_ADR+512*4+kernel_size+ramdisk_size; dt_size = (boot_hdr->dt_size + (KERNL_PAGE_SIZE-1)) & (~(KERNL_PAGE_SIZE -1)); memcpy((void *)KERNEL_ADR, (const void *)BOOTIMG_ADR+512*4, kernel_size); memcpy((void *)RAMDISK_ADR, ramdisk_addr, ramdisk_size); table = (struct dt_table_t*)dt_addr; /* Validate the device tree table header */ if((table->magic != SPRD_DT_MAGIC) || (table->version != SPRD_DT_VERSION)) { errorf("Cannot validate Device Tree Table \n"); } /* Calculate the offset of device tree within device tree table */ dt_entry_ptr = fdt_get_entry_ptr_by_table(table); if(NULL == dt_entry_ptr) { errorf("Getting device tree address failed\n"); } memcpy((void *)DT_ADR, dt_addr+dt_entry_ptr->dt_offset, dt_entry_ptr->dt_size); debugf("\nthe kernel is loading in the address:0x%x,size is 0x%lx\n", KERNEL_ADR, kernel_size); debugf("\nthe ramdisk is loading in the address:0x%x,size is 0x%lx\n", RAMDISK_ADR, ramdisk_size); debugf("\nthe dtb is loading in the address:0x%x,size is 0x%lx\n", DT_ADR, dt_entry_ptr->dt_size); } fdt_initrd_norsvmem(DT_ADR, RAMDISK_ADR, RAMDISK_ADR + boot_hdr->ramdisk_size, 1); free(boot_hdr); vlx_entry(DT_ADR); } #endif void normal_mode(void) { FTL_Savepoint_Private(PHASE_NORMAL_MODE); #ifndef CONFIG_ZEBU vibrator_hw_init(); set_vibrator(1); #endif vlx_boot(BOOT_PART, BACKLIGHT_ON, LCD_ON); return; } void download_mode(void) { FTL_Savepoint_Private(PHASE_DOWNLOAD_MODE); dprintf(ALWAYS, "download mode!\n"); stop_watchdog(); g_env_bootmode = "download"; write_log(); do_download(); } void calibration_mode(void) { FTL_Savepoint_Private(PHASE_CALIBRATION_MODE); dprintf(ALWAYS, "calibration_mode\n"); g_env_bootmode = "cali"; stop_watchdog(); #ifdef SPRD_CALIMODE_USE_BOOTIMG vlx_boot(BOOT_PART, BACKLIGHT_OFF, LCD_OFF); #else vlx_boot(RECOVERY_PART, BACKLIGHT_OFF, LCD_OFF); #endif return; } void autotest_mode(void) { dprintf(ALWAYS, "autotest_mode\n"); stop_watchdog(); g_env_bootmode = "autotest"; vlx_boot(BOOT_PART, BACKLIGHT_OFF, LCD_ON); return; } void recovery_mode(void) { FTL_Savepoint_Private(PHASE_RECOVERY_MODE); dprintf(ALWAYS, "recovery_mode\n"); stop_watchdog(); g_env_bootmode = "recovery"; #ifdef CONFIG_SC27XX_VDDVIB_VSD2 vibrator_hw_init(); set_vibrator(1); #endif vlx_boot(RECOVERY_PART, BACKLIGHT_ON, LCD_ON); return; } void special_mode(void) { dprintf(ALWAYS, "special_mode\n"); stop_watchdog(); g_env_bootmode = "special"; vlx_boot(BOOT_PART, BACKLIGHT_OFF, LCD_ON); return; } void iq_mode(void) { dprintf(ALWAYS, "iq_mode\n"); stop_watchdog(); g_env_bootmode = "iq"; vlx_boot(BOOT_PART, BACKLIGHT_OFF, LCD_ON); return; } void watchdog_mode(void) { dprintf(ALWAYS, "watchdog_mode\n"); g_env_bootmode = "wdgreboot"; vlx_boot(BOOT_PART, BACKLIGHT_OFF, LCD_ON); return; } void ap_watchdog_mode(void) { dprintf(ALWAYS, "ap_watchdog_mode\n"); g_env_bootmode = "apwdgreboot"; vlx_boot(BOOT_PART, BACKLIGHT_OFF, LCD_ON); return; } void unknow_reboot_mode(void) { dprintf(ALWAYS, "unknow_reboot_mode\n"); stop_watchdog(); g_env_bootmode = "unknowreboot"; vlx_boot(BOOT_PART, BACKLIGHT_OFF, LCD_ON); return; } void abnormal_reboot_mode(void) { dprintf(ALWAYS, "undefine_reboot_mode\n"); g_env_bootmode = "abnormalreboot"; vlx_boot(BOOT_PART, BACKLIGHT_OFF, LCD_ON); return; } void panic_reboot_mode(void) { dprintf(ALWAYS, "enter [%s]\n", __func__); g_env_bootmode = "panic"; vlx_boot(BOOT_PART, BACKLIGHT_OFF, LCD_ON); return; } void bootloader_panic_reboot_mode(void) { dprintf(ALWAYS, "enter [%s]\n", __func__); g_env_bootmode = "bootloader_panic"; vlx_boot(BOOT_PART, BACKLIGHT_OFF, LCD_ON); return; } void sml_panic_reboot_mode(void) { dprintf(ALWAYS, "enter [%s]\n", __func__); g_env_bootmode = "sml_panic"; vlx_boot(BOOT_PART, BACKLIGHT_OFF, LCD_ON); return; } void fastboot_mode(void) { FTL_Savepoint_Private(PHASE_FASTBOOT_MODE); dprintf(ALWAYS, "enter [%s]\n",__func__); stop_watchdog(); g_env_bootmode = "fastboot"; write_log(); #ifdef CONFIG_SPLASH_SCREEN logo_display(LOGO_NORMAL_POWER, BACKLIGHT_ON, LCD_ON); vibrator_hw_init(); set_vibrator(1); fastboot_lcd_printf(); mdelay(400); set_vibrator(0); #endif //MMU_DisableIDCM(); #if (defined CONFIG_X86) && (defined CONFIG_MOBILEVISOR) && (defined CONFIG_SPRD_SOC_SP9853I) tos_start_notify(); #endif #ifdef SPRD_SECBOOT if(!dump_backtrace_once){ //if dump enter fastboot, cannot get lockstatus if (get_lock_status() == VBOOT_STATUS_UNLOCK){ debugf("INFO: LOCK FLAG IS : UNLOCK!!!\n"); lcd_printf("\n INFO: LOCK FLAG IS : UNLOCK!!!\n"); } get_secboot_base_from_dt(); } #endif do_fastboot(); } #ifdef CONFIG_ERASE_SPL_AUTO_DOWNLOAD /** * If the SPL is erased, the romcode will enter the download process. * Notice: SPL must download. */ int erase_spl_enter_download_mode(void) { stop_watchdog(); if (0 != common_raw_erase("splloader", (uint64_t)0, (uint64_t)0)) { debugf("erase partition splloader fail!\n"); return -1; } else { if (0 != common_raw_erase("splloader_bak", (uint64_t)0, (uint64_t)0)) { debugf("erase partition splloader_bak fail!\n"); return -2; } else { debugf("erase partition splloader and splloader_bak ok\n"); reboot_devices(CMD_NORMAL_MODE); while(1); } } return 0; } #endif void autodloader_mode(void) { #ifdef CONFIG_FASTBOOT_SECURITY_DOWNLOAD /* disable to use 'adb reboot autodloader' */ if (fb_check_reboot_edl(NULL)) { dprintf(INFO,"adb reboot autodloader was disabled\n"); reboot_devices(CMD_NORMAL_MODE); while(1); return; } #endif g_env_bootmode = "autodloader"; debugf("Enter autodloader mode\n"); stop_watchdog(); #ifdef CONFIG_ERASE_SPL_AUTO_DOWNLOAD if (0 != erase_spl_enter_download_mode()) { debugf("erase partition splloader and splloader_bak fail!\n"); debugf("enter old autodloader_mode!\n"); } #endif #if (defined CONFIG_X86) && (defined CONFIG_MOBILEVISOR) && (defined CONFIG_SPRD_SOC_SP9853I) tos_start_notify(); #endif #ifdef SPRD_SECBOOT get_secboot_base_from_dt(); #endif /* remap iram */ //autodlader_remap(); /* main handler receive and jump */ autodloader_mainhandler(); /*reach here means error happened*/ return; } void charge_mode(void) { FTL_Savepoint_Private(PHASE_CHARGE_MODE); debugf("enter\n"); g_charger_mode = 1; g_env_bootmode = "charger"; #ifdef CONFIG_SC27XX_VDDVIB_VSD2 vibrator_hw_init(); set_vibrator(1); #endif vlx_boot(BOOT_PART, BACKLIGHT_ON, LCD_ON); } void engtest_mode(void) { debugf("enter\n"); stop_watchdog(); g_env_bootmode = "engtest"; vlx_boot(BOOT_PART, BACKLIGHT_OFF, LCD_ON); } void alarm_mode(void) { debugf("enter\n"); g_env_bootmode = "alarm"; vlx_boot(BOOT_PART, BACKLIGHT_OFF, LCD_ON); } void sprdisk_mode(void) { debugf("enter\n"); stop_watchdog(); g_env_bootmode = "sprdisk"; vlx_boot(BOOT_PART, BACKLIGHT_OFF, LCD_ON); } void apkmmi_mode(void) { debugf("apkmmi enter\n"); stop_watchdog(); g_env_bootmode = "apkmmi_mode"; #ifdef CONFIG_SC27XX_VDDVIB_VSD2 vibrator_hw_init(); set_vibrator(1); #endif vlx_boot(BOOT_PART, BACKLIGHT_ON, LCD_ON); } void upt_mode(void) { debugf("upt enter\n"); stop_watchdog(); g_env_bootmode = "upt_mode"; vibrator_hw_init(); set_vibrator(1); vlx_boot(BOOT_PART, BACKLIGHT_ON, LCD_ON); } void apkmmi_auto_mode(void) { debugf("enter\n"); stop_watchdog(); g_env_bootmode = "apkmmi_auto_mode"; vlx_boot(BOOT_PART, BACKLIGHT_ON, LCD_ON); } void silent_mode(void) { dprintf(INFO,"silent_mode enter\n"); /* panzhibin@MULTIMEDIA.DISPLAY.LCD, 2023/02/18, add for silence mode */ logo_display(LOGO_NORMAL_POWER, BACKLIGHT_OFF, LCD_DISPLAY_ENABLE); stop_watchdog(); g_env_bootmode = "silent"; vibrator_hw_init(); set_vibrator(0); vlx_boot(BOOT_PART, BACKLIGHT_OFF, LCD_ON); silent_flag = true; } 逐行解析,分段式总结代码架构图
08-12
MATLAB代码实现了一个基于多种智能优化算法优化RBF神经网络的回归预测模型,其核心是通过智能优化算法自动寻找最优的RBF扩展参数(spread),以提升预测精度。 1.主要功能 多算法优化RBF网络:使用多种智能优化算法优化RBF神经网络的核心参数spread。 回归预测:对输入特征进行回归预测,适用于连续值输出问题。 性能对比:对比不同优化算法在训练集和测试集上的预测性能,绘制适应度曲线、预测对比图、误差指标柱状图等。 2.算法步骤 数据准备:导入数据,随机打乱,划分训练集和测试集(默认7:3)。 数据归一化:使用mapminmax将输入和输出归一化到[0,1]区间。 标准RBF建模:使用固定spread=100建立基准RBF模型。 智能优化循环: 调用优化算法(从指定文件夹中读取算法文件)优化spread参数。 使用优化后的spread重新训练RBF网络。 评估预测结果,保存性能指标。 结果可视化: 绘制适应度曲线、训练集/测试集预测对比图。 绘制误差指标(MAE、RMSE、MAPE、MBE)柱状图。 十种智能优化算法分别是: GWO:灰狼算法 HBA:蜜獾算法 IAO:改进天鹰优化算法,改进①:Tent混沌映射种群初始化,改进②:自适应权重 MFO:飞蛾扑火算法 MPA:海洋捕食者算法 NGO:北方苍鹰算法 OOA:鱼鹰优化算法 RTH:红尾鹰算法 WOA:鲸鱼算法 ZOA:斑马算法
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值