Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102674426
D36985.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D36985.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D36985: [PATCH 2/19] bhyve: add table dump functions for basl
Attached
Detach File
Event Timeline
Log In to Comment