Show memory information on fastboot screen
Root cause:N/A
How to fix:N/A
Feature:Add ddr Manufacturer ID to smem SMEM_ID_VENDOR2 in sbl1 for show memory manufacturer info on fastboot screen
RiskArea: Memory
Change-Id: Iabc97c0d40f6f4bd7f104e9346b0e5e329705912
diff --git a/platform/msm_shared/display_menu.c b/platform/msm_shared/display_menu.c
index 17a5a41..e663bdd 100755
--- a/platform/msm_shared/display_menu.c
+++ b/platform/msm_shared/display_menu.c
@@ -42,7 +42,9 @@
#include <sys/types.h>
#include <../../../app/aboot/devinfo.h>
#include <../../../app/aboot/recovery.h>
-
+/*[TracyChui]Show memory information on fastboot screen 20200612 start */
+#include <mmu.h>
+/*[TracyChui]Show memory information on fastboot screen 20200612 end */
#define TITLE_MSG "<!>\n\n"
//[Arima][8901][JialongJhan] Command mode update screen 20190516 Start
@@ -513,6 +515,45 @@
snprintf(msg, sizeof(msg), "SERIAL NUMBER - %s\n", msg_buf);
display_fbcon_menu_message(msg, FBCON_COMMON_MSG, common_factor, 0);
+ /*[TracyChui]Show memory information on fastboot screen 20200612 start */
+ dprintf(CRITICAL,"smem_get_ddr_size=%llu\n", smem_get_ddr_size());
+ if (smem_get_ddr_size() == MEM_3GB) {
+ snprintf(msg, sizeof(msg), "INTERNAL STORAGE SIZE - 32G\n");
+ } else if (smem_get_ddr_size() > MEM_3GB) {
+ if (smem_get_ddr_size() < MEM_4GB)
+ {
+ snprintf(msg, sizeof(msg), "INTERNAL STORAGE SIZE - 64G\n");
+ }
+ else
+ {
+ snprintf(msg, sizeof(msg), "INTERNAL STORAGE SIZE - \n");
+ }
+ } else {
+ snprintf(msg, sizeof(msg), "INTERNAL STORAGE SIZE - UNKNOWN\n");
+ }
+ display_fbcon_menu_message(msg, FBCON_COMMON_MSG, common_factor, 0);
+
+ memset(msg_buf, 0, sizeof(msg_buf));
+ smem_get_ddr_manufacturer_id((unsigned char *) msg_buf);
+ dprintf(CRITICAL,"smem_get_ddr_size=%llu\n", smem_get_ddr_size());
+ if (smem_get_ddr_size() == MEM_3GB) {
+ snprintf(msg, sizeof(msg), "MAIN MEMORY SIZE AND VENDOR - 3G\n");
+ } else if (smem_get_ddr_size() > MEM_3GB) {
+ if (smem_get_ddr_size() < MEM_4GB)
+ {
+ snprintf(msg, sizeof(msg), "MAIN MEMORY SIZE AND VENDOR - 4G %s\n", msg_buf);
+ }
+ else
+ {
+ snprintf(msg, sizeof(msg), "MAIN MEMORY SIZE AND VENDOR - %s\n", msg_buf);
+ }
+ } else {
+ snprintf(msg, sizeof(msg), "MAIN MEMORY SIZE AND VENDOR - %s\n", msg_buf);
+ }
+ display_fbcon_menu_message(msg, FBCON_COMMON_MSG, common_factor, 0);
+
+ /*[TracyChui]Show memory information on fastboot screen 20200612 end */
+
snprintf(msg, sizeof(msg), "SECURE BOOT - %s\n",
is_secure_boot_enable()? "enabled":"disabled");
display_fbcon_menu_message(msg, FBCON_COMMON_MSG, common_factor, 0);