How is raw NAND flash bad block handled on iMX7D?

On our device platform. We are using raw NAND flash as the sole storage/boot device medium.

I am aware that kobs-ng is used by mfg-tool to scan NAND flash and create a DBBT on the NAND flash.

I am finding the NAND flash driver is a little complex to follow, so I am hoping someone who is more knowledgeable with the NAND controller to help answer a few questions I have.

Does U-boot refer to DBBT during system boot? is the NAND driver on U-Boot 'aware' of BAD blocks when executing command such as "nand write"?

What happens when the driver detects a bad NAND flash block during read/write operation? skip to the next block?

What does the NAND flash driver do when error is returned by NAND flash? What happens if NAND GPMI detects an uncorrectable ECC error? does the controller mark the block in question as "Bad"? or does nothing at all?

You can access NAND with /dev/mmcblkX where "X" is a digit associated to exact NAND chip.And also you can access NAND via NAND GPMI Flash Driver. It has the callbacks for raw access.Please refer to chapter 33.2.1 of i.MX Linux Reference Manual.