search for: uintn

Displaying 20 results from an estimated 55 matches for "uintn".

Did you mean: uint
2015 Aug 26
5
[PATCH] Call ExitBootServices twice
From: Sylvain Gault <sylvain.gault at gmail.com> On some architecture, including my hardware, the function ExitBootServices may need to be called twice in order to successfully exit the boot services. As stated by the UEFI spec, the first call to ExitBootServices may perform a partial shutdown of the services. It seems that during this partial shutdown, the memory map can be modified, thus
2015 Nov 02
3
[PATCH] efi: Call ExitBootServices at least twice
...r, > return 0; > } > > +/* > + * Like get_memory_map but try to use the given buffer first, reallocate it if > + * it's too small and always set the allocated size. > + */ > +static EFI_MEMORY_DESCRIPTOR * > +get_memory_map_realloc(EFI_MEMORY_DESCRIPTOR *map, UINTN *allocsize, > + UINTN *nr_entries, UINTN *key, UINTN *desc_sz, > + UINT32 *desc_ver) > +{ > + EFI_STATUS status; > + UINTN size, allocsizeadd; > + > + allocsizeadd = sizeof(*map) * 2; > + > + do { > +...
2015 Sep 16
1
[PATCH] efi: Call ExitBootServices at least twice
...er *hdr, return 0; > } > > +/* > + * Like get_memory_map but try to use the given buffer first, > reallocate it if > + * it's too small and always set the allocated size. > + */ > +static EFI_MEMORY_DESCRIPTOR * > +get_memory_map_realloc(EFI_MEMORY_DESCRIPTOR *map, UINTN *allocsize, > + UINTN *nr_entries, UINTN *key, UINTN *desc_sz, > + UINT32 *desc_ver) > +{ > + EFI_STATUS status; > + UINTN size, allocsizeadd; > + > + allocsizeadd = sizeof(*map) * 2; > + > + do { > + size = *allocsize; > + status = uefi_call_wrapp...
2015 Aug 26
0
[PATCH] efi: Call ExitBootServices at least twice
...tatic int handle_ramdisks(struct linux_header *hdr, return 0; } +/* + * Like get_memory_map but try to use the given buffer first, reallocate it if + * it's too small and always set the allocated size. + */ +static EFI_MEMORY_DESCRIPTOR * +get_memory_map_realloc(EFI_MEMORY_DESCRIPTOR *map, UINTN *allocsize, + UINTN *nr_entries, UINTN *key, UINTN *desc_sz, + UINT32 *desc_ver) +{ + EFI_STATUS status; + UINTN size, allocsizeadd; + + allocsizeadd = sizeof(*map) * 2; + + do { + size = *allocsize; + status = uefi_call_wrapper(BS->GetMemoryMap, 5, &size, map, key, +...
2015 Nov 03
2
[PATCH] efi: Call ExitBootServices at least twice
...gt;> + * Like get_memory_map but try to use the given buffer first, reallocate >>> it if >>> + * it's too small and always set the allocated size. >>> + */ >>> +static EFI_MEMORY_DESCRIPTOR * >>> +get_memory_map_realloc(EFI_MEMORY_DESCRIPTOR *map, UINTN *allocsize, >>> + UINTN *nr_entries, UINTN *key, UINTN *desc_sz, >>> + UINT32 *desc_ver) >>> +{ >>> + EFI_STATUS status; >>> + UINTN size, allocsizeadd; >>> + >>> + allocsizead...
2015 Nov 03
0
[PATCH] efi: Call ExitBootServices at least twice
...;> >> +/* >> + * Like get_memory_map but try to use the given buffer first, reallocate >> it if >> + * it's too small and always set the allocated size. >> + */ >> +static EFI_MEMORY_DESCRIPTOR * >> +get_memory_map_realloc(EFI_MEMORY_DESCRIPTOR *map, UINTN *allocsize, >> + UINTN *nr_entries, UINTN *key, UINTN *desc_sz, >> + UINT32 *desc_ver) >> +{ >> + EFI_STATUS status; >> + UINTN size, allocsizeadd; >> + >> + allocsizeadd = sizeof(*map) * 2; >&g...
2015 Nov 03
0
[PATCH] efi: Call ExitBootServices at least twice
...ry to use the given buffer first, >>>> reallocate >>>> it if >>>> + * it's too small and always set the allocated size. >>>> + */ >>>> +static EFI_MEMORY_DESCRIPTOR * >>>> +get_memory_map_realloc(EFI_MEMORY_DESCRIPTOR *map, UINTN *allocsize, >>>> + UINTN *nr_entries, UINTN *key, UINTN *desc_sz, >>>> + UINT32 *desc_ver) >>>> +{ >>>> + EFI_STATUS status; >>>> + UINTN size, allocsizeadd; >>>> + >>...
2014 Feb 13
5
[PATCH] Potential bug in emalloc
From: Sylvain Gault <sylvain.gault at gmail.com> I found something suspicious while hunting another bug a while ago. The conditions for that bug to occur seems quite hard to meet, but it's still code quality improvement. See the commit message for details. Sylvain Gault (1): efi: Suspicious size reduction in emalloc efi/main.c | 4 +--- 1 file changed, 1 insertion(+), 3
2020 Jun 11
2
[PATCH] efi/main: add retry to exit_boot()
...1 file changed, 70 insertions(+), 11 deletions(-) diff --git a/efi/main.c b/efi/main.c index 6a748412..d7fb637e 100644 --- a/efi/main.c +++ b/efi/main.c @@ -1008,16 +1008,81 @@ static int exit_boot(struct boot_params *bp) EFI_MEMORY_DESCRIPTOR *map; EFI_STATUS status; uint32_t e820_type; - UINTN i, nr_entries, key, desc_sz; + UINTN i, nr_entries, key, desc_sz, buf_sz, map_sz; UINT32 desc_ver; + /* + * Call once with empty buffer size to + * see how large the buffer should be. + */ + buf_sz = 0; + status = uefi_call_wrapper(BS->GetMemoryMap, + 5, + &buf_sz, +...
2007 Mar 11
0
10 commits - libswfdec/js libswfdec/swfdec_js_color.c libswfdec/swfdec_js_connection.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_js_net_stream.c libswfdec/swfdec_js_video.c libswfdec/swfdec_js_xml.c libswfdec/swfdec_script.c player/.gitignore
...@ -905,48 +905,42 @@ js_obj_toSource(JSContext *cx, JSObject } #endif /* JS_HAS_INITIALIZERS || JS_HAS_TOSOURCE */ +extern const JSClass movieclip_class; +extern char *swfdec_movie_get_path (void *movieclip); +extern void g_free (void *p); JSBool js_obj_toString(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { - jschar *chars; - size_t nchars; - const char *clazz, *prefix; + const char *name; JSString *str; JSClass *clasp; -#if JS_HAS_INITIALIZERS - if (cx->version == JSVERSION_1_2) - return js_obj_toSource(cx, obj,...
2007 Jun 01
0
Branch 'as' - 2 commits - libswfdec/Makefile.am libswfdec/swfdec_as_strings.c libswfdec/swfdec_as_types.c libswfdec/swfdec_interval.c libswfdec/swfdec_interval.h libswfdec/swfdec_player_as.c libswfdec/swfdec_player.c
...- SwfdecAsInterval *ret = g_malloc (sizeof (SwfdecAsInterval) + sizeof (SwfdecAsValue) * (2 + n_args)); - - ret->timeout.callback = swfdec_js_interval_trigger; - ret->n_args = n_args; - return ret; -} +/*** INTERVALS ***/ static void -swfdec_js_global_setInterval (SwfdecAsObject *obj, uintN argc, SwfdecAsValue *argv, SwfdecAsValue *rval) +swfdec_player_do_set_interval (gboolean repeat, SwfdecAsObject *obj, guint argc, + SwfdecAsValue *argv, SwfdecAsValue *rval) { - SwfdecPlayer *player = JS_GetContextPrivate (cx); + SwfdecPlayer *player = SWFDEC_PLAYER (obj->context); Swf...
2015 Aug 13
3
[syslinux:master] efi/pxe: Reuse handle
...0, all EFI_SERVICE_BINDINGs are for networking */ > struct efi_binding *efi_create_binding(EFI_GUID *bguid, EFI_GUID *pguid) > { > EFI_SERVICE_BINDING *sbp; > struct efi_binding *b; > EFI_STATUS status; > - EFI_HANDLE protocol, child, *handles = NULL; > - UINTN i, nr_handles = 0; > + EFI_HANDLE protocol, child; > > b = malloc(sizeof(*b)); > if (!b) > return NULL; > > - status = LibLocateHandle(ByProtocol, bguid, NULL, &nr_handles, &handles); > + status = uefi_call_wrapper(BS->OpenProtocol, 6, p...
2015 Jul 08
1
EFI: PXE: "My IP is 0.0.0.0" (Problem building main.c)
...see the new code at https://github.com/ppatpat/syslinux/blob/master/efi/main.c <<< I'm having a bit of a problem with the build using the latest version of main.c. I get an error that stops the build because variable i is redefined in efi_create_binding. On line 104 i is defined as UINTN and then on line 182 it is redefined as int. I deleted 182 but just thought I would mention it. Jeff Sloan
2014 Feb 13
0
[PATCH] efi: Suspicious size reduction in emalloc
...his closes bug #39. Signed-off-by: Sylvain Gault <sylvain.gault at gmail.com> --- efi/main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/efi/main.c b/efi/main.c index 0e6b137..94878f9 100644 --- a/efi/main.c +++ b/efi/main.c @@ -691,10 +691,8 @@ EFI_STATUS emalloc(UINTN size, UINTN align, EFI_PHYSICAL_ADDRESS *addr) /* Low-memory is super-precious! */ if (end <= 1 << 20) continue; - if (start < 1 << 20) { - size -= (1 << 20) - start; + if (start < 1 << 20) start = (1 << 20); - } aligned = (start + alig...
2020 Jun 18
0
[PATCH] efi/main: add retry to exit_boot()
...file changed, 70 insertions(+), 11 deletions(-) diff --git a/efi/main.c b/efi/main.c index 6a748412..d7fb637e 100644 --- a/efi/main.c +++ b/efi/main.c @@ -1008,16 +1008,81 @@ static int exit_boot(struct boot_params *bp) EFI_MEMORY_DESCRIPTOR *map; EFI_STATUS status; uint32_t e820_type; - UINTN i, nr_entries, key, desc_sz; + UINTN i, nr_entries, key, desc_sz, buf_sz, map_sz; UINT32 desc_ver; + /* + * Call once with empty buffer size to + * see how large the buffer should be. + */ + buf_sz = 0; + status = uefi_call_wrapper(BS->GetMemoryMap, + 5, + &buf_sz, + map, + &amp...
2007 Feb 22
0
3 commits - libswfdec/swfdec_js.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_script.c
...() diff --git a/libswfdec/swfdec_js_movie.c b/libswfdec/swfdec_js_movie.c index 5b730b3..2296078 100644 --- a/libswfdec/swfdec_js_movie.c +++ b/libswfdec/swfdec_js_movie.c @@ -87,7 +87,7 @@ mc_getBytesLoaded (JSContext *cx, JSObje } static JSBool -mc_getBytesTotal(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +mc_getBytesTotal (JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { SwfdecMovie *movie; SwfdecDecoder *dec; @@ -101,6 +101,23 @@ mc_getBytesTotal(JSContext *cx, JSObject } static JSBool +mc_getNextHighestDepth (JSContext *cx, JSObject...
2020 Sep 09
0
[PATCH v7 71/72] x86/efi: Add GHCB mappings when SEV-ES is active
...true MMIO write, which would result in the required > // #VC exception. Instead, use the the VMGEXIT MMIO write support directly > // to perform the update. > // > VmgInit (Ghcb); > Ghcb->SharedBuffer[0] = Value; > Ghcb->SaveArea.SwScratch = (UINT64) (UINTN) Ghcb->SharedBuffer; > VmgExit (Ghcb, SVM_EXIT_MMIO_WRITE, (UINT64) (UINTN) Ptr, 1); > VmgDone (Ghcb); > } else { > *Ptr = Value; > } > } This function *does* run at OS runtime (as a part of non-volatile UEFI variable writes). And note that, wherever MSR_SEV_E...
2007 Jun 21
0
Branch 'as' - 5 commits - libswfdec/Makefile.am libswfdec/swfdec_as_strings.c libswfdec/swfdec_js_net_stream.c libswfdec/swfdec_movie.c libswfdec/swfdec_net_connection.c libswfdec/swfdec_net_stream_as.c libswfdec/swfdec_net_stream.c
...- -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include "swfdec_net_stream.h" -#include "swfdec_debug.h" -#include "swfdec_js.h" -#include "swfdec_player_internal.h" - -static JSBool -swfdec_js_net_stream_play (JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) -{ - SwfdecNetStream *stream; - const char *url; - - stream = swfdec_scriptable_from_object (cx, obj, SWFDEC_TYPE_NET_STREAM); - if (stream == NULL) - return JS_TRUE; - url = swfdec_js_to_string (cx, argv[0]); - if (url == NULL) - return JS_FALSE; - swfd...
2007 Mar 01
0
7 commits - libswfdec/swfdec_connection.c libswfdec/swfdec_js_connection.c libswfdec/swfdec_js_movie.c libswfdec/swfdec_js_net_stream.c libswfdec/swfdec_js_xml.c libswfdec/swfdec_net_stream.c libswfdec/swfdec_scriptable.c libswfdec/swfdec_scriptable.h
...js_net_stream.c b/libswfdec/swfdec_js_net_stream.c index 9f12dd0..ed9c81e 100644 --- a/libswfdec/swfdec_js_net_stream.c +++ b/libswfdec/swfdec_js_net_stream.c @@ -27,6 +27,23 @@ #include "swfdec_player_internal.h" static JSBool +swfdec_js_net_stream_play (JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + SwfdecNetStream *stream; + const char *url; + + stream = swfdec_scriptable_from_object (cx, obj, SWFDEC_TYPE_NET_STREAM); + if (stream == NULL) + return JS_TRUE; + url = swfdec_js_to_string (cx, argv[0]); + if (url == NULL) + return JS_FALSE; + swfd...
2007 Mar 01
0
11 commits - libswfdec/Makefile.am libswfdec/swfdec_connection.c libswfdec/swfdec_connection.h libswfdec/swfdec_flv_decoder.c libswfdec/swfdec_js.c libswfdec/swfdec_js_connection.c libswfdec/swfdec_js.h libswfdec/swfdec_js_net_stream.c
...fdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "swfdec_net_stream.h" +#include "swfdec_debug.h" +#include "swfdec_js.h" +#include "swfdec_player_internal.h" + +static JSBool +swfdec_js_net_stream_to_string (JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) +{ + JSString *string; + + string = JS_InternString (cx, "[object Object]"); + if (string == NULL) + return JS_FALSE; + + *rval = STRING_TO_JSVAL (string); + return JS_TRUE; +} + +static JSFunctionSpec net_stream_methods[] = { + { "toString&qu...