#define ERRFILE_cpuid_cmd ( ERRFILE_ARCH | ERRFILE_OTHER | 0x00000000 )
#define ERRFILE_cpuid_settings ( ERRFILE_ARCH | ERRFILE_OTHER | 0x00010000 )
-#define ERRFILE_efi_entropy ( ERRFILE_ARCH | ERRFILE_OTHER | 0x00020000 )
/** @} */
#define ERRFILE_efi_usb ( ERRFILE_OTHER | 0x004b0000 )
#define ERRFILE_efi_fbcon ( ERRFILE_OTHER | 0x004c0000 )
#define ERRFILE_efi_local ( ERRFILE_OTHER | 0x004d0000 )
+#define ERRFILE_efi_entropy ( ERRFILE_OTHER | 0x004e0000 )
/** @} */
#include <errno.h>
#include <ipxe/entropy.h>
#include <ipxe/crc32.h>
+#include <ipxe/profile.h>
#include <ipxe/efi/efi.h>
#include <ipxe/efi/Protocol/Rng.h>
/**
* Wait for a timer tick
*
- * @ret low TSC low-order bits, or negative error
+ * @ret low CPU profiling low-order bits, or negative error
*/
static int efi_entropy_tick ( void ) {
EFI_BOOT_SERVICES *bs = efi_systab->BootServices;
UINTN index;
uint16_t low;
- uint32_t discard_d;
EFI_STATUS efirc;
int rc;
return rc;
}
- /* Get current TSC low-order bits */
- __asm__ __volatile__ ( "rdtsc" : "=a" ( low ), "=d" ( discard_d ) );
+ /* Get current CPU profiling timestamp low-order bits */
+ low = profile_timestamp();
return low;
}