diff options
author | Randall Spangler <rspangler@chromium.org> | 2012-04-19 16:10:11 -0700 |
---|---|---|
committer | Randall Spangler <rspangler@chromium.org> | 2012-04-19 18:15:18 -0700 |
commit | 13ad1c007bef3922e0aae8c7e2ef067a05eb0c06 (patch) | |
tree | ccba49c2460301a85e0abe050a27c734fde1acdb /core | |
parent | 24dafefb3a63c9e2111ff87c4595ceaff7182d20 (diff) | |
download | chrome-ec-13ad1c007bef3922e0aae8c7e2ef067a05eb0c06.tar.gz |
Implement HOOK_SYSJUMP and use it to preserve LPC host event mask
This also changes shared_mem to use all the remaining RAM, instead of
reserving a fixed-size buffer.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:9161
TEST=manual
hostevent --> all masks should be 0
hostevent smi 0x12300000
hostevent --> should confirm SMI mask was set
sysjump b
hostevent --> should confirm SMI mask is still set
reboot
hostevent --> should confirm SMI mask is back to 0
Change-Id: Iccb6da6ccc93ee5036a3f478d24b717a462d9150
Diffstat (limited to 'core')
-rw-r--r-- | core/cortex-m/ec.lds.S | 9 | ||||
-rw-r--r-- | core/cortex-m/link_defs.h | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S index 3b80f28093..32114b59da 100644 --- a/core/cortex-m/ec.lds.S +++ b/core/cortex-m/ec.lds.S @@ -50,10 +50,15 @@ SECTIONS __hooks_init = .; *(.rodata.HOOK_INIT) __hooks_init_end = .; + __hooks_freq_change = .; *(.rodata.HOOK_FREQ_CHANGE) __hooks_freq_change_end = .; + __hooks_sysjump = .; + *(.rodata.HOOK_SYSJUMP) + __hooks_sysjump_end = .; + . = ALIGN(4); *(.rodata*) . = ALIGN(4); @@ -79,6 +84,10 @@ SECTIONS *(.bss) . = ALIGN(4); __bss_end = .; + + /* Shared memory buffer must be at the end of preallocated RAM, so it + * can expand to use all the remaining RAM. */ + __shared_mem_buf = .; } > IRAM /DISCARD/ : { *(.ARM.*) } } diff --git a/core/cortex-m/link_defs.h b/core/cortex-m/link_defs.h index 9279f42804..af809ad7e0 100644 --- a/core/cortex-m/link_defs.h +++ b/core/cortex-m/link_defs.h @@ -20,6 +20,8 @@ extern const struct hook_data __hooks_init[]; extern const struct hook_data __hooks_init_end[]; extern const struct hook_data __hooks_freq_change[]; extern const struct hook_data __hooks_freq_change_end[]; +extern const struct hook_data __hooks_sysjump[]; +extern const struct hook_data __hooks_sysjump_end[]; extern const struct host_command __hcmds[]; extern const struct host_command __hcmds_end[]; @@ -27,4 +29,6 @@ extern const struct host_command __hcmds_end[]; extern const struct irq_priority __irqprio[]; extern const struct irq_priority __irqprio_end[]; +extern uint8_t __shared_mem_buf[]; + #endif /* __CROS_EC_LINK_DEFS_H */ |