Add the function of check side and mode.

N/A

Signed-off-by: liminghao <liminghao@xiaomi.com>