-/* $OpenBSD: conf.c,v 1.56 2023/04/25 10:06:12 kn Exp $ */
+/* $OpenBSD: conf.c,v 1.57 2023/07/22 10:11:19 jsg Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
#include <biosdev.h>
#include <dev/cons.h>
-const char version[] = "3.56";
+const char version[] = "3.65";
int debug = 1;
-/* $OpenBSD: conf.c,v 1.50 2023/04/25 10:06:12 kn Exp $ */
+/* $OpenBSD: conf.c,v 1.51 2023/07/22 10:11:19 jsg Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove
#include <biosdev.h>
#include <dev/cons.h>
-const char version[] = "3.56";
+const char version[] = "3.65";
int debug = 1;
-/* $OpenBSD: conf.c,v 1.41 2023/04/25 10:11:20 kn Exp $ */
+/* $OpenBSD: conf.c,v 1.42 2023/07/22 10:11:19 jsg Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
#include "efidev.h"
#include "efipxe.h"
-const char version[] = "3.64";
+const char version[] = "3.65";
#ifdef EFI_DEBUG
int debug = 0;
-/* $OpenBSD: exec_i386.c,v 1.10 2023/02/23 19:48:21 miod Exp $ */
+/* $OpenBSD: exec_i386.c,v 1.11 2023/07/22 10:11:19 jsg Exp $ */
/*
* Copyright (c) 1997-1998 Michael Shalayeff
CPUID(0, dummy, vendor[0], vendor[2], vendor[1]);
vendor[3] = 0; /* NULL-terminate */
- if (strcmp((char *)vendor, "GenuineIntel") != 0)
+ if (strcmp((char *)vendor, "GenuineIntel") != 0 &&
+ strcmp((char *)vendor, "AuthenticAMD") != 0)
return;
CPUID(1, signature, dummy, dummy, dummy);
}
stepping = (signature >> 0) & 0x0f;
- snprintf(path, sizeof(path), "%s:/etc/firmware/intel/%02x-%02x-%02x",
- cmd.bootdev, family, model, stepping);
+ if (strcmp((char *)vendor, "GenuineIntel") == 0) {
+ snprintf(path, sizeof(path),
+ "%s:/etc/firmware/intel/%02x-%02x-%02x",
+ cmd.bootdev, family, model, stepping);
+ } else if (strcmp((char *)vendor, "AuthenticAMD") == 0) {
+ if (family < 0x10)
+ return;
+ else if (family <= 0x14)
+ snprintf(path, sizeof(path),
+ "%s:/etc/firmware/amd/microcode_amd.bin",
+ cmd.bootdev);
+ else
+ snprintf(path, sizeof(path),
+ "%s:/etc/firmware/amd/microcode_amd_fam%02xh.bin",
+ cmd.bootdev, family);
+ }
fd = open(path, O_RDONLY);
if (fd == -1)
-/* $OpenBSD: exec_i386.c,v 1.37 2022/07/11 19:45:02 kettenis Exp $ */
+/* $OpenBSD: exec_i386.c,v 1.38 2023/07/22 10:11:19 jsg Exp $ */
/*
* Copyright (c) 1997-1998 Michael Shalayeff
CPUID(0, dummy, vendor[0], vendor[2], vendor[1]);
vendor[3] = 0; /* NULL-terminate */
- if (strcmp((char *)vendor, "GenuineIntel") != 0)
+ if (strcmp((char *)vendor, "GenuineIntel") != 0 &&
+ strcmp((char *)vendor, "AuthenticAMD") != 0)
return;
CPUID(1, signature, dummy, dummy, dummy);
}
stepping = (signature >> 0) & 0x0f;
- snprintf(path, sizeof(path), "%s:/etc/firmware/intel/%02x-%02x-%02x",
- cmd.bootdev, family, model, stepping);
+ if (strcmp((char *)vendor, "GenuineIntel") == 0) {
+ snprintf(path, sizeof(path),
+ "%s:/etc/firmware/intel/%02x-%02x-%02x",
+ cmd.bootdev, family, model, stepping);
+ } else if (strcmp((char *)vendor, "AuthenticAMD") == 0) {
+ if (family < 0x10)
+ return;
+ else if (family <= 0x14)
+ snprintf(path, sizeof(path),
+ "%s:/etc/firmware/amd/microcode_amd.bin",
+ cmd.bootdev);
+ else
+ snprintf(path, sizeof(path),
+ "%s:/etc/firmware/amd/microcode_amd_fam%02xh.bin",
+ cmd.bootdev, family);
+ }
fd = open(path, O_RDONLY);
if (fd == -1)
-/* $OpenBSD: conf.c,v 1.55 2023/04/25 10:06:12 kn Exp $ */
+/* $OpenBSD: conf.c,v 1.56 2023/07/22 10:11:20 jsg Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove
#include "pxeboot.h"
#include "pxe_net.h"
-const char version[] = "3.56";
+const char version[] = "3.65";
int debug = 0;
void (*sa_cleanup)(void) = pxe_shutdown;
-/* $OpenBSD: conf.c,v 1.77 2023/04/25 14:48:16 kn Exp $ */
+/* $OpenBSD: conf.c,v 1.78 2023/07/22 10:11:20 jsg Exp $ */
/*
* Copyright (c) 1996 Michael Shalayeff
#include <dev/cons.h>
#include "debug.h"
-const char version[] = "3.45";
+const char version[] = "3.65";
int debug = 1;
-/* $OpenBSD: conf.c,v 1.44 2023/04/25 14:48:17 kn Exp $ */
+/* $OpenBSD: conf.c,v 1.45 2023/07/22 10:11:20 jsg Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove
#include <dev/cons.h>
#include "debug.h"
-const char version[] = "3.45";
+const char version[] = "3.65";
int debug = 1;
void (*sa_cleanup)(void) = NULL;
-/* $OpenBSD: exec_i386.c,v 1.52 2022/07/07 00:56:47 daniel Exp $ */
+/* $OpenBSD: exec_i386.c,v 1.53 2023/07/22 10:11:20 jsg Exp $ */
/*
* Copyright (c) 1997-1998 Michael Shalayeff
CPUID(0, dummy, vendor[0], vendor[2], vendor[1]);
vendor[3] = 0; /* NULL-terminate */
- if (strcmp((char *)vendor, "GenuineIntel") != 0)
+ if (strcmp((char *)vendor, "GenuineIntel") != 0 &&
+ strcmp((char *)vendor, "AuthenticAMD") != 0)
return;
CPUID(1, signature, dummy, dummy, dummy);
}
stepping = (signature >> 0) & 0x0f;
- snprintf(path, sizeof(path), "%s:/etc/firmware/intel/%02x-%02x-%02x",
- cmd.bootdev, family, model, stepping);
+ if (strcmp((char *)vendor, "GenuineIntel") == 0) {
+ snprintf(path, sizeof(path),
+ "%s:/etc/firmware/intel/%02x-%02x-%02x",
+ cmd.bootdev, family, model, stepping);
+ } else if (strcmp((char *)vendor, "AuthenticAMD") == 0) {
+ if (family < 0x10)
+ return;
+ else if (family <= 0x14)
+ snprintf(path, sizeof(path),
+ "%s:/etc/firmware/amd/microcode_amd.bin",
+ cmd.bootdev);
+ else
+ snprintf(path, sizeof(path),
+ "%s:/etc/firmware/amd/microcode_amd_fam%02xh.bin",
+ cmd.bootdev, family);
+ }
fd = open(path, O_RDONLY);
if (fd == -1)
-/* $OpenBSD: conf.c,v 1.49 2023/04/25 14:48:17 kn Exp $ */
+/* $OpenBSD: conf.c,v 1.50 2023/07/22 10:11:20 jsg Exp $ */
/*
* Copyright (c) 2004 Tom Cosgrove
#include "pxeboot.h"
#include "pxe_net.h"
-const char version[] = "3.45";
+const char version[] = "3.65";
int debug = 1;
void (*sa_cleanup)(void) = pxe_shutdown;