mirror of
https://github.com/fail0verflow/switch-coreboot.git
synced 2025-05-04 01:39:18 -04:00
acpigen_write_package: Return pointer to package element counter
Have acpigen_write_package() return a pointer to the package element counter so it can be used for dynamic package generation where needed. Change-Id: Id7f6dd03511069211ba3ee3eb29a6ca1742de847 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://review.coreboot.org/15536 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
3727776a8b
commit
85d8027628
2 changed files with 5 additions and 2 deletions
|
@ -87,12 +87,15 @@ void acpigen_emit_dword(unsigned int data)
|
||||||
acpigen_emit_byte((data >> 24) & 0xff);
|
acpigen_emit_byte((data >> 24) & 0xff);
|
||||||
}
|
}
|
||||||
|
|
||||||
void acpigen_write_package(int nr_el)
|
char *acpigen_write_package(int nr_el)
|
||||||
{
|
{
|
||||||
|
char *p;
|
||||||
/* package op */
|
/* package op */
|
||||||
acpigen_emit_byte(0x12);
|
acpigen_emit_byte(0x12);
|
||||||
acpigen_write_len_f();
|
acpigen_write_len_f();
|
||||||
|
p = acpigen_get_current();
|
||||||
acpigen_emit_byte(nr_el);
|
acpigen_emit_byte(nr_el);
|
||||||
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
void acpigen_write_byte(unsigned int data)
|
void acpigen_write_byte(unsigned int data)
|
||||||
|
|
|
@ -38,7 +38,7 @@ void acpigen_write_len_f(void);
|
||||||
void acpigen_pop_len(void);
|
void acpigen_pop_len(void);
|
||||||
void acpigen_set_current(char *curr);
|
void acpigen_set_current(char *curr);
|
||||||
char *acpigen_get_current(void);
|
char *acpigen_get_current(void);
|
||||||
void acpigen_write_package(int nr_el);
|
char *acpigen_write_package(int nr_el);
|
||||||
void acpigen_write_zero(void);
|
void acpigen_write_zero(void);
|
||||||
void acpigen_write_one(void);
|
void acpigen_write_one(void);
|
||||||
void acpigen_write_ones(void);
|
void acpigen_write_ones(void);
|
||||||
|
|
Loading…
Add table
Reference in a new issue