Flash/obtain ROM code for Sitara on BeagleBone Black
The AM335x ROM is fixed by TI, there is no real reason to need the code. It loads a small executable depending on the bootstrap pins from one of many possible locations including MMC, NAND, UART (via XMODEM), a server via Ethernet using the BOOTP protocol and others.

What is used as the program the ROM loads depends on your configuration.

In case of Linux a typical boot process looks like this:


ROM loads U-Boot SPL
U-Boot SPL initializes clocks (including MPU), RAM and some other stuff (like UART for console)
SPL loads U-Boot proper
U-Boot proper loads your OS or does whatever


U-Boot SPL is the stripped down version of U-Boot, which is used because U-Boot is too big (300k+) to be loaded into Sitara's RAM (or cache, however you call it, it's 128k).

In the particular case of BeagleBone both SPL and U-Boot are found in the eMMC (or SD card), either in the small FAT partition or in the first 2kB at fixed adress if there is no FAT partition.

SPL is actually a part of U-Boot and is built together with it, so if you want to experiment just build U-Boot usign the configuration for BeagleBone and play around with it.

Answering your other questions, the only thing done by ROM is to load the bootloader - all initialization of hardware, including the AM335x itself is done by the bootloader in either stage.

Keep in mind that not all bootloaders are two-stage, it's just that U-Boot is too big. On some other MPUs, like i.MX6 which has more built-in RAM there is no need to use two stages even with U-Boot.