Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dadigang
Ventoy
Commits
d4d87366
"git@developer.sourcefind.cn:modelzoo/resnet50_tensorflow.git" did not exist on "2da44c6afeace570c5aa66b14c7a9cf9becf5626"
Commit
d4d87366
authored
May 02, 2022
by
longpanda
Browse files
Add debug info
parent
63f9331c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
1 deletion
+37
-1
GRUB2/MOD_SRC/grub-2.04/grub-core/kern/efi/mm.c
GRUB2/MOD_SRC/grub-2.04/grub-core/kern/efi/mm.c
+13
-0
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c
+23
-0
GRUB2/MOD_SRC/grub-2.04/include/grub/efi/efi.h
GRUB2/MOD_SRC/grub-2.04/include/grub/efi/efi.h
+1
-1
No files found.
GRUB2/MOD_SRC/grub-2.04/grub-core/kern/efi/mm.c
View file @
d4d87366
...
@@ -49,6 +49,9 @@ static grub_efi_uintn_t finish_desc_size;
...
@@ -49,6 +49,9 @@ static grub_efi_uintn_t finish_desc_size;
static
grub_efi_uint32_t
finish_desc_version
;
static
grub_efi_uint32_t
finish_desc_version
;
int
grub_efi_is_finished
=
0
;
int
grub_efi_is_finished
=
0
;
static
grub_efi_uint64_t
g_total_pages
;
static
grub_efi_uint64_t
g_required_pages
;
/*
/*
* We need to roll back EFI allocations on exit. Remember allocations that
* We need to roll back EFI allocations on exit. Remember allocations that
* we'll free on exit.
* we'll free on exit.
...
@@ -614,6 +617,9 @@ grub_efi_mm_init (void)
...
@@ -614,6 +617,9 @@ grub_efi_mm_init (void)
else
if
(
required_pages
>
BYTES_TO_PAGES
(
MAX_HEAP_SIZE
))
else
if
(
required_pages
>
BYTES_TO_PAGES
(
MAX_HEAP_SIZE
))
required_pages
=
BYTES_TO_PAGES
(
MAX_HEAP_SIZE
);
required_pages
=
BYTES_TO_PAGES
(
MAX_HEAP_SIZE
);
g_total_pages
=
total_pages
;
g_required_pages
=
required_pages
;
/* Sort the filtered descriptors, so that GRUB can allocate pages
/* Sort the filtered descriptors, so that GRUB can allocate pages
from smaller regions. */
from smaller regions. */
sort_memory_map
(
filtered_memory_map
,
desc_size
,
filtered_memory_map_end
);
sort_memory_map
(
filtered_memory_map
,
desc_size
,
filtered_memory_map_end
);
...
@@ -670,3 +676,10 @@ grub_efi_get_ram_base(grub_addr_t *base_addr)
...
@@ -670,3 +676,10 @@ grub_efi_get_ram_base(grub_addr_t *base_addr)
return
GRUB_ERR_NONE
;
return
GRUB_ERR_NONE
;
}
}
#endif
#endif
void
grub_efi_get_reserved_page_num
(
grub_uint64_t
*
total
,
grub_uint64_t
*
required
)
{
*
total
=
g_total_pages
;
*
required
=
g_required_pages
;
}
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c
View file @
d4d87366
...
@@ -5568,6 +5568,28 @@ static grub_err_t ventoy_cmd_fn_mutex_lock(grub_extcmd_context_t ctxt, int argc,
...
@@ -5568,6 +5568,28 @@ static grub_err_t ventoy_cmd_fn_mutex_lock(grub_extcmd_context_t ctxt, int argc,
VENTOY_CMD_RETURN
(
GRUB_ERR_NONE
);
VENTOY_CMD_RETURN
(
GRUB_ERR_NONE
);
}
}
static
grub_err_t
ventoy_cmd_dump_rsv_page
(
grub_extcmd_context_t
ctxt
,
int
argc
,
char
**
args
)
{
grub_uint64_t
total
;
grub_uint64_t
required
;
(
void
)
ctxt
;
(
void
)
argc
;
(
void
)
args
;
#ifdef GRUB_MACHINE_EFI
grub_efi_get_reserved_page_num
(
&
total
,
&
required
);
grub_printf
(
"Total pages: %llu
\n
"
,
(
unsigned
long
long
)
total
);
grub_printf
(
"Required pages: %llu
\n
"
,
(
unsigned
long
long
)
required
);
#else
grub_printf
(
"Non EFI mode!
\n
"
);
#endif
grub_refresh
();
VENTOY_CMD_RETURN
(
GRUB_ERR_NONE
);
}
int
ventoy_env_init
(
void
)
int
ventoy_env_init
(
void
)
{
{
char
buf
[
64
];
char
buf
[
64
];
...
@@ -5769,6 +5791,7 @@ static cmd_para ventoy_cmds[] =
...
@@ -5769,6 +5791,7 @@ static cmd_para ventoy_cmds[] =
{
"vt_iso_vd_id_clear"
,
ventoy_iso_vd_id_clear
,
0
,
NULL
,
""
,
""
,
NULL
},
{
"vt_iso_vd_id_clear"
,
ventoy_iso_vd_id_clear
,
0
,
NULL
,
""
,
""
,
NULL
},
{
"vt_iso_vd_id_begin"
,
ventoy_cmd_iso_vd_id_begin
,
0
,
NULL
,
""
,
""
,
NULL
},
{
"vt_iso_vd_id_begin"
,
ventoy_cmd_iso_vd_id_begin
,
0
,
NULL
,
""
,
""
,
NULL
},
{
"vt_fn_mutex_lock"
,
ventoy_cmd_fn_mutex_lock
,
0
,
NULL
,
""
,
""
,
NULL
},
{
"vt_fn_mutex_lock"
,
ventoy_cmd_fn_mutex_lock
,
0
,
NULL
,
""
,
""
,
NULL
},
{
"vt_efi_dump_rsv_page"
,
ventoy_cmd_dump_rsv_page
,
0
,
NULL
,
""
,
""
,
NULL
},
};
};
int
ventoy_register_all_cmd
(
void
)
int
ventoy_register_all_cmd
(
void
)
...
...
GRUB2/MOD_SRC/grub-2.04/include/grub/efi/efi.h
View file @
d4d87366
...
@@ -88,7 +88,7 @@ EXPORT_FUNC (grub_efi_compare_device_paths) (const grub_efi_device_path_t *dp1,
...
@@ -88,7 +88,7 @@ EXPORT_FUNC (grub_efi_compare_device_paths) (const grub_efi_device_path_t *dp1,
void
*
EXPORT_FUNC
(
grub_efi_allocate_iso_buf
)
(
grub_uint64_t
size
);
void
*
EXPORT_FUNC
(
grub_efi_allocate_iso_buf
)
(
grub_uint64_t
size
);
void
*
EXPORT_FUNC
(
grub_efi_allocate_chain_buf
)
(
grub_uint64_t
size
);
void
*
EXPORT_FUNC
(
grub_efi_allocate_chain_buf
)
(
grub_uint64_t
size
);
void
EXPORT_FUNC
(
grub_efi_get_reserved_page_num
)
(
grub_uint64_t
*
total
,
grub_uint64_t
*
required
);
extern
void
(
*
EXPORT_VAR
(
grub_efi_net_config
))
(
grub_efi_handle_t
hnd
,
extern
void
(
*
EXPORT_VAR
(
grub_efi_net_config
))
(
grub_efi_handle_t
hnd
,
char
**
device
,
char
**
device
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment