amd64: correctly calculate KVA of the preloaded ucode blob

when kernphys != 2M

Reported and tested by:	kbowling
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
This commit is contained in:
Konstantin Belousov 2021-08-30 23:25:31 +03:00
parent bbf7027055
commit 9939af1a16

View File

@ -1642,7 +1642,7 @@ hammer_time(u_int64_t modulep, u_int64_t physfree)
atomic_store_short((u_short *)0x472, 0x1234);
}
physfree += ucode_load_bsp(physfree + KERNBASE);
physfree += ucode_load_bsp(physfree - kernphys + KERNSTART);
physfree = roundup2(physfree, PAGE_SIZE);
identify_cpu1();