The boot SD card is created by installing raspbian 2018-11-13 on raspberry pi 2 (v1.1), then I replaced kernel7.img with my own simple os from (https://github.com/jsandler18/raspi-kernel).
The modify the simple OS a little bit, the OS can blink LED, UART, and request frame buffer and print strings on the screen. But when I try to access ATAG at 0x100, I got "0x55555555", I tried to print the contents between 0x100 and 0x128, all of them are "0x55555555".
Then I thought maybe ATAG may not be at 0x100, then I use r2 that passed to kernel_main, the r2 is actually pointed to 0x2eff9d00, looks like some random place. by the way, I saved r0,r1,r2 in the boot.S (code are below)
I also tried to set disable_commandline_tags=0, nothing helps. Then tried to set disable_commandline_tags=1, then the kernel won't even start.
I wonder if it is because newer Raspian doesn't setup ATAG anymore or I am missing something?