In both cases, it flags all events belonging to that CCD and:
As a second step, ebadpixupdate updates the bad pixels extensions (BADPIXnn) appended to the merged events lists, or adds a bad pixel extension if it is missing. This ensures that the bad pixel information will be propagated to the exposure map (by eexpmap) and the effective area (by arfgen). The BADFLAG column is set to 1 for uplinked bad pixels, to 2 for a CCF origin, to 3 for a file origin. For the case where the same bad pixel is present with both origins (e.g. a bad pixel with BADFLAG=3 originally and now present in the CCF) the smaller number is written (BADFLAG=2, CCF origin).
XMM-Newton SOC/SSC -- 2014-11-04