On a 32-bit platform this would not be possible, even if address extension technology permits more than 4GB to be installed. This is because of the requirement that all RAM is mapped 1:1 physical:virtual address.
On a 64-bit platform this should work just fine, as long as no silly platform-specific firmware bugs prevent it.
Some early x64 UEFI "bioses" forgot to actually map RAM >4GB - causing access violation errors, but on anything that was actually ever properly verified in anything other than BIOS compatibility mode (CSM), this will work fine.