[SETUPLIB] Store a machine architecture type

It will be used to determine how the bootloader has to be installed, etc.

Currently hardcoded for XBOX, or rnutime-determined for NEC PC-98 and BIOS-based PC-AT.
More thorough runtime determination will be added in the future.
This commit is contained in:
Hermès Bélusca-Maïto 2024-07-20 22:15:47 +02:00
parent 9b9065df52
commit 8056081c2f
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 22 additions and 0 deletions

View file

@ -1028,6 +1028,17 @@ InitializeSetup(
DPRINT1("SourceRootPath (2): '%wZ'\n", &pSetupData->SourceRootPath);
DPRINT1("SourceRootDir (2): '%wZ'\n", &pSetupData->SourceRootDir);
/* Retrieve the target machine architecture type */
// FIXME: This should be determined at runtime!!
// FIXME: Allow for (pre-)installing on an architecture
// different from the current one?
#if defined(SARCH_XBOX)
pSetupData->ArchType = ARCH_Xbox;
// #elif defined(SARCH_PC98)
#else // TODO: Arc, UEFI
pSetupData->ArchType = (IsNEC_98 ? ARCH_NEC98x86 : ARCH_PcAT);
#endif
return ERROR_SUCCESS;
}