This fixes a regression introduced in
e1636807 that removed setting this
value as it seemingly was not used by the kernel and would actively
break above 4G boots. But old kernels (4.18 in particular) will not boot
properly if it is not filled out by us.
The original issue was using the truncated value to then jump into the
kernel entry point, which we do not do anymore. So setting this value
again on newer kernels is fine.
kernel += (params->hdr.setup_sects + 1) * KERNEL_SECTOR_SIZE; /* 32bit entry address. */
+ /* Old kernels needs this set, while newer ones seem to ignore this. Note that this gets truncated on
+ * above 4G boots, which is fine as long as we do not use the value to jump to kernel entry. */
+ params->hdr.code32_start = kernel;
+
#ifdef __x86_64__
kernel += KERNEL_SECTOR_SIZE; /* 64bit entry address. */
#endif