Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102672721
D36988.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
D36988.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
@@ -8,6 +8,13 @@
#include <contrib/dev/acpica/include/acpi.h>
+#define ACPI_GAS_ACCESS_WIDTH_LEGACY 0
+#define ACPI_GAS_ACCESS_WIDTH_UNDEFINED 0
+#define ACPI_GAS_ACCESS_WIDTH_BYTE 1
+#define ACPI_GAS_ACCESS_WIDTH_WORD 2
+#define ACPI_GAS_ACCESS_WIDTH_DWORD 3
+#define ACPI_GAS_ACCESS_WIDTH_QWORD 4
+
#define BHYVE_ACPI_BASE 0xf2400
#define BASL_TABLE_ALIGNMENT 0x10
@@ -32,6 +39,9 @@
int basl_init(void);
int basl_table_append_bytes(struct basl_table *table, const void *bytes,
uint32_t len);
+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);
int basl_table_append_int(struct basl_table *table, uint64_t val, uint8_t size);
int basl_table_create(struct basl_table **table, struct vmctx *ctx,
const uint8_t *name, uint32_t alignment, uint32_t off);
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
@@ -156,6 +156,22 @@
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,
+ const uint8_t access_width, const uint64_t address)
+{
+ ACPI_GENERIC_ADDRESS gas_le = {
+ .SpaceId = space_id,
+ .BitWidth = bit_width,
+ .BitOffset = bit_offset,
+ .AccessWidth = access_width,
+ .Address = htole64(address),
+ };
+
+ return (basl_table_append_bytes(table, &gas_le, sizeof(gas_le)));
+}
+
int
basl_table_append_int(struct basl_table *const table, const uint64_t val,
const uint8_t size)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 4:21 PM (21 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14661310
Default Alt Text
D36988.diff (1 KB)
Attached To
Mode
D36988: [PATCH 5/19] bhyve: add basl support for generic addresses
Attached
Detach File
Event Timeline
Log In to Comment