Page MenuHomeFreeBSD

D36985.diff
No OneTemporary

D36985.diff

diff --git a/usr.sbin/bhyve/basl.c b/usr.sbin/bhyve/basl.c
--- a/usr.sbin/bhyve/basl.c
+++ b/usr.sbin/bhyve/basl.c
@@ -14,6 +14,7 @@
#include <assert.h>
#include <err.h>
+#include <libutil.h>
#include <stddef.h>
#include <stdio.h>
#include <vmmapi.h>
@@ -32,6 +33,41 @@
static STAILQ_HEAD(basl_table_list, basl_table) basl_tables = STAILQ_HEAD_INITIALIZER(
basl_tables);
+static int
+basl_dump_table(const struct basl_table *const table, const bool mem)
+{
+ const ACPI_TABLE_HEADER *const header = table->data;
+ const uint8_t *data;
+
+ if (!mem) {
+ data = table->data;
+ } else {
+ data = vm_map_gpa(table->ctx, BHYVE_ACPI_BASE + table->off,
+ table->len);
+ if (data == NULL) {
+ return (ENOMEM);
+ }
+ }
+
+ printf("%.4s @ %8x (%s)\n", header->Signature,
+ BHYVE_ACPI_BASE + table->off, mem ? "Memory" : "FwCfg");
+ hexdump(data, table->len, NULL, 0);
+
+ return (0);
+}
+
+static int
+basl_dump(const bool mem)
+{
+ struct basl_table *table;
+
+ STAILQ_FOREACH(table, &basl_tables, chain) {
+ BASL_EXEC(basl_dump_table(table, mem));
+ }
+
+ return (0);
+}
+
static int
basl_finish_install_guest_tables(struct basl_table *const table)
{

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 4:58 PM (21 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14661699
Default Alt Text
D36985.diff (1 KB)

Event Timeline