Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109426070
D40406.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
D40406.diff
View Options
diff --git a/sys/cddl/dev/kinst/amd64/kinst_isa.h b/sys/cddl/dev/kinst/amd64/kinst_isa.h
--- a/sys/cddl/dev/kinst/amd64/kinst_isa.h
+++ b/sys/cddl/dev/kinst/amd64/kinst_isa.h
@@ -17,10 +17,8 @@
* have 2 instructions stored in the trampoline, and each of them can take up
* to 16 bytes, 32 bytes is enough to cover even the worst case scenario.
*/
-#define KINST_TRAMP_SIZE 32
-#define KINST_TRAMPCHUNK_SIZE PAGE_SIZE
-#define KINST_TRAMP_FILL_PATTERN ((uint8_t []){KINST_PATCHVAL})
-#define KINST_TRAMP_FILL_SIZE sizeof(uint8_t)
+#define KINST_TRAMP_SIZE 32
+#define KINST_TRAMPCHUNK_SIZE PAGE_SIZE
typedef uint8_t kinst_patchval_t;
diff --git a/sys/cddl/dev/kinst/trampoline.c b/sys/cddl/dev/kinst/trampoline.c
--- a/sys/cddl/dev/kinst/trampoline.c
+++ b/sys/cddl/dev/kinst/trampoline.c
@@ -28,7 +28,10 @@
#include "kinst.h"
#include "kinst_isa.h"
-#define KINST_TRAMPS_PER_CHUNK (KINST_TRAMPCHUNK_SIZE / KINST_TRAMP_SIZE)
+#define KINST_TRAMP_FILL_PATTERN ((kinst_patchval_t []){KINST_PATCHVAL})
+#define KINST_TRAMP_FILL_SIZE sizeof(kinst_patchval_t)
+
+#define KINST_TRAMPS_PER_CHUNK (KINST_TRAMPCHUNK_SIZE / KINST_TRAMP_SIZE)
struct trampchunk {
TAILQ_ENTRY(trampchunk) next;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Feb 5, 10:04 PM (20 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16481706
Default Alt Text
D40406.diff (1 KB)
Attached To
Mode
D40406: kinst: simplify trampoline fill definitions
Attached
Detach File
Event Timeline
Log In to Comment