Look to "Embedded System Building blocks" book code (not sure that name is 100 % correct ).
It was uploaded here and contains at least COM port driver .
if you are developing your application using 80386ex, you may find detailed peripheral configuration code which u can customize as well in the user manual after every peripheral description chapter. e-g- synch and Asynch. serial port drivers r there.