Xp bsod on startup after ram upgrade
STOP 0x0000007B normally means "INACCESSIBLE_BOOT_DEVICE", which means that the crash on XP happens very early in the boot process.
This stop-code actually means : Something prevented protected-mode (meaning XP boot) from connecting to the device that the real-mode (meaning BIOS) passed on to protected-mode. Said device is most probably the hard disk.
One guess to the problem could be that it has to do with the BIOS seeing your additional RAM but somehow later miscommunicating with the XP boot process.
In that case, I suggest as a first step to update your BIOS from the page HP Pavilion dv6040us Notebook PC Drivers, then try again to boot. Ensure that your computer model is exactly the same as described on that page and that your BIOS is not already of that version (so as not to take this risk for nothing). Stop on the least doubt or error message, since a botched BIOS update can brick your computer.
If this doesn't help, start XP with 1 GB and fully patch it using Windows Update, including optional updates. Check in the above HP download page if any drivers are more recent than the ones Windows suggested, with special attention to the chipset and storage drivers.
If this doesn't help, setup the computer with 4 GB and try to do a Repair Installation for XP. This requires an XP boot CD, but read well on all the requirements in this article.
All backups need to be done before starting, as this kind of operations could result in a total reinstallation of all operating systems.