Rebooting with JMP Instruction (2003)
susam.net
susam.net
That address is so deeply entrenched in history that one could even consider BIOSes which don't have the reset code starting there to be not PC-compatible. If you look at the PC/AT BIOS listing, it specifically puts the reset entry point there with an ORG directive. The BIOS reference books from Phoenix also mention that.
I believe even EFI BIOS in CSM mode will have the correct code at those fixed addresses, although it won't be obvious from just looking at the ROM image since it's packed and expanded into shadow RAM upon boot.
Here's some discussion:
https://forum.vcfed.org/index.php?threads/fixed-addresses-in...
This isn’t necessarily guaranteed, because some setup routines generally expect the computer to be in a certain state when run and may not like being run again. Typically most things will be reset to a sane state and will mostly work, but it’s not a given.
It's one of those not technically documented things, but a downstream effect of documented pieces.
But while it's not a great idea, would it still work on modern x86 that doesn't even have BIOS? Great question, but I suspect not. The CPU is still going to start reading instructions from the same address, but these days CPU state at the point of reading the first instruction is rather more complicated than it used to be. For instance, if you have an Intel system that has Boot Guard enabled, before the CPU starts reading anything from the reset vector it's already pulled an Authenticated Code Module out of flash and run that, and that's going to have set up Cache As RAM and enabled various other things, and it's much easier for modern firmware to make assumptions about that state than it would be if the OS just handed control back there. You're also going to be dealing with graphics hardware that's way more complicated than it used to be, and the question of whether the firmware driver for your graphics card is going to be able to reinitialise it from whatever state your OS left it in.
But more importantly - modern hardware has a whole bunch of "write once" bits, and if you simply jump back to init code without asserting reset, those aren't going to be cleared. Firmware code is going to expect to be able to access resources that it's no longer allowed to access, because those protection bits have been set and never cleared. A big part of that is System Management Mode, a bunch of protected code that runs on the main CPU but which can't be accessed by the OS. Jumping to firmware init isn't going to unlock access to the SMM region, and anything that's mediated by SMM is probably going to be inaccessible, so the firmware's going to have an extremely bad time.
I don't want to be too critical of the original post, which would probably work most of the time in 2003 (although even then a bunch of systems would probably break if you tried). But these days you really shouldn't have any expectation that this will work, simply because systems today are really pretty different to 20 years ago.
You can’t just run your system firmware kexec-style and expect it to work.
https://wiki.osdev.org/%228042%22_PS/2_Controller#PS.2F2_Con...
The JMP FFFF:0000 trick worked everywhere
Devices will be left in whatever state they were a moment before, so yeah.