Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150440840
D40451.id.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
D40451.id.diff
View Options
diff --git a/usr.sbin/bhyve/basl.h b/usr.sbin/bhyve/basl.h
--- a/usr.sbin/bhyve/basl.h
+++ b/usr.sbin/bhyve/basl.h
@@ -82,6 +82,9 @@
/* Add an ACPI_TABLE_* to basl without its header. */
int basl_table_append_content(struct basl_table *table, void *data,
uint32_t len);
+int basl_table_append_fwcfg(struct basl_table *table,
+ const uint8_t *fwcfg_name, uint32_t alignment,
+ uint8_t size);
int basl_table_append_gas(struct basl_table *table, uint8_t space_id,
uint8_t bit_width, uint8_t bit_offset, uint8_t access_width,
uint64_t address);
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
@@ -490,6 +490,23 @@
len - sizeof(ACPI_TABLE_HEADER)));
}
+int
+basl_table_append_fwcfg(struct basl_table *const table,
+ const uint8_t *fwcfg_name, const uint32_t alignment, const uint8_t size)
+{
+ assert(table != NULL);
+ assert(fwcfg_name != NULL);
+ assert(size <= sizeof(uint64_t));
+
+ BASL_EXEC(qemu_loader_alloc(basl_loader, fwcfg_name, alignment,
+ QEMU_LOADER_ALLOC_HIGH));
+ BASL_EXEC(qemu_loader_add_pointer(basl_loader, table->fwcfg_name,
+ fwcfg_name, table->len, size));
+ BASL_EXEC(basl_table_append_int(table, 0, size));
+
+ return (0);
+}
+
int
basl_table_append_gas(struct basl_table *const table, const uint8_t space_id,
const uint8_t bit_width, const uint8_t bit_offset,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 2, 5:59 AM (6 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30709908
Default Alt Text
D40451.id.diff (1 KB)
Attached To
Mode
D40451: bhyve/basl: allow adding fwcfg items to acpi tables
Attached
Detach File
Event Timeline
Log In to Comment