diff options
| author | Carmen <carmen@dotcarmen.dev> | 2025-07-12 10:18:53 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-12 17:18:53 +0000 |
| commit | 5b4e982169ab660a427da8b2c28c5eb7930362e2 (patch) | |
| tree | 4da8edd2834ee6eb67517121cb87e6726afa5bfd /lib/std/debug.zig | |
| parent | bd97b66186dabb3533df1ea9eb650d7574496a59 (diff) | |
| download | zig-5b4e982169ab660a427da8b2c28c5eb7930362e2.tar.gz zig-5b4e982169ab660a427da8b2c28c5eb7930362e2.zip | |
std.os.uefi.tables: ziggify boot and runtime services (#23441)
* std.os.uefi.tables: ziggify boot and runtime services
* avoid T{} syntax
Co-authored-by: linusg <mail@linusgroh.de>
* misc fixes
* work
* self-review quickfixes
* dont make MemoryMapSlice generic
* more review fixes, work
* more work
* more work
* review fixes
* update boot/runtime services references throughout codebase
* self-review fixes
* couple of fixes i forgot to commit earlier
* fixes from integrating in my own project
* fixes from refAllDeclsRecursive
* Apply suggestions from code review
Co-authored-by: truemedian <truemedian@gmail.com>
* more fixes from review
* fixes from project integration
* make natural alignment of Guid align-8
* EventRegistration is a new opaque type
* fix getNextHighMonotonicCount
* fix locateProtocol
* fix exit
* partly revert 7372d65
* oops exit data_len is num of bytes
* fixes from project integration
* MapInfo consistency, MemoryType update per review
* turn EventRegistration back into a pointer
* forgot to finish updating MemoryType methods
* fix IntFittingRange calls
* set uefi.Page nat alignment
* Back out "set uefi.Page nat alignment"
This backs out commit cdd9bd6f7f5fb763f994b8fbe3e1a1c2996a2393.
* get rid of some error.NotFound-s
* fix .exit call in panic
* review comments, add format method
* fix resetSystem data alignment
* oops, didnt do a final refAllDeclsRecursive i guess
* review comments
* writergate update MemoryType.format
* fix rename
---------
Co-authored-by: linusg <mail@linusgroh.de>
Co-authored-by: truemedian <truemedian@gmail.com>
Diffstat (limited to 'lib/std/debug.zig')
| -rw-r--r-- | lib/std/debug.zig | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig index dae233efda..0950441f73 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -654,9 +654,8 @@ pub fn defaultPanic( if (uefi.system_table.boot_services) |bs| { // ExitData buffer must be allocated using boot_services.allocatePool (spec: page 220) - const exit_data: []u16 = uefi.raw_pool_allocator.alloc(u16, exit_msg.len + 1) catch @trap(); - @memcpy(exit_data, exit_msg[0..exit_data.len]); // Includes null terminator. - _ = bs.exit(uefi.handle, .aborted, exit_data.len, exit_data.ptr); + const exit_data = uefi.raw_pool_allocator.dupeZ(u16, exit_msg) catch @trap(); + bs.exit(uefi.handle, .aborted, exit_data) catch {}; } @trap(); }, |
